Files
Armin Ronacher 6f1072cc08 feat(coding-agent): shrink codemode prompt and guide scripts back from errors
Move the codemode script reference, including the models API, into
docs/codemode.md and keep only one line per global in the tool
description. Declared tools get a one-line note on how scripts call them,
and the codemode system prompt guidance and MCP server section are shorter.
With the default tools a GPT-5.6 request drops from about 5,300 to 3,300
tokens.

Errors now point the way back: unknown tools and models members name close
matches, models.classify() and models.generateImages() validate their
arguments, unknown or mistyped models point to getAvailableOfType(),
store() overflow explains the store, and unshown generated images get a note.
2026-10-01 18:27:23 +02:00
..
2026-09-30 21:12:28 +02:00
2026-09-30 21:12:28 +02:00

Pi logo

Discord npm

New issues and PRs from new contributors are closed automatically. Maintainers review closed submissions daily. See CONTRIBUTING.md.

Pi

Pi is a minimal, extensible AI agent for the terminal. Adapt Pi to your workflow, not the other way around.

Ask Pi to create the prompt templates, skills, extensions, and themes you need, or install a Pi package. Use Pi directly, automate it in print, JSON, or RPC mode, or build applications with the TypeScript SDK.

Getting started

Install the command-line interface with npm:

npm install -g --ignore-scripts @earendil-works/pi-coding-agent

This requires Node.js 22.19 or newer. Pi does not require dependency lifecycle scripts for a normal npm installation.

On macOS or Linux, you can instead use the installer:

curl -fsSL https://pi.dev/install.sh | sh

Start Pi in the directory where you want it to work:

cd /path/to/project
pi

For a built-in AI provider, run /login inside Pi to connect a subscription or API key. Then give Pi a task.

See the documentation for full setup and usage instructions.

Development

Clone the repository, install its dependencies, and run Pi from source:

git clone https://github.com/earendil-works/pi
cd pi
npm install --ignore-scripts
./pi-test.sh

pi-test.sh can be called from any directory and preserves the caller's working directory.

Before submitting changes, run:

npm run check
./test.sh

Read CONTRIBUTING.md before opening an issue or pull request. It defines the contribution gate, issue quality bar, and required checks. Read AGENTS.md for repository-specific implementation, testing, dependency, and release rules.

License

MIT