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

    Nju Cli

    v1.4.7工具与命令
    opencode-nju-cli

    OpenCode plugin and skill docs for Nanjing University workflows powered by nju-cli.

    GitHub 星标

    0

    月装机量

    95

    近 7 天 19

    综合评分SCORE

    32.2

    生态多维模型

    最近提交

    4 天前

    2026-08-15

    快速安装与配置

    opencode.json

    写入当前项目的 opencode.json,只对这个仓库生效。

    opencode.json

    {
      "$schema": "https://opencode.ai/config.json",
      "plugin": ["opencode-nju-cli@1.4.7"]
    }

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

    This package provides an OpenCode plugin for nju-cli, with bundled OpenCode-compatible skill docs for Nanjing University workflows.

    Install

    Add the npm plugin to opencode.json:

    {
      "$schema": "https://opencode.ai/config.json",
      "plugin": ["opencode-nju-cli"]
    }
    

    OpenCode installs npm plugins automatically at startup with Bun.

    That is the full install path. Users do not need to copy skill files manually.

    Tools

    The plugin exposes two tools:

    • nju_cli: runs nju-cli, downloading the release binary on first use when needed.
    • nju_cli_docs: reads the bundled skill guidance before choosing a subcommand.

    Example prompt:

    用 nju_cli_docs 看一下 ehall 怎么查培养方案,然后用 nju_cli 查询。
    

    Optional Native OpenCode Skill

    The npm package already contains skills/nju-cli/SKILL.md, and the plugin exposes it through nju_cli_docs.

    OpenCode's native skill tool only discovers skills from configured skill directories:

    • .opencode/skills/<name>/SKILL.md
    • ~/.config/opencode/skills/<name>/SKILL.md
    • .claude/skills/<name>/SKILL.md
    • ~/.claude/skills/<name>/SKILL.md
    • .agents/skills/<name>/SKILL.md
    • ~/.agents/skills/<name>/SKILL.md

    Only copy skills/nju-cli if you specifically want nju-cli to appear in that native skill tool list:

    mkdir -p ~/.config/opencode/skills
    cp -R skills/nju-cli ~/.config/opencode/skills/
    

    For project-local use, copy skills/nju-cli to .opencode/skills/nju-cli.

    CLI Binary

    The package includes wrappers under scripts/. It does not store release binaries in Git or npm. On first use, the wrapper downloads the matching nju-cli release artifact from GitHub Releases, caches the extracted binary under the user cache directory, and verifies it against scripts/nju-cli.sha256.

    Use the NJU GitHub release mirror when GitHub is slow or unavailable:

    nju-cli --download-mirror=nju --help
    

    Supported release targets:

    • Linux x86_64
    • Linux aarch64
    • macOS Apple Silicon
    • Windows x86_64

    The nju-cli binary is built and released from https://github.com/nju-cli/nju-cli.

    Development

    Dry-run the npm package contents:

    npm pack --dry-run