GitHub 星标
0
月装机量
101
近 7 天 2
综合评分SCORE
25.6
生态多维模型
最近提交
4 个月前
2026-04-14
快速安装与配置
opencode.json写入当前项目的 opencode.json,只对这个仓库生效。
opencode.json
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["opencode-crof-auth@0.3.2"]
}写入 ~/.config/opencode/opencode.json,对所有项目生效。
~/.config/opencode/opencode.json
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["opencode-crof-auth@0.3.2"]
}若你要在本地改造这个插件,先装到项目里再从本地路径引用。
shell
pnpm add -D opencode-crof-authopencode 启动时会通过内嵌运行时自动加载 npm 依赖并缓存至本地目录,无需手动在全局环境执行安装。
README.md
查看原始文件→CrofAI provider plugin for OpenCode - auth, model discovery
Features
- API Key Authentication - Login with your CrofAI API key
- Auto Model Discovery - Models fetched dynamically from CrofAI API
Quick Setup
Run the setup script to install everything automatically:
bunx opencode-crof-auth
This will:
- Install the plugin via
opencode plugin - Add the crofai provider to your opencode.json
Direct Login
You can also provide your API key directly:
bunx opencode-crof-auth nahcrof_your-api-key
Or specify a custom config path (any order):
bunx opencode-crof-auth /path/to/config.json nahcrof_your-api-key
Manual Installation
If you prefer to do it step by step:
# 1. Install the plugin
opencode plugin opencode-crof-auth -g
# 2. Add the provider config to your opencode.json:
{
"provider": {
"crofai": {}
}
}
Usage
- Run
opencode auth loginand search for "crofai" in the interactive prompt - Enter your API key (starts with
nahcrof_) - Select a CrofAI model using
/modelsor setmodel: crofai/xxxin your config
Note: Direct command
opencode auth login crofaimay not work on some OpenCode versions. Use the interactive search instead.
Credits
License
MIT