# Install opencode with Homebrew, chocolatey, MacPorts, Nix, pacman, scoop, winget

AI coding agent, built for the terminal. Version 1.17.10 via Homebrew; verified 2026-06-26.

## Install

```sh
sudo av install brew:opencode
```

## Agent safety answer

opencode is an agent-facing coding tool that can read files and invoke local developer workflows.

- **Credential access:** May access repository files, tool configs, and environment variables available to the agent session.
- **Remote mutation:** Can trigger local tools that mutate Git, cloud, or package state.
- **Publish/artifact risk:** Can generate code or commands that become release artifacts.
- **Recommended control:** Run under containment and gate sensitive tool actions.
- **Agent-use guidance:** Use with scanned worktrees; require approval before commands that expose credentials or mutate remote systems.

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install opencode
```

  Evidence: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install opencode
```

  Evidence: MacPorts ports tree: llm/opencode/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

### Linux

- Nix (92%):

```sh
nix profile install nixpkgs#opencode
```

  Evidence: nixpkgs package indexes: pkgs/by-name/op/opencode/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

- pacman (92%):

```sh
sudo pacman -S opencode
```

  Evidence: Arch Linux sync databases: opencode from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz

### Windows

- Chocolatey (92%):

```sh
choco install opencode
```

  Evidence: Chocolatey community package catalog: opencode from http://community.chocolatey.org/api/v2/Packages?$filter=IsLatestVersion&$select=Id&$top=1000&$skiptoken='11','office365homepremium'

- Scoop (92%):

```sh
scoop install main/opencode
```

  Evidence: Scoop official bucket manifest trees: bucket/opencode.json from https://api.github.com/repos/ScoopInstaller/Main/git/trees/master?recursive=1

- winget (92%):

```sh
winget install --id SST.OpenCodeDesktop -e
```

  Evidence: Windows Package Manager source index: SST.OpenCodeDesktop from https://cdn.winget.microsoft.com/cache/source.msix

## Package facts

- **Package key:** brew:opencode
- **Package manager:** Homebrew
- **Package manager page:** <https://formulae.brew.sh/formula/opencode>
- **Version:** 1.17.10
- **Source summary:** AI coding agent, built for the terminal
- **Homepage:** <https://opencode.ai>
- **Repository:** <https://github.com/anomalyco/opencode>
- **Upstream docs:** <https://opencode.ai/docs>
- **License:** MIT
- **Source archive:** <https://registry.npmjs.org/opencode-ai/-/opencode-ai-1.17.10.tgz>
- **Last updated:** 2026-06-26T02:25:21Z
- **Generated:** 2026-07-08T07:18:31+00:00

## Executables

- opencode (cli)
- opencode (alias)

## Dependencies

- node
- ripgrep

## Install behavior

- Post-install hook: not defined
- Bottle: available on arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux

## Freshness

- Page generated: 2026-07-08
- Package-manager version: 1.17.10
- Package-manager updated: 2026-06-26
- Local data: ok
- Upstream repository: https://opencode.ai
- info: Release/tag comparison is only available for GitHub repositories.
## Project history and usage

OpenCode is an open-source AI coding agent distributed for terminal, IDE, and desktop workflows. The project positions the CLI as a coding assistant with a native terminal interface, LSP awareness, multi-session work, session sharing, and support for many model providers.

### Project history

The official documentation and repository present OpenCode as a rapidly distributed developer tool rather than a project with a deeply documented pre-release history. Its packaging moved across the JavaScript ecosystem, Homebrew, Arch, Windows package managers, Nix, and a beta desktop app, which reflects the AI-coding-agent pattern of shipping a local CLI plus integrations rather than only a hosted service.

The repository installation notes distinguish the project-maintained Homebrew tap from the Homebrew core formula, saying the tap is recommended for faster updates while `brew install opencode` is maintained by Homebrew and updated less frequently. That distinction matters because the package in this batch is the Homebrew formula rather than the upstream tap.

### Adoption history

OpenCode's own site makes large adoption claims, including GitHub stars, contributors, commits, and monthly developer usage. Those are project-published metrics rather than independent measurements, but they show how the project presents itself: as a mainstream open-source alternative in the coding-agent ecosystem.

### How it is used

Developers use `opencode` as an interactive agent for repository work: asking questions, requesting features, making code changes, undoing changes, and running parallel sessions. The docs list API keys as a prerequisite and describe use from a modern terminal emulator, with desktop and IDE forms for users who do not want only a TUI.

### Why package nerds care

OpenCode is package-nerdy because it is a CLI front end over a fast-moving agent stack: releases must coordinate model-provider auth, terminal UI behavior, editor integration, desktop artifacts, and package managers that update at different speeds. Its Homebrew formula is part of a broader install matrix rather than the single canonical upstream channel.

### Sources

