An agentic coding tool from Anthropic that runs in your terminal, reads your codebase, and handles coding tasks and git workflows via natural language.
anomalyco/opencode
An open source AI coding agent that runs in your terminal, with a desktop app and two built-in agents for building and planning changes.
Open-source alternative to:Claude Code
Cursor
- Stars
- 217,100
- Forks
- 29,035
- Open issues
- 4,700
- Last commit
- 8 hours ago
What is it?
OpenCode is an open source AI coding agent. It is available as a terminal interface, and as a beta desktop application for macOS, Windows and Linux. It is installed through a shell script, npm, Homebrew, pacman, mise or Nix.
The project ships two built-in agents that you switch between with the Tab key. The build agent has full access and is meant for development work. The plan agent is read-only: it denies file edits by default and asks permission before running bash commands, which suits exploring an unfamiliar codebase or drafting a plan before changing anything. A general subagent handles complex searches and multistep tasks and can be invoked with @general.
The project is written in TypeScript and licensed under MIT. Its documentation covers configuration, and the repository includes contribution guidelines for those who want to modify the agent.
Key features
- 01Terminal interface plus a beta desktop app for macOS, Windows and Linux.
- 02Built-in build agent with full access and a read-only plan agent.
- 03Plan agent denies file edits by default and asks before running bash commands.
- 04General subagent for complex searches and multistep tasks, invoked with @general.
- 05Multiple installation options, including npm, Homebrew, pacman, mise and Nix.
Use cases
- Exploring an unfamiliar codebase with the read-only plan agent before making changes.
- Delegating day-to-day development tasks to the build agent from the terminal.
- Running a coding agent on macOS, Windows or Linux through the desktop app.
Quick start
- 1
Install OpenCode with the install script
curl -fsSL https://opencode.ai/v2/install | bash - 2
Or install the CLI globally with npm
npm i -g @opencode/cli@latest
Things to know
- The desktop app is in beta.
- The official Homebrew formula is updated less often than the opencode-v2 tap.
Topics
FAQ
- What is opencode?
- An open source AI coding agent that runs in your terminal, with a desktop app and two built-in agents for building and planning changes. OpenCode is an open source AI coding agent. It is available as a terminal interface, and as a beta desktop application for macOS, Windows and Linux. It is installed through a shell script, npm, Homebrew, pacman, mise or Nix.
- Is opencode free to use? What license does it have?
- opencode is open source under the MIT license. Check the license terms before using it in commercial products.
- Is opencode still maintained?
- Actively maintained. The last commit to opencode was on Oct 19, 2026.
- What can I use opencode for?
- Exploring an unfamiliar codebase with the read-only plan agent before making changes. Delegating day-to-day development tasks to the build agent from the terminal. Running a coding agent on macOS, Windows or Linux through the desktop app.
- How do I install opencode?
- Install OpenCode with the install script: curl -fsSL https://opencode.ai/v2/install | bash Or install the CLI globally with npm: npm i -g @opencode/cli@latest
- Where can I get opencode?
- The source code and installation instructions are on GitHub: https://github.com/anomalyco/opencode
Summary generated by AI from the project's README. GitHub stats refresh daily.
Related projects
Pi, the AI coding agent, compiled ahead of time to native code so it starts faster and uses less CPU than Pi on Bun or Node.
A minimal, extensible AI agent harness with a unified multi-provider LLM API, agent runtime, terminal UI, and a coding agent CLI.
A terminal coding agent with built-in LSP, debugger, browser and subagent tools, supporting 60+ model providers.
An open-source coding agent that reads your project, edits files and runs tests from your terminal, desktop, browser or editor.
A CLI and web dashboard that benchmarks free coding LLM models across providers and installs the chosen one into your coding tool.