This is fork from opencode, this fork is autonomous SDLC open source coding Agent for science
The open source AI coding agent.
English | 简体中文 | 繁體中文 | 한국어 | Deutsch | Español | Français | Italiano | Dansk | 日本語 | Polski | Русский | Bosanski | العربية | Norsk | Português (Brasil) | ไทย | Türkçe | Українська | বাংলা | Ελληνικά | Tiếng Việt
git clone https://github.com/tomtyiu/Autoopencode.git
cd Autoopencode
npm run dev# YOLO
curl -fsSL https://opencode.ai/install | bash
# Package managers
npm i -g opencode-ai@latest # or bun/pnpm/yarn
scoop install opencode # Windows
choco install opencode # Windows
brew install anomalyco/tap/opencode # macOS and Linux (recommended, always up to date)
brew install opencode # macOS and Linux (official brew formula, updated less)
sudo pacman -S opencode # Arch Linux (Stable)
paru -S opencode-bin # Arch Linux (Latest from AUR)
mise use -g opencode # Any OS
nix run nixpkgs#opencode # or github:anomalyco/opencode for latest dev branchTip
Remove versions older than 0.1.x before installing.
OpenCode is also available as a desktop application. Download directly from the releases page or opencode.ai/download.
| Platform | Download |
|---|---|
| macOS (Apple Silicon) | opencode-desktop-mac-arm64.dmg |
| macOS (Intel) | opencode-desktop-mac-x64.dmg |
| Windows | opencode-desktop-windows-x64.exe |
| Linux | .deb, .rpm, or .AppImage |
# macOS (Homebrew)
brew install --cask opencode-desktop
# Windows (Scoop)
scoop bucket add extras; scoop install extras/opencode-desktopThe install script respects the following priority order for the installation path:
$OPENCODE_INSTALL_DIR- Custom installation directory$XDG_BIN_DIR- XDG Base Directory Specification compliant path$HOME/bin- Standard user binary directory (if it exists or can be created)$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 | bashOpenCode includes two built-in agents you can switch between with the Tab key.
- build - Default, full-access agent for development work
- 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
Also included is a general subagent for complex searches and multistep tasks.
This is used internally and can be invoked using @general in messages.
Learn more about agents.
The local OpenCode HTTP/WebSocket server (opencode serve, opencode web) exposes shell execution, PTY upgrades, MCP installation, and file-system primitives. To prevent a malicious website from driving these primitives through the user's browser, the server enforces three browser-facing defenses:
- Strict CORS allowlist (
src/server/cors.ts). Onlyhttps://opencode.ai,https://app.opencode.ai,oc://renderer, and the Tauri schemes are trusted. Wildcard trust forhttp://localhost:*,http://127.0.0.1:*, and*.opencode.aisubdomains has been removed. Additional origins can be added per-instance with--cors <origin>or theserver.corsconfig field. - WebSocket Origin validation on the PTY connect route. Browsers always include
Originon WebSocket handshakes; the server rejects upgrades from any origin not in the allowlist plus the same-host exemption. - Host header validation (
src/server/host.ts) as a DNS-rebinding defense. The server only accepts Host headers that name an interface it's actually bound to. Loopback names are always accepted; the configured--hostname, the mDNS domain, and the machine's network-interface addresses (when binding to0.0.0.0/::) are accepted automatically. Additional hostnames can be allow-listed with--allowed-host <host>or theserver.allowedHostsconfig field. Unknown Host headers receive421 Misdirected Request.
If you run a custom dev UI on another localhost port, add it explicitly:
opencode serve --cors http://localhost:5173If you bind to a non-loopback hostname and access via an extra hostname not auto-discovered, add it explicitly:
opencode serve --hostname 0.0.0.0 --allowed-host my-laptop.lanOPENCODE_SERVER_PASSWORD is still strongly recommended for any non-loopback binding.
For more info on how to configure OpenCode, head over to our docs.
If you're interested in contributing to OpenCode, please read our contributing docs before submitting a pull request.
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 we recommend the models we provide through OpenCode 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.
- Built-in opt-in LSP support
- 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 drive it remotely from a mobile app, meaning that the TUI frontend is just one of the possible clients.
This is not built by the OpenCode team and is not affiliated with OpenCode in any way.
- change in AGENTS.md - Autonomous Production Delivery, Roles/ Goal: Operate as an end-to-end production software delivery agent, not a code-only assistant. Own the work from intake through implementation, debugging, validation, release preparation, and handoff.
added /skills auto-debug
- a standalone skill that codifies the debugging mindset, failure workflow, failure classification, anti-patterns, and evidence/reporting expectations referenced from
AGENTS.md
Thank you for anomalyco and MD file from Andrej Karpathy
