Skip to content
 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12,896 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AUTOOPENCODE

This is fork from opencode, this fork is autonomous SDLC open source coding Agent for science


OpenCode logo

The open source AI coding agent.

Discord npm Build status

English | 简体中文 | 繁體中文 | 한국어 | Deutsch | Español | Français | Italiano | Dansk | 日本語 | Polski | Русский | Bosanski | العربية | Norsk | Português (Brasil) | ไทย | Türkçe | Українська | বাংলা | Ελληνικά | Tiếng Việt

OpenCode Terminal UI


Installation

git clone https://github.com/tomtyiu/Autoopencode.git
cd Autoopencode
npm run dev

orignal opencode

# 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 branch

Tip

Remove versions older than 0.1.x before installing.

Desktop App (BETA)

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-desktop

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 it 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

Agents

OpenCode 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.

Security

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). Only https://opencode.ai, https://app.opencode.ai, oc://renderer, and the Tauri schemes are trusted. Wildcard trust for http://localhost:*, http://127.0.0.1:*, and *.opencode.ai subdomains has been removed. Additional origins can be added per-instance with --cors <origin> or the server.cors config field.
  • WebSocket Origin validation on the PTY connect route. Browsers always include Origin on 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 to 0.0.0.0/::) are accepted automatically. Additional hostnames can be allow-listed with --allowed-host <host> or the server.allowedHosts config field. Unknown Host headers receive 421 Misdirected Request.

If you run a custom dev UI on another localhost port, add it explicitly:

opencode serve --cors http://localhost:5173

If 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.lan

OPENCODE_SERVER_PASSWORD is still strongly recommended for any non-loopback binding.

Documentation

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

Contributing

If you're interested in contributing to OpenCode, please read our contributing docs before submitting a pull request.

FAQ

How is this different from 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 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.

Notes

This is not built by the OpenCode team and is not affiliated with OpenCode in any way.


Changelog

  • 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

Thank you for anomalyco and MD file from Andrej Karpathy

About

The autonomous SDLC open source coding agent for science and developers

Resources

Contributing

Security policy

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages