2025-06-17 08:10:19 +08:00
< p align = "center" >
< a href = "https://opencode.ai" >
< picture >
2025-10-03 00:31:56 +08:00
< source srcset = "packages/console/app/src/asset/logo-ornate-dark.svg" media = "(prefers-color-scheme: dark)" >
< source srcset = "packages/console/app/src/asset/logo-ornate-light.svg" media = "(prefers-color-scheme: light)" >
< img src = "packages/console/app/src/asset/logo-ornate-light.svg" alt = "OpenCode logo" >
2025-06-17 08:10:19 +08:00
< / picture >
< / a >
< / p >
2025-12-11 08:05:33 +08:00
< p align = "center" > The open source AI coding agent.< / p >
2025-06-17 08:10:19 +08:00
< p align = "center" >
2025-07-10 07:55:06 +08:00
< a href = "https://opencode.ai/discord" > < img alt = "Discord" src = "https://img.shields.io/discord/1391832426048651334?style=flat-square&label=discord" / > < / a >
2025-06-17 08:10:19 +08:00
< a href = "https://www.npmjs.com/package/opencode-ai" > < img alt = "npm" src = "https://img.shields.io/npm/v/opencode-ai?style=flat-square" / > < / a >
2026-01-03 05:02:52 +08:00
< a href = "https://github.com/anomalyco/opencode/actions/workflows/publish.yml" > < img alt = "Build status" src = "https://img.shields.io/github/actions/workflow/status/anomalyco/opencode/publish.yml?style=flat-square&branch=dev" / > < / a >
2025-06-17 08:10:19 +08:00
< / p >
2026-01-26 05:45:37 +08:00
< p align = "center" >
< a href = "README.md" > English< / a > |
2026-01-26 09:00:01 +08:00
< a href = "README.zh.md" > 简体中文< / a > |
< a href = "README.zht.md" > 繁體中文< / a > |
< a href = "README.ko.md" > 한국어< / a > |
< a href = "README.de.md" > Deutsch< / a > |
< a href = "README.es.md" > Español< / a > |
< a href = "README.fr.md" > Français< / a > |
2026-01-27 08:45:05 +08:00
< a href = "README.it.md" > Italiano< / a > |
2026-01-26 09:00:01 +08:00
< a href = "README.da.md" > Dansk< / a > |
< a href = "README.ja.md" > 日本語< / a > |
< a href = "README.pl.md" > Polski< / a > |
< a href = "README.ru.md" > Русский< / a > |
2026-02-06 05:25:40 +08:00
< a href = "README.bs.md" > Bosanski< / a > |
2026-01-26 09:00:01 +08:00
< a href = "README.ar.md" > العربية< / a > |
< a href = "README.no.md" > Norsk< / a > |
2026-01-28 22:10:50 +08:00
< a href = "README.br.md" > Português (Brasil)< / a > |
2026-02-01 23:37:45 +08:00
< a href = "README.th.md" > ไทย< / a > |
2026-02-15 21:46:19 +08:00
< a href = "README.tr.md" > Türkçe< / a > |
< a href = "README.uk.md" > Українська< / a >
2026-01-26 05:45:37 +08:00
< / p >
2025-10-03 00:31:56 +08:00
[](https://opencode.ai)
2025-06-14 04:43:53 +08:00
2025-06-20 06:19:06 +08:00
---
2025-06-15 00:12:56 +08:00
### Installation
2025-06-14 04:37:58 +08:00
2025-06-15 00:12:56 +08:00
```bash
# YOLO
2025-06-14 04:42:31 +08:00
curl -fsSL https://opencode.ai/install | bash
2025-06-15 00:12:56 +08:00
# Package managers
npm i -g opencode-ai@latest # or bun/pnpm/yarn
2026-01-18 23:58:34 +08:00
scoop install opencode # Windows
2025-10-23 22:25:42 +08:00
choco install opencode # Windows
2026-01-08 01:06:48 +08:00
brew install anomalyco/tap/opencode # macOS and Linux (recommended, always up to date)
2026-01-10 00:39:59 +08:00
brew install opencode # macOS and Linux (official brew formula, updated less)
2026-02-13 23:07:48 +08:00
sudo pacman -S opencode # Arch Linux (Stable)
paru -S opencode-bin # Arch Linux (Latest from AUR)
2025-12-31 12:43:15 +08:00
mise use -g opencode # Any OS
2026-01-03 05:02:52 +08:00
nix run nixpkgs#opencode # or github:anomalyco/opencode for latest dev branch
2025-06-14 04:42:31 +08:00
```
2025-07-16 08:09:26 +08:00
> [!TIP]
> Remove versions older than 0.1.x before installing.
2025-06-14 04:37:58 +08:00
2025-12-17 01:28:40 +08:00
### Desktop App (BETA)
2026-01-03 05:02:52 +08:00
OpenCode is also available as a desktop application. Download directly from the [releases page ](https://github.com/anomalyco/opencode/releases ) or [opencode.ai/download ](https://opencode.ai/download ).
2025-12-17 01:28:40 +08:00
| Platform | Download |
| --------------------- | ------------------------------------- |
| macOS (Apple Silicon) | `opencode-desktop-darwin-aarch64.dmg` |
| macOS (Intel) | `opencode-desktop-darwin-x64.dmg` |
| Windows | `opencode-desktop-windows-x64.exe` |
| Linux | `.deb` , `.rpm` , or AppImage |
```bash
# macOS (Homebrew)
brew install --cask opencode-desktop
2026-01-18 23:58:34 +08:00
# Windows (Scoop)
scoop bucket add extras; scoop install extras/opencode-desktop
2025-12-17 01:28:40 +08:00
```
2025-07-19 02:15:10 +08:00
#### Installation Directory
The install script respects the following priority order for the installation path:
1. `$OPENCODE_INSTALL_DIR` - Custom installation directory
2. `$XDG_BIN_DIR` - XDG Base Directory Specification compliant path
2026-02-04 05:21:51 +08:00
3. `$HOME/bin` - Standard user binary directory (if it exists or can be created)
2025-07-19 02:15:10 +08:00
4. `$HOME/.opencode/bin` - Default fallback
```bash
# Examples
OPENCODE_INSTALL_DIR=/usr/local/bin curl -fsSL https://opencode.ai/install | bash
XDG_BIN_DIR=$HOME/.local/bin curl -fsSL https://opencode.ai/install | bash
```
2025-11-18 06:19:14 +08:00
### Agents
2026-01-06 12:45:40 +08:00
OpenCode includes two built-in agents you can switch between with the `Tab` key.
2025-11-18 06:19:14 +08:00
2026-02-04 05:21:51 +08:00
- **build** - Default, full-access agent for development work
2025-11-18 06:19:14 +08:00
- **plan** - Read-only agent for analysis and code exploration
- Denies file edits by default
- Asks permission before running bash commands
- Ideal for exploring unfamiliar codebases or planning changes
2026-02-04 05:21:51 +08:00
Also included is a **general** subagent for complex searches and multistep tasks.
2025-11-18 06:19:14 +08:00
This is used internally and can be invoked using `@general` in messages.
Learn more about [agents ](https://opencode.ai/docs/agents ).
2025-06-20 04:26:58 +08:00
### Documentation
2025-06-15 02:45:59 +08:00
2026-02-04 05:21:51 +08:00
For more info on how to configure OpenCode, [**head over to our docs** ](https://opencode.ai/docs ).
2025-06-15 02:45:59 +08:00
2025-06-15 00:45:26 +08:00
### Contributing
2025-10-19 03:10:14 +08:00
If you're interested in contributing to OpenCode, please read our [contributing docs ](./CONTRIBUTING.md ) before submitting a pull request.
2025-06-21 05:27:58 +08:00
2025-11-17 09:51:41 +08:00
### Building on OpenCode
2026-02-04 05:21:51 +08:00
If you are working on a project that's related to OpenCode and is using "opencode" as part of its name, for example "opencode-dashboard" or "opencode-mobile", please add a note to your README to clarify that it is not built by the OpenCode team and is not affiliated with us in any way.
2025-11-17 09:51:41 +08:00
2025-06-15 02:39:06 +08:00
### FAQ
2025-12-27 00:21:33 +08:00
#### How is this different from Claude Code?
2025-06-16 09:39:02 +08:00
2025-06-17 08:10:19 +08:00
It's very similar to Claude Code in terms of capability. Here are the key differences:
2025-06-16 09:39:02 +08:00
- 100% open source
2026-02-04 05:21:51 +08:00
- Not coupled to any provider. Although we recommend the models we provide through [OpenCode Zen ](https://opencode.ai/zen ), OpenCode can be used with Claude, OpenAI, Google, or even local models. As models evolve, the gaps between them will close and pricing will drop, so being provider-agnostic is important.
- Out-of-the-box LSP support
2025-10-03 00:31:56 +08:00
- A focus on TUI. OpenCode is built by neovim users and the creators of [terminal.shop ](https://terminal.shop ); we are going to push the limits of what's possible in the terminal.
2026-02-04 05:21:51 +08:00
- A client/server architecture. This, for example, can allow OpenCode to run on your computer while you drive it remotely from a mobile app, meaning that the TUI frontend is just one of the possible clients.
2025-06-16 09:43:20 +08:00
2025-06-17 08:10:19 +08:00
---
2026-02-04 05:22:33 +08:00
**Join our community** [Discord ](https://discord.gg/opencode ) | [X.com ](https://x.com/opencode )