Getting Started
Keep this framing in mind
The primary interface in this repository is zot-skills, not the subcommand list.
zot-skillsdecides what kind of Zotero content the user is asking for- Rust
zotperforms the actual reads, retrieval, indexing, and writes - The CLI pages remain reference material for debugging, scripts, and direct invocation
If the agent is supposed to find papers, read PDFs, extract annotations, build a topic workspace, or update Zotero items, start from the skill-first path.
If you are migrating from ref/zotero-cli, read Migrating from ref\zotero-cli first. If you are migrating from ref/zotagent, also read Migrating from ref\zotagent.
What the skill can surface from Zotero
- Item metadata: title, creators, year, item type, citation, child items
- Evidence: PDF full text, outline, annotations, notes
- Organization: tags, collections, libraries, feeds
- Working sets: workspace creation, semantic indexing, semantic query/search
- Controlled writes: notes, tags, collections, imports, duplicate merge, publication-status sync
Recommended startup sequence
1. Install the skill
npx skills add https://github.com/bahayonghang/zotero-cli --skill zot-skills2. Provide the runtime
cargo install --git https://github.com/bahayonghang/zotero-cli.git zot-cli --locked3. Run one doctor check
zot --json doctorIf you are developing inside this repository and zot is not installed on PATH:
cargo run -q -p zot-cli -- --json doctorPick one invocation path and keep it consistent for the session.
If doctor shows missing write_credentials and you only need local search, PDF reads, outlines, annotation reads, or local indexing, that is safe to ignore. Those credentials only matter for Zotero Web API writes.
If doctor shows pdf_backend.available=false on a supported platform, zot will auto-download a managed Pdfium binary the first time a local PDF read actually needs it. doctor itself does not trigger the download.
4. Configure writes and saved-search support when needed
If you plan to:
- write notes, tags, or collection membership
- create or delete saved searches
- run publication-status sync
initialize config first:
zot config init --library-id <your library id> --api-key <your api key>If you want a separate named profile:
zot config init --target-profile work --library-id <your library id> --api-key <your api key> --make-defaultWhat users can ask directly
- “Find papers in my library about reward hacking.”
- “Pull the PDF annotations and notes for this paper.”
- “Create an
llm-safetyworkspace and import the relevant papers.” - “Check whether this preprint has an official publication record now.”
- “Add a note and a
prioritytag to this item.”
These are all first-class zot-skills requests.
For fuller phrasing patterns, read Agent Usage.
When to drop to direct commands
Direct runtime calls are more appropriate when:
- you are debugging the environment
- you want to verify a specific subcommand response
- you are writing scripts or regression tests
- you need to inspect
doctor, indexing, or write prerequisites explicitly
Common starting points:
zot --json doctor
zot --json library search "reward hacking" --limit 10
zot --json item get ATTN001
zot --json item annotation list --item-key ATTN001
zot --json workspace query llm-safety "What are the main failure modes?" --mode hybrid --limit 5When to run doctor first
Run doctor first when:
- you are in a new environment
- you are about to mutate the library
- the task depends on PDF / outline / annotation support
- you want library semantic indexing or search
- workspace indexing or query is failing
- you are doing Better BibTeX citekey lookup
- the user says “why is this broken”
Pay special attention to:
db_existswrite_credentials.configuredpdf_backend.availablebetter_bibtex.availablelibraries.feeds_availablesemantic_indexannotation_supportembedding.configured
Repository commands
Common repository commands from the root:
just build
just install
just cijust ci runs, in order:
cargo fmt --all --checkcargo check --workspacecargo clippy --workspace --all-targets -- -D warningscargo test --workspace
Configuration
- Config file:
~/.config/zot/config.toml - Workspace root:
~/.config/zot/workspaces
Common environment variables:
ZOT_DATA_DIRZOT_LIBRARY_IDZOT_API_KEYZOT_PDFIUM_LIB_PATHZOT_PDFIUM_CACHE_DIRZOT_EMBEDDING_URLZOT_EMBEDDING_KEYZOT_EMBEDDING_MODELSEMANTIC_SCHOLAR_API_KEYS2_API_KEY
Optional integration overrides:
ZOT_BBT_PORTZOT_BBT_URLPDFIUM_LIB_PATHZOT_SCITE_API_BASEZOT_CROSSREF_API_BASEZOT_UNPAYWALL_API_BASEZOT_PMC_API_BASEZOT_SEMANTIC_SCHOLAR_GRAPH_BASE
Preview the docs site locally
The docs site lives in docs/ and uses VitePress:
cd docs
npm install
npm run devProduction build:
cd docs
npm run build