npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

botrun-oc

v0.7.6

Published

一行指令跑 NCHC 國網多模型 — 設定 NCHC_GENAI_API_KEY 就能用

Readme

botrun-oc

這是什麼?為什麼你需要它?

想像你是公務員,每天要寫公文。現在國網中心(NCHC)提供了 5 個 AI 模型可以幫你寫公文,但問題是:

  • 哪個模型寫得最好? 5 個模型各有長短,你不知道該用哪個
  • 怎麼大量測試? 手動一個一個試太慢了
  • 怎麼客觀評分? 靠人眼看太主觀

botrun-oc 就是來解決這些問題的。

它怎麼運作?

┌─────────────┐     botrun-oc direct    ┌──────────────────┐
│             │ ──────────────────────→ │  NCHC 國網中心    │
│  Claude Code │     (直接打 API)       │  5 個 AI 模型     │
│  (自動化)   │                         │  24b/123b/675b    │
│             │     botrun-oc agent     │  /14b/120b        │
│             │ ──────────────────────→ │                  │
│             │   (agentic AI 模式)    │                  │
└─────────────┘                         └──────────────────┘
       │
       │ 自動評分、比較、產出排行榜
       ▼
┌─────────────────────────────────────────┐
│  公文品質排行榜                           │
│  🥇 123b Devstral 123B — 95 分          │
│  🥈 675b Mistral-Large — 90 分          │
│  🥉 14b  Ministral 14B — 82 分          │
└─────────────────────────────────────────┘

大白話說就是

  1. 你準備一批公文題目(例如「請草擬設備費流用至業務費的簽呈」)
  2. Claude Code 自動跑 botrun-oc,把同一個題目丟給 5 個模型
  3. 兩種方式都測
    • direct — 直接打 API,測模型的「基本寫作能力」
    • agent — 透過 opencode 的 agentic AI,測模型的「找舊公文 → 分析 → 寫新公文」完整能力
  4. Claude Code 自動評分:格式正不正確?用語專不專業?邏輯通不通順?
  5. 產出排行榜:哪個模型最適合寫哪類公文,一目了然

為什麼用 Claude Code?

因為 Claude Code 本身就是一個強大的 AI 助手,它可以:

  • 寫腳本 — 自動生成測試公文題目
  • 跑指令 — 自動執行 botrun-oc directbotrun-oc agent
  • 讀輸出 — 自動收集每個模型的回答
  • 評分 — 用 AI 判斷公文品質(格式、用語、邏輯、完整度)
  • 整理報告 — 自動產出排行榜和分析報告

人類只需要下一道指令,剩下全自動。

30 秒試玩(不用安裝)

sk-你的金鑰 換成你的 NCHC API Key,貼上就能跑:

# 直接打 API — 問最小的模型一個問題
NCHC_GENAI_API_KEY=sk-你的金鑰 npx botrun-oc direct 14b "用三句話介紹台灣"

# 看有哪些模型
npx botrun-oc list

# 用推薦模型寫公文
NCHC_GENAI_API_KEY=sk-你的金鑰 npx botrun-oc direct "請草擬設備費流用至業務費的簽呈"

# agentic AI 模式(opencode 會自動安裝,不用自己裝)
NCHC_GENAI_API_KEY=sk-你的金鑰 npx botrun-oc agent 123b "請草擬設備費流用至業務費的簽呈"

用一行指令跑 NCHC 國網中心的 5 個大語言模型。

兩種模式:

  • direct — 直接打 API,不需額外安裝任何東西
  • agent — 透過 opencode 跑 agentic AI,支援工具使用、多輪推理(opencode 自動安裝,不用自己裝)

給非技術人的懶人包

你需要什麼?

  1. 一台有 Node.js 的電腦(版本 20 以上)
    • 打開終端機(Mac 叫「終端機」,Windows 叫「命令提示字元」或「PowerShell」)
    • 輸入 node -v 看看有沒有裝。如果沒有,去 https://nodejs.org 下載安裝
  2. 一組 NCHC API Key
    • 到 https://iservice.nchc.org.tw 申請
    • 拿到的 Key 長得像 sk-xxxxxxxx
  3. 就這樣! 不用另外裝 opencode,agent 模式第一次跑時會自動幫你裝好

