| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
AI coding agent, built for the terminal.
This is a fork of the original opencode project
To build opencode locally as a single binary:
If you're using asdf for version management, ensure you have Go 1.24.4+ available:
asdf list golang # Check available versionsInstall Bun (if not already installed):
curl -fsSL https://bun.sh/install | bash
export PATH="$HOME/.bun/bin:$PATH"Build the Go TUI component:
cd packages/tui
CGO_ENABLED=0 GOOS=darwin GOARCH=arm64 go build -ldflags="-s -w" -o ../opencode/dist/tui ./cmd/opencode/main.goNote: Adjust GOOS and GOARCH for your target platform (e.g., GOOS=linux GOARCH=amd64 for Linux x64)
Build the main binary:
cd packages/opencode
mkdir -p dist
bun build \
--define OPENCODE_TUI_PATH="'/absolute/path/to/opencode/packages/opencode/dist/tui'" \
--define OPENCODE_VERSION="'local-build'" \
--compile \
--target=bun-darwin-arm64 \
--outfile=dist/opencode \
./src/index.tsNote:
- Replace /absolute/path/to/opencode/ with your actual project path
- Adjust --target=bun-darwin-arm64 for your platform (e.g., bun-linux-x64)
Test the binary:
./dist/opencode --version
./dist/opencode --helpThe resulting binary at packages/opencode/dist/opencode is self-contained and ready to run on your target platform.
# 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 LinuxTip
Remove versions older than 0.1.x before installing.
The install script respects the following priority order for the installation path:
# 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 | bashFor more info on how to configure opencode head over to our docs.
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:
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.
And run.
$ bun install
$ bun devAPI 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.
It's very similar to Claude Code in terms of capability. Here are the key differences:
The other confusingly named repo has no relation to this one. You can read the story behind it here.
| Back | FazBrowse Home | New Git URL |