AI coding agent, built for the terminal. https://opencode.ai
Find a file
Frank 2034fabc7d Squashed commit of the following:
commit 7b2ad6a1abf88e0731f15bbf6e281b29a610dd76
Merge: 74c85391 847a63e1
Author: Frank <frank@sst.dev>
Date:   Mon Aug 18 15:31:54 2025 +0800

    Merge branch 'dev' into github

commit 74c85391b576d01df298f6c30e3399b281b5c997
Author: Frank <frank@sst.dev>
Date:   Mon Aug 18 15:30:14 2025 +0800

    sync

commit 0d27f8e490f1aa242e1a3fcd1f21eb077f852207
Author: Frank <frank@sst.dev>
Date:   Mon Aug 18 14:30:57 2025 +0800

    sync

commit 0cf7e6c89f
Author: Frank <frank@sst.dev>
Date:   Mon Aug 18 11:54:57 2025 +0800

    sync

commit a782cb7a26
Author: Frank <frank@sst.dev>
Date:   Mon Aug 18 11:53:25 2025 +0800

    sync

commit aa55701458
Author: Frank <frank@sst.dev>
Date:   Mon Aug 18 11:48:10 2025 +0800

    sync

commit 73c8150479
Author: Frank <frank@sst.dev>
Date:   Mon Aug 18 01:29:29 2025 +0800

    sync

commit c5325134e8
Author: Frank <frank@sst.dev>
Date:   Mon Aug 18 01:07:48 2025 +0800

    sync

commit c5b646aa88
Author: Frank <frank@sst.dev>
Date:   Mon Aug 18 01:02:02 2025 +0800

    sync

commit 27f7cc86ab
Author: Frank <frank@sst.dev>
Date:   Mon Aug 18 00:59:22 2025 +0800

    sync

commit 0a6152a0e0
Author: Frank <frank@sst.dev>
Date:   Sun Aug 17 18:11:31 2025 +0800

    fix /opencode trigger

commit f1089103c6
Author: Frank <frank@sst.dev>
Date:   Sun Aug 17 17:55:14 2025 +0800

    sync

commit 3ad1824024
Author: Frank <frank@sst.dev>
Date:   Sun Aug 17 17:44:11 2025 +0800

    sync

commit 24f0f81773
Author: Frank <frank@sst.dev>
Date:   Sun Aug 17 17:18:22 2025 +0800

    sync

commit bc199d32be
Author: Frank <frank@sst.dev>
Date:   Sun Aug 17 16:59:03 2025 +0800

    sync

commit 6cf860be84
Author: Frank <frank@sst.dev>
Date:   Sun Aug 17 16:54:48 2025 +0800

    sync

commit f5f753ff38
Author: Frank <frank@sst.dev>
Date:   Sun Aug 17 14:43:12 2025 +0800

    sync

commit 26d2e23a3e
Author: Frank <frank@sst.dev>
Date:   Sun Aug 17 14:33:40 2025 +0800

    sync

commit c5b3f54a0a
Author: Frank <frank@sst.dev>
Date:   Sun Aug 17 14:16:10 2025 +0800

    sync

commit 1c74e9a7ad
Author: Frank <frank@sst.dev>
Date:   Sun Aug 17 08:17:53 2025 +0800

    sync

commit 89052dc9aa
Author: Frank <frank@sst.dev>
Date:   Sun Aug 17 08:12:43 2025 +0800

    sync

commit 42931d4d2a
Author: Frank <frank@sst.dev>
Date:   Sun Aug 17 08:08:37 2025 +0800

    sync

commit f22e97dd05
Author: Frank <frank@sst.dev>
Date:   Sun Aug 17 08:01:57 2025 +0800

    sync

commit 2dda422ef8
Author: Frank <frank@sst.dev>
Date:   Sun Aug 17 07:55:38 2025 +0800

    sync

commit b8be1d0e9e
Author: Frank <frank@sst.dev>
Date:   Sun Aug 17 07:48:18 2025 +0800

    sync

commit 78c84b96a3
Author: Frank <frank@sst.dev>
Date:   Sat Aug 16 20:49:26 2025 +0800

    sync

commit dd9c0c8309
Author: Frank <frank@sst.dev>
Date:   Sat Aug 16 20:47:25 2025 +0800

    sync

commit 5eb917abba
Author: Frank <frank@sst.dev>
Date:   Sat Aug 16 20:35:48 2025 +0800

    sync

commit 43cf83e7cc
Author: Frank <frank@sst.dev>
Date:   Sat Aug 16 20:32:49 2025 +0800

    sync

commit 10673ca3d2
Author: Frank <frank@sst.dev>
Date:   Sat Aug 16 19:55:53 2025 +0800

    sync

commit c45ae8a233
Author: Frank <frank@sst.dev>
Date:   Sat Aug 16 19:53:52 2025 +0800

    sync

commit 3c329dee05
Author: Frank <frank@sst.dev>
Date:   Sat Aug 16 19:49:56 2025 +0800

    sync

