AI Income LabJoin AI Income Lab ↗

Review · By · Published · Updated

Pi.dev Terminal Coding Agent: Install, OpenRouter and Costs

Diagram for the Pi.dev coding agent guide: install: One npm command, then run pi; connect: Log in with an OpenRouter key; watch: Session cost, slow models, rate limits.
Install → Connect → Watch

Quick answer

Install Pi with the one-line npm command from pi.dev, run pi, type login, choose API key and paste an OpenRouter key. It picked Kimi 2.6 by default, and the model list offered about 252 models. I ran a full site audit on my project, used the session command to see messages, tokens and total cost, and also connected Google Cloud Code Assist. Runs were slow, my OpenRouter balance went negative and Gemma 4 free hit a rate limit, so I topped up $5 and turned on auto top-up. I preferred OpenCode.

This is an April 2026 first look at Pi, an open-source terminal coding agent. It is a short, personal comparison on one project, not a benchmark, and I preferred OpenCode afterward. For that comparison and pricing, see OpenCode vs Claude Code. The OpenCode link on this site is an affiliate link.

Prices and plan names change. Confirm them on the vendor page before you buy. Checked November 15, 2026 against the Sources links below where listed.

1. What Pi is

The site calls Pi a minimal terminal coding harness that you adapt to your workflow. You extend it with TypeScript extensions, skills, prompts, templates and themes, and can share them as packages. It skips features such as sub-agents and plan mode to stay light, supports 15 or more providers and had about 35,000 GitHub stars.

2. Install and log in

Run the one-line npm install from the site, then start it with the pi command. Type login, choose API key and paste a new OpenRouter key from your OpenRouter account. Pi saved it and selected Kimi 2.6. You can choose from models by Anthropic, ByteDance, DeepSeek, Google Gemini, Meta Llama, Mistral, Nvidia, OpenAI and others, over 250 in total.

3. Run an audit and watch the cost

From my SaaS project folder I asked Pi to run a full site audit and tried an SEO skill I had installed. It was noticeably slow, while the same task in OpenCode went quickly. The session command shows messages sent, tokens used and the running cost. That is useful when models bill per token.

4. Subscriptions, credits and limits

Login with subscription lets you connect accounts such as Claude Pro or Max and GitHub Copilot, and I authenticated Google Cloud Code Assist in the browser. My OpenRouter balance then went negative, so I added $5 and had about $4.83 left, and turned on auto top-up. Switching to the Gemma 4 free model returned a temporarily rate limited error, so I moved to another cheap model and the audit continued.

Done when

What I didn't cover

Watch the walkthrough

Watch on YouTube: The Terminal AI Coding Agent You Need to Try. Also on this site with notes: the watch page.

From the video

Lines from the video's transcript that this guide does not cover, lightly trimmed. Each time opens the video at that point. Read the full transcript.

FAQ

How do I install Pi?

Run the one-line npm install command shown on pi.dev, then start it with the pi command.

Can I use my Claude or Copilot subscription?

The login with subscription option offered Claude Pro or Max and GitHub Copilot.

Why did the run stop?

My OpenRouter balance went negative, and Gemma 4 free returned a rate-limited error. Adding credits and switching models fixed it.

Sources

Written by . I’ve shipped software since 2013 and test AI tools on real builds for the AI Automation Station YouTube channel. Each guide shows the date it was last updated and lists the sources it relies on.

Build the next one with AI Income Lab

Step-by-step courses, reusable templates, and a community that answers when you get stuck.

Members get the Claude Code & Skills and Codex Tutorials & Courses lessons.

Join AI Income Lab ↗From $29/month. Cancel anytime.
Join 2,900+ members building with AI

Not ready to join? Get the weekly build notes: new guides and tested builds in one short email.