diff --git a/README.md b/README.md index b5a4c8ddd979..043148dd9ea9 100644 --- a/README.md +++ b/README.md @@ -10,8 +10,8 @@

The open source AI coding agent.

Discord - npm - Build status + npm + Build status

@@ -45,76 +45,45 @@ ### Installation -```bash -# 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 -``` +Choose one V2 installation method: + +- Install script: `curl -fsSL https://opencode.ai/v2/install | bash` +- npm: `npm install -g @opencode/cli` +- Bun: `bun install -g --trust @opencode/cli` +- Homebrew: `brew install anomalyco/tap/opencode-v2` > [!TIP] -> Remove versions older than 0.1.x before installing. +> Remove a package-managed V1 installation before installing V2; both use the `opencode` command. ### Desktop App (BETA) -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). +OpenCode V2 is also available as a desktop application. Find platform installers in the [V2 download guide](https://opencode.ai/v2/docs/#desktop). | Platform | Download | | --------------------- | ---------------------------------- | | macOS (Apple Silicon) | `opencode-desktop-mac-arm64.dmg` | | macOS (Intel) | `opencode-desktop-mac-x64.dmg` | -| Windows | `opencode-desktop-windows-x64.exe` | +| Windows (x64) | `opencode-desktop-win-x64.exe` | | Linux | `.deb`, `.rpm`, or `.AppImage` | -```bash -# 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 - -```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 -``` +The V2 install script places the binary in `$HOME/.opencode/bin`. It does not use `OPENCODE_INSTALL_DIR` or `XDG_BIN_DIR` to change that location. ### Agents -OpenCode includes two built-in agents you can switch between with the `Tab` key. +OpenCode includes two visible primary agents you can switch between with **Shift+Tab**. -- **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 +- **build** - Default coding agent. Tools are allowed by default; sensitive reads and external paths ask for approval. +- **plan** - Explores and plans without editing normal project files. It can write plan files when asked; shell commands follow your configured permissions. -Also included is a **general** subagent for complex searches and multistep tasks. -This is used internally and can be invoked using `@general` in messages. +The **general** subagent handles research and multistep tasks in a child session. -Learn more about [agents](https://opencode.ai/docs/agents). +Learn more about [agents](https://opencode.ai/v2/docs/agents). ### Documentation -For more info on how to configure OpenCode, [**head over to our docs**](https://opencode.ai/docs). +For more info on how to configure OpenCode V2, [**head over to our docs**](https://opencode.ai/v2/docs/). ### Contributing