第一步:安裝

打開終端機,貼上這行,按 Enter:

npm install -g botrun-oc

第二步:設定 API Key

貼上這兩行(把 sk-你的金鑰 換成你自己的 Key):

mkdir -p ~/.botrun-oc
echo "NCHC_GENAI_API_KEY=sk-你的金鑰" > ~/.botrun-oc/.env

設定一次就好,以後不用再設。

第三步:開始用!

# Direct 模式 — 簡單問答
botrun-oc direct "用三句話介紹台灣"

# Agent 模式 — agentic AI(第一次會自動裝 opencode,等一下就好)
botrun-oc agent "請草擬設備費流用至業務費的簽呈"

# 指定模型
botrun-oc direct 14b "什麼是量子電腦?"

# 看有哪些模型可以用
botrun-oc list

不想安裝?用 npx 試玩

完全不用安裝,貼上就能跑(把 Key 換成你的):

NCHC_GENAI_API_KEY=sk-你的金鑰 npx botrun-oc direct 14b "你好"

兩種模式說明

Direct 模式(簡單快速)

直接用 Node.js 呼叫 NCHC API,不需要安裝其他東西。

# 用推薦模型
botrun-oc direct "請草擬設備費流用至業務費的簽呈"

# 指定模型
botrun-oc direct 675b "請草擬計畫變更申請公文"
botrun-oc direct 14b "用三句話介紹台灣"

需要:NCHC_GENAI_API_KEY

Agent 模式(agentic AI)

透過 opencode 執行,支援工具使用、多輪推理、程式碼生成等進階能力。

不用自己裝 opencode! 第一次跑 agent 時會全自動處理:

  1. 自動安裝 opencode CLI
  2. 自動寫入 NCHC provider 設定
  3. 自動從你的 NCHC_GENAI_API_KEY 設定認證

你只需要跟 direct 一樣設好 API Key 就好。

# 用推薦模型
botrun-oc agent "請草擬設備費流用至業務費的簽呈"

# 指定模型
botrun-oc agent 123b "分析這份公文的問題並改寫"

需要:NCHC_GENAI_API_KEY(跟 direct 一樣)+ curl(用於自動安裝 opencode)


所有指令

| 指令 | 說明 | |------|------| | botrun-oc direct [模型] "prompt" | Direct API 模式 | | botrun-oc agent [模型] "prompt" | Agentic AI 模式(opencode 自動安裝) | | botrun-oc list | 列出所有支援模型 | | botrun-oc setup | 顯示設定引導 | | botrun-oc log | 查看最近 20 筆執行歷史 | | botrun-oc help | 顯示完整說明 | | botrun-oc --version | 顯示版號 |

模型可以省略,省略時使用推薦模型 123b(Devstral 123B)。

支援模型

| 別名 | 模型 | 等級 | 備註 | |------|------|------|------| | 24b | Devstral-Small 24B | small | 小模型,可能搞反方向 | | 123b | Devstral 123B | 推薦 | 最均衡,預設選擇 | | 675b | Mistral-Large 675B | large | 最強但可能自己寫檔案 | | 14b | Ministral 14B | small | CP 值之王,要精心設計 prompt | | 120b | Nemotron 120B (MoE) | moe | 中文公文理解力不足 |

API Key 設定方式(擇一)

# 方法 1: 全域設定(推薦,設一次永久生效)
mkdir -p ~/.botrun-oc
echo "NCHC_GENAI_API_KEY=sk-你的金鑰" > ~/.botrun-oc/.env

# 方法 2: 專案目錄放 .env 檔
echo "NCHC_GENAI_API_KEY=sk-你的金鑰" > .env

# 方法 3: 環境變數(臨時用)
export NCHC_GENAI_API_KEY=sk-你的金鑰

已知注意事項

  • 675b (Mistral-Large) 可能自行寫檔案,prompt 需明確禁止
  • 24b (Devstral-Small) 小模型可能搞反流用方向
  • 120b (Nemotron MoE) 中文公文理解力不足,常用佔位符
  • 所有模型產出都需人工審核

License

MIT