opencode

opencode

npm i -g opencode-ai

Installation & Configuration

  • Linux
git clone https://gitee.com/xwos/opencode ~/.config/opencode
cd ~/.config/opencode
npm i

opencode documentation: https://opencode.ai/docs/zh-cn

codegraph

Global Installation

npm i -g codegraph
codegraph install
  • Installation Options
    • opencode
    • Installed codegraph CLI on PATH
    • Apply agent configs to all your projects, or just this one?All projects

After installation, codegraph automatically writes to ~/.config/opencode/AGENTS.md and ~/.config/opencode/opencode.jsonc

Project-Level Initialization

cd <project root directory>
codegraph init

After initialization, .codegraph data is generated

  • Rebuild data
codegraph index
  • Refresh data
codegraph sync

openspec

Global Installation

npm i -g @studyzy/openspec-cn

Project-Level Initialization

  • Install
cd <project root directory>
openspec-cn init
  • Upgrade
cd <project root directory>
openspec-cn update

superpowers

Global Installation

npm i -g superpowers-zh

Project-Level Initialization

superpowers-zh --tool opencode

Workflow

openspec Workflow

    1. Start opencode
    1. /opsx-explore <requirement description>
    • If the requirement description is too long, write it into a markdown file req.md and let the AI read that file, /opsx-explore read the content of req.md
    1. Ask questions with the Agent to clarify the requirements
    1. /opsx-propose creates a proposal; openspec will create design.md, proposal.md, tasks.md
    1. /opsx-apply executes the tasks in tasks.md
Last modified July 18, 2026: feat: 增加AI笔记 (052326f)