跳到主要内容
    ↑↓ 选择↵ 打开esc 关闭
    中文English
    byBackfish

    Crof Auth

    v0.3.2认证与凭证
    opencode-crof-auth

    CrofAI authentication provider plugin for OpenCode

    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"]
    }

    opencode 启动时会通过内嵌运行时自动加载 npm 依赖并缓存至本地目录,无需手动在全局环境执行安装。

    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:

    1. Install the plugin via opencode plugin
    2. 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

    1. Run opencode auth login and search for "crofai" in the interactive prompt
    2. Enter your API key (starts with nahcrof_)
    3. Select a CrofAI model using /models or set model: crofai/xxx in your config

    Note: Direct command opencode auth login crofai may not work on some OpenCode versions. Use the interactive search instead.

    Credits

    License

    MIT