config 命令
config 用于查看和修改 ~/.config/zot/config.toml。
它是运行时参考页,不是 agent 使用主入口。
子命令
bash
zot --json config show
zot --json config init --library-id 123456 --api-key abcd
zot --json config init --target-profile work --library-id 123456 --api-key abcd --make-default
zot --json config set library-id 123456
zot --json config set api-key abcd --target-profile work
zot --json config profiles list
zot --json config profiles use workshow
bash
zot --json config show
zot --json --profile work config show用途:
- 看当前有效配置
- 看默认 profile
- 看当前 session 选中了哪个 profile
- 排查写权限、embedding、data dir 是否缺失
init
bash
zot --json config init --library-id 123456 --api-key abcd
zot --json config init --target-profile work --library-id 123456 --api-key abcd --make-default说明:
- 不带
--target-profile时,写到根配置 - 带
--target-profile时,写到命名 profile --make-default会同步更新默认 profile- 未显式提供
data-dir时,会尝试自动探测 Zotero 数据目录
set
bash
zot --json config set library-id 123456
zot --json config set api-key abcd --target-profile work
zot --json config set embedding-url https://api.example.com/v1/embeddings支持的 key:
data-dirlibrary-idapi-keysemantic-scholar-api-keyembedding-urlembedding-keyembedding-modeloutput-formatoutput-limitexport-style
说明:
embedding-*只支持根配置,不支持--target-profileoutput-limit需要正整数
profiles
bash
zot --json config profiles list
zot --json config profiles use work用途:
- 看有哪些命名 profile
- 把默认 profile 切到某个命名 profile
推荐用法
如果只是让 Claude Code / Codex 做 Zotero 任务,优先还是走 skills 页。
只有在这些场景下,才直接看 config:
- 环境刚装好,要初始化写凭据
- 默认 profile 不对
- doctor 报配置缺失
- 需要切换 profile 再继续任务