commit 5797048db8
Author: Frank <frank@sst.dev>
Date:   Sat Aug 16 18:00:04 2025 +0800

    sync

commit 2741338e8a
Author: Frank <frank@sst.dev>
Date:   Sat Aug 16 17:54:42 2025 +0800

    sync

commit a51a8ca6d0
Author: Frank <frank@sst.dev>
Date:   Fri Aug 15 18:59:29 2025 +0800

    sync

commit f4eeeb612d
Author: Frank <frank@sst.dev>
Date:   Fri Aug 15 18:56:35 2025 +0800

    sync

commit 1d0509c563
Author: Frank <frank@sst.dev>
Date:   Fri Aug 15 18:54:21 2025 +0800

    sync

commit 339807d1b8
Author: Frank <frank@sst.dev>
Date:   Fri Aug 15 18:49:22 2025 +0800

    sync

commit 70b4b78922
Author: Frank <frank@sst.dev>
Date:   Fri Aug 15 18:04:57 2025 +0800

    sync
2025-08-18 15:34:28 +08:00
.github/workflows ci: aur is down 2025-08-14 16:42:39 -04:00
.opencode/agent chore: spelling in git committer file (#1869) 2025-08-12 16:29:41 -04:00
cloud release: v0.5.5 2025-08-16 15:00:04 +00:00
github Squashed commit of the following: 2025-08-18 15:34:28 +08:00
infra wip: gateway 2025-08-10 01:17:48 -04:00
packages Squashed commit of the following: 2025-08-18 15:34:28 +08:00
script Update GPT-5 system prompt to use copilot-specific prompt instead of codex prompt 2025-08-11 14:28:49 -04:00
sdks/vscode release: v0.5.5 2025-08-16 15:00:04 +00:00
.editorconfig chore: add .editorconfig (#536) 2025-06-29 21:12:58 -04:00
.gitignore fix pyright 2025-08-11 22:27:24 -04:00
AGENTS.md ci: send stats to posthog 2025-08-05 12:01:48 -04:00
bun.lock fix(opencode): add ulid dependency (#1988) (#1989) 2025-08-16 23:21:29 -04:00
bunfig.toml Optimize package management with catalog and exact versions 2025-05-30 21:56:37 -04:00
install fix: install script didnt use -e flag (#2009) 2025-08-16 22:55:49 -04:00
LICENSE docs: cleanup casing 2025-06-20 15:35:25 -05:00
opencode.json Add agent-level permissions with whitelist/blacklist support (#1862) 2025-08-12 11:39:39 -04:00
package.json feat: /tui/show-toast api 2025-08-15 08:39:58 -05:00
README.md Docs: Homebrew can install Opencode on Linux (#1737) 2025-08-08 20:04:02 -04:00
sst-env.d.ts wip gateway 2025-08-09 01:28:27 -04:00
sst.config.ts wip: gateway 2025-08-08 13:24:32 -04:00
STATS.md ignore: update download stats 2025-08-17 2025-08-17 12:03:50 +00:00
tsconfig.json ci: daily stats script 2025-06-28 21:57:46 -04:00

opencode logo

AI coding agent, built for the terminal.

Discord npm Build status

opencode Terminal UI


Installation

# YOLO
curl -fsSL https://opencode.ai/install | bash

# Package managers
npm i -g opencode-ai@latest        # or bun/pnpm/yarn
brew install sst/tap/opencode      # macOS and Linux
paru -S opencode-bin               # Arch Linux

Tip

Remove versions older than 0.1.x before installing.

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
  3. $HOME/bin - Standard user binary directory (if exists or can be created)
  4. $HOME/.opencode/bin - Default fallback
# 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

Documentation

For more info on how to configure opencode head over to our docs.

Contributing

opencode is an opinionated tool so any fundamental feature needs to go through a design process with the core team.

Important

We do not accept PRs for core features.

However we still merge a ton of PRs - you can contribute:

  • Bug fixes
  • Improvements to LLM performance
  • Support for new providers
  • Fixes for env specific quirks
  • Missing standard behavior
  • Documentation

Take a look at the git history to see what kind of PRs we end up merging.

Note

If you do not follow the above guidelines we might close your PR.

To run opencode locally you need.

  • Bun
  • Golang 1.24.x

And run.

$ bun install
$ bun dev

Development Notes

API Client: After making changes to the TypeScript API endpoints in packages/opencode/src/server/server.ts, you will need the opencode team to generate a new stainless sdk for the clients.

FAQ

How is this different than Claude Code?

It's very similar to Claude Code in terms of capability. Here are the key differences:

  • 100% open source
  • Not coupled to any provider. Although Anthropic is recommended, opencode can be used with 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.
  • A focus on TUI. opencode is built by neovim users and the creators of terminal.shop; we are going to push the limits of what's possible in the terminal.
  • A client/server architecture. This for example can allow opencode to run on your computer, while you can drive it remotely from a mobile app. Meaning that the TUI frontend is just one of the possible clients.

What's the other repo?

The other confusingly named repo has no relation to this one. You can read the story behind it here.


Join our community Discord | YouTube | X.com