# opencode を Homebrew, chocolatey, MacPorts, Nix, pacman, scoop, winget でインストール

opencode のインストール経路、実行ファイル、メタデータ、AI エージェント向けセキュリティノートを確認します。

## インストール

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

## エージェント安全性の回答

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

- **認証情報アクセス:** May access repository files, tool configs, and environment variables available to the agent session.
- **リモート変更:** Can trigger local tools that mutate Git, cloud, or package state.
- **公開/成果物リスク:** Can generate code or commands that become release artifacts.
- **推奨コントロール:** Run under containment and gate sensitive tool actions.
- **エージェント利用ガイダンス:** Use with scanned worktrees; require approval before commands that expose credentials or mutate remote systems.

追加のインストールコマンド:

### macOS

- Homebrew (100%):

```sh
brew install opencode
```

  証拠: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install opencode
```

  証拠: 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
```

  証拠: 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
```

  証拠: 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
```

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

- Scoop (92%):

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

  証拠: 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
```

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

## パッケージ情報

- **パッケージキー:** brew:opencode
- **パッケージマネージャ:** Homebrew
- **パッケージマネージャページ:** <https://formulae.brew.sh/formula/opencode>
- **バージョン:** 1.18.10
- **ソース概要:** AI coding agent, built for the terminal
- **ホームページ:** <https://opencode.ai>
- **上流ドキュメント:** <https://opencode.ai>
- **ライセンス:** MIT
- **ソースアーカイブ:** <https://registry.npmjs.org/opencode-ai/-/opencode-ai-1.18.10.tgz>
- **最終更新:** 2026-08-01T03:38:36Z
- **生成日時:** 2026-08-04T22:13:35+00:00

## 実行可能ファイル

- opencode (cli)
- opencode (エイリアス)

## 依存関係

- node
- ripgrep

## インストール挙動

- post-install フック: 未定義
- Bottle: 利用可能 対象 arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux

## バージョンと鮮度

- ページ生成日: 2026-08-04
- マネージャ版: 1.18.10
- マネージャ更新日: 2026-08-01
- ローカルデータ: OK
- 上流リポジトリ: https://opencode.ai
- 情報: Release/tag comparison is only available for GitHub repositories.
## プロジェクトの歴史と使われ方

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.

### プロジェクトの歴史

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.

### 採用の歴史

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.

### 使われ方

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.

### パッケージ好きにとっての重要性

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.

### ソース

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


## セキュリティノート

opencode に一致するローカルシークレット処理マニフェストは見つかりませんでした。将来の対応で安定したパッケージ 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:** 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

## 他のパッケージマネージャ記録

- 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.18.12-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','nvs'
- 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


## 関連リンク

- [MCP tool packages](https://pkg.so/ja/mcp-tools/) - Mentions MCP or Model Context Protocol.
- [AI and agent packages](https://pkg.so/ja/ai-agent-tools/) - Matched AI model, agent, coding-agent, orchestration, or MCP metadata.
- [Terminal utility packages](https://pkg.so/ja/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Developer build packages](https://pkg.so/ja/developer-build-tools/) - Matched build, compiler, generator, or developer workflow metadata.
- [node](https://pkg.so/ja/brew/node/) - Runtime dependency declared by Homebrew.
- [ripgrep](https://pkg.so/ja/brew/ripgrep/) - Runtime dependency declared by Homebrew.
- [vtcode](https://pkg.so/ja/brew/vtcode/) - Shares pkgdb curated category or tags: ai, ai-coding-agent, cli, coding-agents, llm.
- [rtk](https://pkg.so/ja/brew/rtk/) - Shares pkgdb curated category or tags: ai, cli, coding-agents, developer-tools, llm.
- [mimo-code](https://pkg.so/ja/brew/mimo-code/) - Shares pkgdb curated category or tags: ai, cli, coding-agents, developer-tools, terminal.
- [qqqa](https://pkg.so/ja/brew/qqqa/) - Shares pkgdb curated category or tags: ai, cli, coding-agents, llm, terminal.
- [zero](https://pkg.so/ja/brew/zero/) - Shares pkgdb curated category or tags: ai, cli, coding-agents, developer-tools, terminal.
- [pixtuoid](https://pkg.so/ja/brew/pixtuoid/) - Shares pkgdb curated category or tags: ai, cli, coding-agents, developer-tools, terminal.
- [gemini-cli](https://pkg.so/ja/brew/gemini-cli/) - Shares pkgdb curated category or tags: ai, cli, coding-agents, terminal.
- [qwen-code](https://pkg.so/ja/brew/qwen-code/) - Shares pkgdb curated category or tags: ai, cli, coding-agents, llm.
- [opencode-ai](https://pkg.so/ja/npm/opencode-ai/) - Executable or command metadata overlaps with this package. Shared terms: agent, agents, ai, cli, coding.

## Combined YAML source

View the package source record on GitHub. [combined/opencode.yml](https://github.com/mxcl/pkgdb/blob/main/combined/opencode.yml)


## ソース

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