opencode
less than a minute
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
opencodeInstalled codegraph CLI on PATHApply 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
-
- Start opencode
-
/opsx-explore <requirement description>
- If the requirement description is too long, write it into a markdown file
req.mdand let the AI read that file,/opsx-explore read the content of req.md
-
- Ask questions with the Agent to clarify the requirements
-
/opsx-proposecreates a proposal;openspecwill createdesign.md,proposal.md,tasks.md
-
/opsx-applyexecutes the tasks intasks.md