You have heard of Claude Code, GitHub Copilot Agent, and Cursor. They are powerful tools. They also come with opinionated workflows, heavy UIs, and a lot of built-in assumptions about how you should work.

Pi is the opposite.

Pi is a minimal terminal coding harness from Earendil Works. It stays small at the core. You extend it through TypeScript extensions, skills, prompt templates, themes, and pi packages. It does not force plan mode, permission popups, to-do lists, or background tasks on you. It gives you a terminal interface, a set of tools, and the freedom to build your own workflow.

Think of Pi as the Vim of coding agents. Small, fast, and endlessly customizable.

What Makes Pi Different

Most coding agents try to be your entire development environment. They embed themselves in your IDE, manage your git history, and structure your work into plans and tasks.

Pi does none of that. It deliberately avoids:

  • Built-in MCP servers
  • Sub-agents
  • Permission popups
  • Plan mode
  • To-do lists
  • Background bash execution

Instead, Pi gives you four core tools: read, write, edit, and bash. Plus read-only helpers: grep, find, and ls. You can add more through extensions. You can run it inside tmux if you want background tasks. You can use external containers for isolation.

The philosophy is simple: the core stays small. Workflow-specific behavior lives in extensions or external tools.

Pi also implements the Agent Skills standard. Skills are self-contained capability packages that load on demand. This means Pi can share skills with Claude Code and OpenAI Codex. You are not locked into one tool's ecosystem.

Installation

Pi installs via npm:

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

The --ignore-scripts flag disables dependency lifecycle scripts during install. Pi does not need install scripts for normal operation.

On Linux or macOS, you can also use the shell installer:

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

To remove Pi:

npm uninstall -g @earendil-works/pi-coding-agent

Note: uninstalling Pi leaves your settings, credentials, sessions, and installed packages in ~/.pi/agent/. This is intentional. Your data survives the tool.

Authentication

Pi supports two authentication patterns: subscription login and API keys.

For subscription providers, start Pi and run:

/login

Then select your provider. Built-in options include:

  • Claude Pro/Max
  • ChatGPT Plus/Pro (Codex)
  • GitHub Copilot

For API-key providers, set an environment variable before launching:

export ANTHROPIC_API_KEY=sk-ant-...
pi

Pi supports a wide range of providers: Anthropic, OpenAI, DeepSeek, Google Gemini, Mistral, Groq, Cerebras, xAI, OpenRouter, Azure OpenAI, Amazon Bedrock, Cloudflare, and more. See the providers documentation for the full list.

You can also store API keys in ~/.pi/agent/auth.json. The file is created with 0600 permissions. Auth file credentials take priority over environment variables.

Your First Session

Navigate to your project directory and type:

cd /path/to/project
pi

Try a first prompt:

Summarize this repository and tell me how to run its checks.

Pi reads your project files, analyzes the structure, and gives you a summary. It can read files, write new ones, patch existing code, and run shell commands. By default, it has full write access to your working directory. Use git or another checkpointing workflow if you want easy rollback.

Core Tools

Pi gives the model four built-in tools:

  • read — read file contents
  • write — create or overwrite files
  • edit — patch files with precise changes
  • bash — run shell commands

Additional read-only tools are available through tool options:

  • grep — search file contents
  • find — locate files by name or pattern
  • ls — list directory contents

You can restrict tools at launch. For read-only mode:

pi --tools read,grep,find,ls -p "Review the code"

Or disable all tools entirely with --no-tools.

Referencing Files and Images

Type @ in the editor to fuzzy-search project files. This is fast and intuitive. You can also pass files on the command line:

pi @README.md "Summarize this"
pi @src/app.ts @src/app.test.ts "Review these together"

Images work too. Paste with Ctrl+V (or Alt+V on Windows), or drag an image into a supported terminal. Pi sends the image to the model alongside your text.

Shell Commands

Prefix a command with ! to run it and send the output to the model:

!npm run lint

This is useful when you want the agent to see test results, build output, or error logs.

Use !! to run a command without adding its output to the context. This keeps your context window clean when you do not need the model to see the result.

Project Instructions with AGENTS.md

Pi loads context files at startup to learn how you want it to behave in a project.

Create an AGENTS.md file in your project root:

# Project Instructions

- Run `npm run check` after code changes.
- Do not run production migrations locally.
- Keep responses concise.

Pi loads AGENTS.md or CLAUDE.md from:

  • The current working directory
  • Parent directories, walking up from your current location
  • ~/.pi/agent/AGENTS.md for global instructions

You can also replace or append to the default system prompt with .pi/SYSTEM.md or ~/.pi/agent/SYSTEM.md. Restart Pi or run /reload after changing context files.

Session Management

Sessions auto-save to ~/.pi/agent/sessions/, organized by working directory. Each session is a JSONL file with a tree structure. You can branch, fork, and resume at any point.

Resume a session:

pi -c    # Continue most recent session
pi -r    # Browse and select from past sessions

Navigate the session tree:

  • /tree — jump to any previous point and continue from there
  • /fork — create a new session from an earlier user message
  • /clone — duplicate the current branch into a new session file

Sessions are not flat chat logs. They are trees. You can explore approach A, then jump back and try approach B, all in the same file. When you switch branches, Pi can summarize the abandoned branch and attach that summary at your new position. You keep the context without replaying the entire conversation.

The Skills System

Pi implements the Agent Skills standard. Skills are self-contained capability packages that the agent loads on demand.

A skill is a directory with a SKILL.md file. It includes frontmatter (name, description), setup instructions, helper scripts, and reference documentation.

Pi discovers skills from:

  • ~/.pi/agent/skills/ (global)
  • .pi/skills/ (project-local)
  • Package-installed skills
  • Settings-defined paths

Skills use progressive disclosure. Only the name and description sit in the system prompt at all times. The full instructions load when the agent decides it needs them. This keeps context usage low while making powerful capabilities available.

Invoke a skill directly:

/skill:brave-search

You can even use skills from Claude Code or OpenAI Codex by adding their skill directories to your Pi settings:

{
  "skills": [
    "~/.claude/skills",
    "~/.codex/skills"
  ]
}

Compaction

Long sessions hit context limits. Pi handles this with compaction.

/compact summarizes older messages to free up context space. You can add custom instructions to control what gets preserved:

/compact Focus on keeping the API design decisions and test plans.

Auto-compaction is enabled by default. Settings control how many recent tokens to keep and how many to reserve for the model's response. You can also hook into compaction via extensions to implement custom summarization logic.

Slash Commands

Pi includes a rich set of slash commands for session and configuration management:

  • /login, /logout — manage credentials
  • /model — switch models
  • /settings — configure thinking level, theme, transport, and more
  • /resume — pick from previous sessions
  • /new — start a fresh session
  • /tree — navigate the session tree
  • /fork — branch a new session from an earlier message
  • /clone — duplicate the current branch
  • /compact — summarize older context
  • /copy — copy the last assistant message to clipboard
  • /export — save session to HTML
  • /share — upload as a private GitHub gist
  • /reload — reload extensions, skills, prompts, and context files
  • /quit — exit Pi

Type / in the editor to open command completion.

Non-Interactive Mode

Pi is not just a chat interface. You can run it as a one-shot command:

pi -p "Summarize this codebase"
cat README.md | pi -p "Summarize this text"
pi -p @screenshot.png "What's in this image?"

Use --mode json for structured JSON line output. Use --mode rpc for stdin/stdout integration with other tools.

This makes Pi scriptable. You can wire it into CI pipelines, pre-commit hooks, or shell aliases.

Settings

Pi uses JSON settings files. Global settings live in ~/.pi/agent/settings.json. Project settings live in .pi/settings.json and override the global file.

Key settings include:

  • defaultProvider and defaultModel — which model to use
  • defaultThinkingLevel — off, minimal, low, medium, high, or xhigh
  • compaction — auto-compaction thresholds and token budgets
  • retry — automatic retry on transient errors
  • packages, extensions, skills, prompts, themes — resource loading paths
  • sessionDir — where to store session files
  • warnings.anthropicExtraUsage — alert when subscription auth draws from extra usage

Nested objects merge between global and project settings. So you can set a global theme and override only the compaction token budget per project.

Extensions

If Pi's minimal core is not enough, you can extend it with TypeScript modules.

Extensions can:

  • Register custom tools the LLM can call
  • Intercept and block tool calls (permission gates, path protection)
  • Add custom commands
  • Build custom TUI components
  • Inject context before agent runs
  • Hook into session lifecycle events
  • Implement custom compaction logic

Extensions live in ~/.pi/agent/extensions/ (global) or .pi/extensions/ (project-local). They load via jiti, so TypeScript works without compilation.

Want a permission gate before rm -rf? An extension can do that. Want git checkpointing at every turn? An extension can do that. Want a game of Snake while you wait for a build? There is an example for that.

Practical Tips for Getting Started

Start simple. Launch Pi in a project directory and ask it to summarize the repo. The default tools are enough for most tasks.

Add an AGENTS.md file. Even a few lines about testing commands and style preferences make Pi more useful.

Use @ for file references. It is faster than typing full paths and less error-prone.

Try non-interactive mode. pi -p is perfect for one-off tasks you want to script.

Name your sessions. Use /name refactor-auth-module so you can find them later with /resume.

Experiment with skills. Ask Pi to build a skill for a repetitive task. The next time you need it, invoke it with /skill:name.

Read the blog post. Mario Zechner, Pi's creator, wrote a detailed post about the design rationale at mariozechner.at. It explains why Pi avoids the features other agents include by default.


Suggested title: Meet Pi: The Minimal Terminal Coding Harness That Gets Out of Your Way

Word count: 1,847

Citations:

Fact-check notes:

  • Provider list and auth methods verified against pi.dev/docs/latest/providers as of May 27, 2026.
  • Tool list and CLI flags verified against pi.dev/docs/latest/usage.
  • Skills discovery paths and progressive disclosure behavior verified against pi.dev/docs/latest/skills.
  • Session tree behavior and compaction settings verified against pi.dev/docs/latest/sessions and pi.dev/docs/latest/settings.
  • Pi deliberately omits MCP, sub-agents, permission popups, plan mode, to-dos, and background bash per pi.dev/docs/latest/usage and the creator's blog post.