Minimal MIT terminal coding agent by Mario Zechner. Thin tool surface, extensions, multi-provider models; you pay only for API usage.

Share:
View alternatives

Pi

Pi is a minimal terminal coding agent from Mario Zechner. The live product is at pi.dev; source lives in the MIT-licensed badlogic/pi-mono monorepo (about 99k GitHub stars as of 2026-08-30). Install the CLI with npm install -g @mariozechner/pi-coding-agent, then point it at the model provider you already pay for.

If you want a heavier official harness, compare Claude Code, Gemini CLI, and OpenCode.

Key Features

  • Tiny default tool surface: A short system prompt plus read, write, edit, and bash. Extra capabilities come from extensions, skills, prompt templates, and themes.
  • Extensible packages: Bundle custom tools and share them via npm or git (pi install .). Ask Pi to build missing pieces, then /reload.
  • Many providers: Anthropic, OpenAI, Google, Azure, Bedrock, OpenRouter, Ollama, and more. Switch mid-session with /model or Ctrl+L.
  • Four run modes: Interactive TUI, print/JSON for scripts, RPC over stdin/stdout, and an embeddable SDK.
  • Tree-shaped sessions: Navigate prior points with /tree, export HTML, or /share a gist. Compaction and AGENTS.md / SYSTEM.md help with context engineering.

Use Cases

Who should use this tool?

  • Developers who find Claude Code too heavy and want a thinner interactive loop in the terminal.
  • Teams scripting agents with pi -p or JSON mode in CI.
  • Extension authors who want to grow the harness instead of forking a sealed product.

Problems it solves

  1. Opinionated bloat: Skip built-in sub-agents, plan mode, MCP, and permission popups unless you add them yourself.
  2. Provider lock-in: Keep one CLI while swapping models and auth (API keys or OAuth).
  3. Opaque sessions: Inspect and branch history instead of losing context in a flat chat log.

Limitation: There is no hosted product seat. You run the CLI locally and pay the model provider. Security (containers, confirmations) is your responsibility unless you build it with extensions.

Pricing

Plan Price Notes
Open source $0 MIT CLI. Model tokens are billed by Anthropic, OpenAI, or whatever /model points at.

Getting Started

  1. Read pi.dev or the pi-mono README.
  2. Install: npm install -g @mariozechner/pi-coding-agent (npm latest was 0.73.1 when checked on 2026-08-30).
  3. In a repo, run pi, authenticate a provider, and start with a small coding task.
  4. Add project instructions in AGENTS.md before granting broad bash rights.

Practical workflow

Pick a small bug, let Pi edit and run tests in interactive mode, then /export the session if you want a reviewable artifact. For automation, use print mode with a pinned model.

Frequently Asked Questions

Is Pi free?

The CLI and source are free under MIT. You still pay your LLM provider for tokens.

Does it include MCP or sub-agents by default?

No. The project intentionally omits them; you can add similar behavior with extensions, skills, or packages.

Which package should I install?

Use @mariozechner/pi-coding-agent from the badlogic/pi-mono README. Older third-party package names in blogs may be stale.

How does it compare to Claude Code?

Claude Code is Anthropic's fuller product surface (CLI, IDE, desktop, cloud). Pi stays minimal and provider-agnostic; you extend it when you need more.

Alternatives

Tips

  1. Start with the four default tools; add packages only when a workflow repeats.
  2. Prefer containers or tight bash allowlists before letting the agent run unconstrained.
  3. Use /model to keep expensive models for hard steps and cheaper ones for exploration.

Conclusion

Pi fits developers who want a free, extensible terminal harness and are fine bringing their own model keys. Start at pi.dev, install the current npm package, then decide whether Claude Code is worth the extra product weight.

Comments

No comments yet. Be the first to comment!