- <https://formulae.brew.sh/formula/opencode>
- <https://github.com/anomalyco/opencode>
- <https://opencode.ai/>
- <https://opencode.ai/docs/>


## Security Notes

No matching local secret-handling manifest was found for opencode. Nucleus package metadata is still published here so future coverage has a stable package URL.



## Configuration and credential file locations

These source-backed paths show where this package keeps local settings or durable credentials. Automic Vault can use them as review targets for secret scanning, migration, and command approval.


## Credential files

- macOS: ~/Library/Application Support/opencode/auth.json, ~/Library/Application Support/opencode/account.json
- Unix: $XDG_DATA_HOME/opencode/auth.json, $XDG_DATA_HOME/opencode/account.json, ~/.local/share/opencode/auth.json, ~/.local/share/opencode/account.json
## Source Database Details

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** opencode
- **Version Scheme:** 0
- **Revision:** 0
- **Bottle Stable Root URL:** <https://ghcr.io/v2/homebrew/core>
- **Deprecated:** no
- **Disabled:** no
- **Keg Only:** no
- **URL Keys:** stable

## Other Package-Manager Records

- Nix - opencode: normalized package name match | nixpkgs package indexes: pkgs/by-name/op/opencode/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- pacman - opencode - 1.17.3-1: normalized package name match | Arch Linux sync databases: opencode from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | The open source coding agent | https://github.com/anomalyco/opencode
- MacPorts - opencode: normalized package name match | MacPorts ports tree: llm/opencode/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1
- Chocolatey - opencode: normalized package name match | Chocolatey community package catalog: opencode from http://community.chocolatey.org/api/v2/Packages?$filter=IsLatestVersion&$select=Id&$top=1000&$skiptoken='11','office365homepremium'
- Scoop - main/opencode: normalized package name match | Scoop official bucket manifest trees: bucket/opencode.json from https://api.github.com/repos/ScoopInstaller/Main/git/trees/master?recursive=1
- winget - SST.OpenCodeDesktop: normalized package name match | Windows Package Manager source index: SST.OpenCodeDesktop from https://cdn.winget.microsoft.com/cache/source.msix
- winget - SST.opencode: normalized package name match | Windows Package Manager source index: SST.opencode from https://cdn.winget.microsoft.com/cache/source.msix


## Related links

- [Terminal utility packages](https://www.automicvault.com/pkg/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Text processing packages](https://www.automicvault.com/pkg/text-processing-tools/) - Matched text, document, or structured-data processing metadata.
- [Developer build packages](https://www.automicvault.com/pkg/developer-build-tools/) - Matched build, compiler, generator, or developer workflow metadata.
- [Networking and protocol packages](https://www.automicvault.com/pkg/networking-protocol-tools/) - Matched network, protocol, or remote-service metadata.
- [node](https://www.automicvault.com/pkg/brew/node/) - Runtime dependency declared by Homebrew.
- [ripgrep](https://www.automicvault.com/pkg/brew/ripgrep/) - Runtime dependency declared by Homebrew.
- [vtcode](https://www.automicvault.com/pkg/brew/vtcode/) - Shares av.db curated category or tags: ai-coding-agent, cli, developer-tools, llm, terminal.
- [letta-code](https://www.automicvault.com/pkg/brew/letta-code/) - Shares av.db curated category or tags: ai-coding-agent, cli, developer-tools.
- [mistral-vibe](https://www.automicvault.com/pkg/brew/mistral-vibe/) - Shares av.db curated category or tags: ai-coding-agent, cli, developer-tools.
- [clive](https://www.automicvault.com/pkg/brew/clive/) - Shares av.db curated category or tags: cli, developer-tools, terminal.
- [context7-mcp](https://www.automicvault.com/pkg/brew/context7-mcp/) - Shares av.db curated category or tags: cli, developer-tools, llm.
- [gptme](https://www.automicvault.com/pkg/brew/gptme/) - Shares av.db curated category or tags: cli, developer-tools, llm, terminal.
- [gptscript](https://www.automicvault.com/pkg/brew/gptscript/) - Shares av.db curated category or tags: cli, developer-tools, llm.
- [herdr](https://www.automicvault.com/pkg/brew/herdr/) - Shares av.db curated category or tags: cli, developer-tools, terminal.
- [qwen-code](https://www.automicvault.com/pkg/brew/qwen-code/) - Both packages touch the same language runtime or ecosystem. Shared terms: agent, ai, cli, coding, developer.

## Combined YAML source

View the package source record on GitHub. [combined/opencode.yml](https://github.com/automic-vault/db/blob/main/combined/opencode.yml)


## Sources

- Nucleus package database
- Geiger risk classifier
- package-page enrichment
- curated configuration and credential file locations
- curated package history
- package version freshness
- av.db category and tag curation
- package relationship graph
- external package-manager database matches
- cross-ecosystem install command graph
- curated agent safety answer
