| name | zotero |
| description | Manage the user's Zotero library โ search papers, add/organize items, export citations, OCR PDFs, and run semantic search (RAG). Use whenever the user mentions Zotero, "ๆ็ๆ็ฎๅบ", finding/adding/citing papers, "ๅ่ๆ็ฎ", "ๆ็ฎ็ปผ่ฟฐ", or wants to read/extract content from their PDFs. Requires Zotero desktop running with the zotron XPI plugin. Check with `zotron ping`. |
Zotero
Read-write bridge to the user's local Zotero library via the zotron CLI and Zotero-side XPI plugin.
Dependency: The zotron CLI must be on PATH, and Zotero desktop must be running with the XPI plugin installed.
Before your first CLI call, check:
command -v zotron โ if missing, run /zotron:setup which handles the full install chain (cargo-binstall โ GitHub Releases โ mirror fallback โ cargo install from source).
zotron ping โ if it fails, ask the user to start Zotero; if the XPI was never installed, run /zotron:setup
Do not curl HTTP endpoints directly; always use the zotron CLI.
Pick a workflow
| User intent | Workflow | Sub-file |
|---|
| Find / read papers, browse collections, get fulltext or annotations | search | search.md |
| Add by DOI/URL/ISBN/file, update metadata, manage collections & tags, dedupe | manage | manage.md |
| Generate references in GB/T 7714, BibTeX, RIS, CSL-JSON | export | export.md |
| OCR scanned/Chinese PDFs into hidden per-PDF raw/block/chunk sidecars | ocr | ocr.md |
| RAG retrieval hits for literature review / academic-zh span provenance | rag | rag.md |
A typical session chains them: search to locate papers โ manage to organize โ ocr + rag for literature review โ export for citations.
CLI conventions
All commands use the zotron CLI with noun-verb structure:
zotron <namespace> <verb> [args] [--flags]
Typed subcommands cover normal operations โ always prefer these over raw RPC:
zotron ping
zotron search "ๆฐๅญ็ปๆต" --limit 10
zotron search "ๆฐๅญ็ปๆต" --collection "ๅฎ่งๅ ๅญ" --limit 10
zotron collections get-items "ๅฎ่งๅ ๅญ" --limit 20
zotron items get YR5BUGHG
zotron items fulltext YR5BUGHG
zotron notes list --parent YR5BUGHG
zotron items attachments YR5BUGHG
zotron annotations list YR5BUGHG
zotron annotations create YR5BUGHG --quote "่ฆ้ซไบฎ็ๆๅญ"
zotron tags add YR5BUGHG --tag "ๅทฒ่ฏป"
zotron collections tree
zotron export YR5BUGHG
zotron settings list
zotron system schema
zotron system schema --type journalArticle
zotron system methods
Keys (primary): All item-scoped commands accept an 8-char item key (YR5BUGHG) as the primary identifier. RPC params use key/parentKey/keys โ never id/parentId. Collections accept 8-char key or name ("ๆฐๅญ็ปๆต").
Search vs collection browsing:
zotron search "ๅ
ณ้ฎ่ฏ" searches the whole library.
zotron search "ๅ
ณ้ฎ่ฏ" --collection "้ๅๅ" searches only items in that collection.
zotron search "ๅ
ณ้ฎ่ฏ" --fulltext searches inside PDF content, not just metadata.
zotron collections get-items "้ๅๅ" lists items in a collection; use this when the user asks "่ฟไธช้ๅ้ๆไปไน".
zotron collections items "้ๅๅ" is an alias for get-items.
Filtering output: zotron outputs JSON. Pipe to jq for filtering. Many list/search commands return an envelope such as {"items":[...],"total":N}, so filter through .items[]:
zotron search "ๆฐๅญ็ปๆต" | jq '.items[].title'
zotron collections get-items "ๅฎ่งๅ ๅญ" | jq '.items[].title'
zotron collections tree | jq '.[] | {key, name}'
The CLI does not have built-in --jq; use external jq.
Discovery:
zotron --help โ list all namespaces
zotron <namespace> --help โ list subcommands in a namespace
zotron system methods โ list all RPC methods
zotron system methods items.get โ describe a specific method's parameters
Web academic search
Search public academic databases and import papers:
zotron web search "query" [--limit N] [-s openalex|crossref|s2|arxiv]
zotron web fetch --doi 10.1038/xxx | zotron push
zotron web fetch --arxiv 2301.00001 | zotron push
Default source is OpenAlex (250M records). fetch cascades open-access PDF
resolvers (Unpaywall, DOAJ, CORE, fatcat, publisher-direct) and attaches the
PDF when one downloads. Optional keys live in Zotero Settings -> Zotron ->
Data Sources; everything works keyless.