Getting started
Install and run the free-pi CLI, sign in with GitHub, and start your first coding session in the terminal.
This page is also available as Markdown.
What you need
- A terminal.
- Node.js 22.15 or newer. On the Current release line, 23.8 or newer works. Older Node versions crash inside the agent, so
free-pi-clichecks for this at startup and stops with a message if your Node is too old. To upgrade with nvm, runnvm install 22. - A GitHub account.
Run it
npx -y free-pi-cli@latest
You do not need to install anything first. npx downloads and runs the CLI. Use npx -y free-pi-cli@latest to make sure you get the newest version.
If you prefer a shorter command, install it once globally and run it by name:
npm install -g free-pi-cli
free-pi-cli
The command is free-pi-cli, not pi.
Using the DeepSeek Harness app instead of a terminal? See FreePi in DeepSeek Harness.
What happens on the first run
- Consent screen. free-pi shows a consent screen and asks
Accept? [y/N]. It covers ads, training on your sessions, and the Terms of Service and Privacy Policy. If you decline, the CLI exits and nothing is sent to the free-pi server. See Ads and privacy for what the screen says. - Welcome message. A short intro explains that ads keep free-pi free and that one CLI session per account runs at a time. Set
FREEPI_NO_INTRO=1to skip it. - GitHub sign-in. The CLI opens a freepi.ai page in your browser and prints a short confirmation code. Sign in with GitHub if asked, check that the page shows the same code, and press Connect. The CLI waits and continues once you finish. Over SSH, in a container, or when no browser can open, the CLI uses a GitHub device code instead: it prints a code and a github.com URL to open on any device. You can force that with
--device-login. - The agent starts. The terminal switches to the coding agent. See Using the agent.
Consent needs an interactive terminal. If stdin is not a TTY (for example in a script or CI), the CLI explains this and exits. Run npx -y free-pi-cli@latest once in a normal terminal to accept, and later runs work.
Running it again
Your sign-in token is saved, so closing the terminal does not sign you out. Run npx -y free-pi-cli@latest again and you go straight into the agent. The token is checked at startup. If the server no longer accepts it, you are asked to consent and sign in again.
Where files are stored
free-pi keeps its configuration and sign-in token under ~/.free-pi/agent. This is separate from ~/.pi/agent, so an existing pi install is not touched.
Signing out
free-pi-cli logout
This deletes the stored sign-in token on your machine. The next run asks you to consent and sign in again.