PivsOpenCode

Pi and OpenCode are open-source coding agents that run in your terminal. Pi ships four default tools and leaves subagents and plan mode to extensions. OpenCode builds those in, along with LSP, permission rules and more. This page compares features, pricing and adoption, using each project’s docs and public npm and GitHub data.

Updated November 2, 2026

Pi vs OpenCode adoption: npm downloads and GitHub stars

Pi

16.0×

npm downloads, Oct 2026 vs Jan 2026: 18.2M a month, up from 1.1M.[9][10]

Jan 2026Oct 2026

119,428 GitHub stars[8]

OpenCode

11.2×

npm downloads, Oct 2026 vs Jan 2026: 13.8M a month, up from 1.2M.[11][12]

Jan 2026Oct 2026

223,927 GitHub stars[13]

  • Pi’s counts add its current package, @earendil-works/pi-coding-agent, to the original @mariozechner/pi-coding-agent. OpenCode’s add the 1.x package, opencode-ai, to the 2.x package, @opencode/cli.[9][10][11][12]
  • Pi is also a TypeScript SDK that other apps build on, such as OpenClaw, so its downloads include installs that never run the Pi CLI. Both counts include CI installs and updates, and miss each project’s install script.[1]

Monthly npm downloads, January to October 2026. GitHub stars checked November 2, 2026.

Built-in tools in Pi and OpenCode

Built-in tools in each agent
JobPi4 toolsOpenCode10 tools
Run shell commandsbashbash
Read, edit, write filesread edit writeread edit write
Find files and search codegrep find ls (off by default)glob grep
Fetch a web pageNot built inwebfetch
Delegate to subagentsNot built intask
Load skillsNot built inskill
Track a to-do listNot built intodowrite

Pi’s defaults are read, bash, edit and write. It also ships grep, find and ls, which are off until you add them with --tools or defaultTools.[2]

When to use Pi or OpenCode

You want a small, readable core

Pi

Four default tools

Pi starts with read, bash, edit and write. Everything else is an option or an extension.[2]

You want to build your own workflow

Pi

Extensions, skills and packages

Pi leaves subagents and plan mode to TypeScript extensions you write or install, and shares them as npm or git packages.[1]

You want to embed an agent in your app

Pi

SDK and RPC mode

Pi runs as an interactive terminal app, in print or JSON mode, over RPC, or as a TypeScript SDK.[1]

You want planning and subagents built in

OpenCode

Plan, General and Explore agents

OpenCode includes a Plan agent that can’t edit files and two subagents it can hand work to.[18]

You want LSP and permission rules

OpenCode

Built in

Language server diagnostics and allow, ask or deny rules work without extensions. Pi has neither in its core.[21][19][4]

You want a desktop app or GitHub comments

OpenCode

Desktop app, IDE extension, `/oc`

OpenCode has a desktop app and IDE extension, and a GitHub workflow that answers `/oc` comments.[14][24]

Pi vs OpenCode features

Pi’s README explains that it leaves subagents, plan mode, MCP, permission prompts and to-do lists to extensions, and argues that built-in to-do lists “confuse models.” OpenCode includes these features so that you don’t have to build them.

SupportedPartial or with caveatsNot supported

Openness and models

License[8][13]

PiMIT

OpenCodeMIT

Model choice[7][15]

PiMost major providers

OpenCode75+ providers and local models

Claude Pro or Max sign-in[8][15]

PiBilled as extra usage

OpenCodeNot allowed

Instruction files[6][20]

PiAGENTS.md or CLAUDE.md

OpenCodeAGENTS.md; CLAUDE.md fallback

Agent features

Subagents[1][18]

PiNot built in

OpenCodeGeneral and Explore

Plan mode[1][18]

PiNot built in

OpenCodePlan agent

Permission prompts[4][19]

PiNone

OpenCodeAllow, ask, deny

MCP[3][22]

PiLocal and remote

OpenCodeLocal and remote

Language servers[1][21]

PiNot built in

OpenCodeBuilt in

Sessions[5][25]

PiTree with branches

OpenCodeResume, undo and redo

Interfaces

Ways to run it[1][14][23]

