GPT
相关工具集
GPT私有化部署
部署ChatGPT网页应用
DeepSeek
VsCode集成
Open Web-UI
Ollama
keep AI告警
FastGPT工作流
Dify 工作流
n8n工作流
Hexstrike-AI 渗透测试
Opencode
nodejs
本文档使用MrDoc发布
返回首页
-
+
Opencode
2025年12月24日 00:57
admin
#安装opencode https://opencode.ai/ --- ####安装基础工具 yum -y install tar net-tools --- ####推荐使用rocky9.x版本的linux部署 curl -fsSL https://opencode.ai/install | bash --- #npm安装法 npm i -g opencode-ai --- #启动 ##启动(TUI) 运行OpenCode会启动当前目录的TUI。 opencode --- 或者你可以为特定的工作目录启动它。 opencode /path/to/project ##启动(web) opencode web --port 4096 opencode web --hostname 0.0.0.0 opencode web --cors https://example.com --- ####账号密码登录 OPENCODE_SERVER_PASSWORD=secret opencode web #用户名默认为opencode,但可以通过OPENCODE_SERVER_USERNAME更改。 --- #常用命令 https://opencode.ai/docs/cli/ ####直接执行问题 opencode run "Explain how closures work in JavaScript" --- ####连接 opencode attach [url] --- ####mcp opencode mcp add opencode mcp [command] opencode mcp ls opencode mcp debug <name> --- #Agent Skills https://opencode.ai/docs/skills/ --- 项目配置: .opencode/skills/<name>/SKILL.md 全局配置: ~/.config/opencode/skills/<name>/SKILL.md 兼容Project Claude: .claude/skills/<name>/SKILL.md 全局兼容Claude: ~/.claude/skills/<name>/SKILL.md --- ####每个 SKILL.md 都必须以YAML前置词开始。只有以下字段被识别: 姓名(必备) 描述(必填) 许可证(可选) 兼容性(可选) 元数据(可选的字符串到字符串映射) name (required) description (required) license (optional) compatibility (optional) metadata (optional, string-to-string map) ####例子: Use an example Create .opencode/skills/git-release/SKILL.md like this: --- name: git-release description: Create consistent releases and changelogs license: MIT compatibility: opencode metadata: audience: maintainers workflow: github --- ## What I do - Draft release notes from merged PRs - Propose a version bump - Provide a copy-pasteable `gh release create` command ## When to use me Use this when you are preparing a tagged release. Ask clarifying questions if the target versioning scheme is unclear. #卸载 opencode uninstall #升级 opencode upgrade --- #安装superpowers #在opencode中输入 Fetch and follow instructions from https://raw.githubusercontent.com/obra/superpowers/refs/heads/main/.opencode/INSTALL.md https://opencode.ai/ --- #安装oh my opencode npx oh-my-opencode install ---
分享到: