Package Exports
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (scimaster-cli) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
scimaster-cli
命令行版的 SciMaster 文献检索工具。通过 PasaMaster 上游服务搜索学术论文,一行命令拿到论文清单 + BibTeX。
安装
全局安装
npm install -g scimaster-cli
sci --help直接通过 npx 运行(无需安装)
npx scimaster-cli search "CRISPR gene editing"注:
bin名为sci,包名为scimaster-cli。npx scimaster-cli会自动映射到唯一的sci入口。
环境要求
- Node.js ≥ 20
快速开始
# 1. 配置 API Key(首次使用)
sci init
# 2. 选择 muse-api 环境(local / test / uat / prod)
sci env test
# 3. 选择 PasaMaster 搜索档位(影响是否扣费)
sci model # 交互式选择
sci model low # 或直接指定
# 4. 搜索论文
sci search "CRISPR gene editing 2024"
sci search "machine learning protein" --limit 20
sci search "cancer immunotherapy" --mode mid --out ./papers命令速查
sci init
交互式配置 API Key。已有 Key 会询问是否覆盖。
sci env [name]
切换 muse-api 后端环境,预设:
| 别名 | URL |
|---|---|
local |
http://127.0.0.1:8000 |
test |
https://scimaster.test.bohrium.com |
uat |
https://scimaster.uat.bohrium.com |
prod |
https://scimaster.bohrium.com |
sci env # 交互式选择
sci env prod # 直接切到 prod
sci env --show # 查看当前环境切换环境不会清空 API Key——不同环境的 Key 通常不通用,必要时重新跑 sci init。
sci model [mode]
切换 PasaMaster 搜索档位:
| 档位 | 说明 |
|---|---|
ultra_low |
极速档:只走 SN 检索,不调用 LLM,不扣费 |
low |
基础档:触发 LLM 排序,按 token 扣费(默认推荐) |
mid |
增强档:深度 LLM 评估,扣费更高 |
high |
极致档:最重模式,扣费最高 |
sci model # 交互式选择
sci model mid # 直接切到 mid
sci model --show # 查看当前档位sci search <query> [options]
搜索论文,结果输出为表格 + 写盘 .json / .bib。
sci search "<query>" \
--limit 10 \ # 返回篇数,默认 10
--mode <pasa-mode> \ # 临时覆盖档位,不写盘
--out ./papers \ # 输出目录,默认 .
--prefix search-results # 输出文件名前缀,默认 search-resultsMCP 集成(Claude Code / Cursor)
scimaster-cli 还内置了 Model Context Protocol (MCP) stdio server:sci-mcp。装好包后,可直接让 Claude Code / Cursor 等 MCP 客户端通过 tool-call 调用论文检索,无需走 shell 解析表格输出。
注册到 Claude Code
claude mcp add --transport stdio scimaster -- npx -y scimaster-cli sci-mcp或者手工编辑 ~/.claude/settings.json:
{
"mcpServers": {
"scimaster": {
"command": "npx",
"args": ["-y", "scimaster-cli", "sci-mcp"]
}
}
}如果已全局安装:
{
"mcpServers": {
"scimaster": {
"command": "sci-mcp"
}
}
}注册到 Cursor
.cursor/mcp.json(项目级)或 ~/.cursor/mcp.json(用户级):
{
"mcpServers": {
"scimaster": {
"command": "sci-mcp"
}
}
}暴露的 Tool
| Tool | 说明 |
|---|---|
search_papers |
输入 query / limit / mode,返回结构化论文清单(与 CLI sci search 共享同一份业务逻辑) |
返回结构(structured content):
{
"query": "CRISPR gene editing",
"limit": 10,
"mode": "low",
"count": 10,
"papers": [
{ "id": "arxiv:...", "title": "...", "authors": ["..."], "year": 2024,
"abstract": "...", "doi": "...", "url": "...", "bib": "@article{...}" }
]
}前置要求
sci-mcp 读取 ~/.scimaster/config.json 拿 API Key 和 baseUrl,所以首次使用前必须先在终端跑过:
sci init
sci env test # 或其他环境
sci model low # 或其他档位之后 MCP server 拿着这份本地配置去调 muse-api,跟你在终端跑 sci search 走同一份配置。
配置文件
~/.scimaster/config.json # 文件权限 0600,含 API Key字段:
{
"version": 1,
"apiKey": "<your-api-key>",
"apiBaseUrl": "https://scimaster.test.bohrium.com",
"defaults": {
"limit": 10,
"mode": "low"
}
}也可用环境变量 / 命令行覆盖:
sci --setApiKey <key> # 不走交互直接写 Key错误处理
| 场景 | 提示 | 退出码 |
|---|---|---|
| 未配置 API Key | 提示 sci init |
1 |
| API Key 无效 (401) | 提示重新 sci init |
1 |
| 网络超时 (5min) | 提示检查网络 | 1 |
| Rate Limit (429) | 自动重试,最多 3 次 | — |
| 非法档位 / 环境 | 列出允许值 | 1 |