PiTerminal, JSON, RPC, SDK

OpenCodeTerminal, desktop, IDE, server

Customizing[1][18]

PiExtensions and packages

OpenCodeConfig, agents, plugins

GitHub[1][24]

PiNot built in

OpenCode/oc comments

Pi and OpenCode pricing and model support

Both agents are free to use, and you pay your model provider for usage.

Pi

Pi has no model plans of its own.

  • Your own API keyProvider rates

    Anthropic, OpenAI, Google, Bedrock, Azure, OpenRouter, Groq, xAI, DeepSeek, OpenCode Zen and Go, and more. Custom providers can be added in models.json.[7]

  • Existing subscriptionWhat you already pay

    ChatGPT Plus or Pro, GitHub Copilot, and Claude Pro or Max. Pi’s docs say Claude usage from Pi is billed per token as extra usage, not from plan limits.[7]

OpenCode

OpenCode also sells its own model plans, Go and Zen.

  • Your own API keyProvider rates

    75+ providers through the AI SDK and Models.dev, plus local models.[15]

  • Existing subscriptionWhat you already pay

    ChatGPT Plus, GitHub Copilot and GitLab Duo. OpenCode stopped bundling Claude Pro and Max plugins in 1.3.0, saying Anthropic prohibits it.[15]

  • Go$10/mo

    Open models with usage caps. Go Plus is $40/month, and Go Teams is $20 per member per month. Pi also accepts Go keys, so one subscription works with both agents.[17][7]

  • ZenPay as you go

    Models from the OpenCode team, billed per request from prepaid credits.[16]

Running Pi or OpenCode in the cloud

Both agents run on your own computer by default, so they stop when it sleeps or shuts down. Replicas runs each task in its own cloud VM with your repositories cloned.

  1. 01

    Pick either agent

    Choose Pi or OpenCode for a chat, an automation, or a task started from the CLI or API.[26][27]

  2. 02

    Share one set of credentials

    Both use the same OpenCode Go, Aster, OpenRouter or OpenAI-compatible credentials.[26]

  3. 03

    Start tasks from your tools

    Tasks can start from the dashboard, Slack, Linear, GitHub, the CLI, the API and more, and the agent opens the pull request.

  4. 04

    Use your MCP servers and skills

    Pi in Replicas can use your organization’s MCP servers and skills.[26]

Common questions

Sources and methodology

Download counts come from npm’s public API and star counts from GitHub, both checked on November 2, 2026. Feature and pricing details come from Pi’s and OpenCode’s docs, checked the same day.

OpenCode has a version 2 that uses the same opencode command. This page describes version 1, which the opencode-ai npm package and OpenCode’s install script still install. Prices and plans change often, so confirm with each project before you buy.

If you spot an error, email founders@replicas.dev and we'll fix it.

  1. 1Pi coding agent README · GitHub
  2. 2Pi CLI reference · Pi
  3. 3Pi MCP servers · Pi
  4. 4Run Pi safely · Pi
  5. 5Pi sessions · Pi
  6. 6Pi configuration · Pi
  7. 7Pi providers · Pi
  8. 8earendil-works/pi repository · GitHub
  9. 9@earendil-works/pi-coding-agent download counts · npm
  10. 10@mariozechner/pi-coding-agent download counts · npm
  11. 11opencode-ai download counts · npm
  12. 12@opencode/cli download counts · npm
  13. 13anomalyco/opencode repository and license · GitHub
  14. 14OpenCode intro and install · OpenCode
  15. 15OpenCode providers · OpenCode
  16. 16OpenCode Zen · OpenCode
  17. 17OpenCode Go · OpenCode
  18. 18OpenCode agents · OpenCode
  19. 19OpenCode permissions · OpenCode
  20. 20OpenCode rules (AGENTS.md) · OpenCode
  21. 21OpenCode LSP servers · OpenCode
  22. 22OpenCode MCP servers · OpenCode
  23. 23OpenCode server · OpenCode
  24. 24OpenCode GitHub integration · OpenCode
  25. 25OpenCode TUI commands · OpenCode
  26. 26Pi in Replicas · Replicas
  27. 27OpenCode in Replicas · Replicas