Open Code 命令速查

Open Code CLI 命令在线速查:涵盖会话管理、模型切换、插件系统、配置管理等常用命令,点击命令即可复制。

未找到匹配的命令,请尝试其他关键词

会话管理

操作命令
启动交互会话open-code
单次执行open-code run "你的提示词"
继续会话open-code continue
列出历史open-code history
清除历史open-code clear
查看版本open-code --version
显示帮助open-code --help

模型切换与管理

⚠️ Open Code 支持多模型后端,可动态切换
操作命令
查看当前模型open-code model get
切换到 GPT-4open-code model use gpt-4
切换到 Claudeopen-code model use claude-3-opus
切换到本地模型open-code model use llama2:70b
列出可用模型open-code model list
设置默认模型open-code model default gpt-4-turbo

插件系统

操作命令
安装插件open-code plugin install plugin-name
卸载插件open-code plugin uninstall plugin-name
列出已安装open-code plugin list
搜索插件open-code plugin search keyword
更新插件open-code plugin update plugin-name
启用插件open-code plugin enable plugin-name
禁用插件open-code plugin disable plugin-name

配置管理

操作命令
查看配置open-code config show
设置 API Keyopen-code config set api_key YOUR_KEY
设置温度open-code config set temperature 0.7
设置 max_tokensopen-code config set max_tokens 4096
重置配置open-code config reset
编辑配置文件open-code config edit
配置文件路径~/.open-code/config.json

故障排查

① 命令未找到

根因:open-code 未安装或不在 PATH · 解法:检查安装和环境变量
操作命令
检查安装which open-code
重新安装npm install -g @open-code/cli

② 模型连接失败

根因:API Key 无效或模型不可用 · 解法:验证 API Key 并切换模型
操作命令
测试连接open-code model test
切换模型open-code model use gpt-4

③ 插件加载失败

根因:插件版本不兼容或依赖缺失 · 解法:更新或重装插件
操作命令
检查日志open-code plugin logs plugin-name
重装插件open-code plugin reinstall plugin-name

④ 会话数据丢失

根因:缓存损坏或磁盘空间不足 · 解法:清理缓存并重启
操作命令
清理缓存open-code cache clear
检查磁盘df -h
您的足迹: