Compare commits

...
Author SHA1 Message Date
rekram1-node e733899929 docs: point v2 readme to v2 installs 2026-10-02 00:42:49 +00:00
+17 -48
View File
@@ -10,8 +10,8 @@
<p align="center">The open source AI coding agent.</p>
<p align="center">
<a href="https://opencode.ai/discord"><img alt="Discord" src="https://img.shields.io/discord/1391832426048651334?style=flat-square&label=discord" /></a>
<a href="https://www.npmjs.com/package/opencode-ai"><img alt="npm" src="https://img.shields.io/npm/v/opencode-ai?style=flat-square" /></a>
<a href="https://github.com/anomalyco/opencode/actions/workflows/publish.yml"><img alt="Build status" src="https://img.shields.io/github/actions/workflow/status/anomalyco/opencode/publish.yml?style=flat-square&branch=dev" /></a>
<a href="https://www.npmjs.com/package/@opencode/cli"><img alt="npm" src="https://img.shields.io/npm/v/%40opencode%2Fcli?style=flat-square" /></a>
<a href="https://github.com/anomalyco/opencode/actions/workflows/publish.yml"><img alt="Build status" src="https://img.shields.io/github/actions/workflow/status/anomalyco/opencode/publish.yml?style=flat-square&branch=v2" /></a>
</p>
<p align="center">
@@ -45,76 +45,45 @@
### Installation
```bash
# YOLO
curl -fsSL https://opencode.ai/install | bash
Choose one V2 installation method:
# 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
```
- 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