CLI Overview
Global flags
zot supports these global flags:
| Flag | Meaning |
|---|---|
--json | Return the standard JSON envelope for scripts and agents |
--profile <name> | Select a config profile |
--library <scope> | Select library scope; only user or group:<id> is supported |
Top-level commands
The current top-level commands come from src/zot-cli/src/main.rs:
doctorconfiglibraryitemcollectionworkspacesyncmcpcompletions
JSON envelope
Success:
json
{"ok": true, "data": {}, "meta": {}}Failure:
json
{"ok": false, "error": {"code": "...", "message": "...", "hint": "..."}}Recommended runtime habits
- Run
doctorfirst in a new environment - Confirm credentials and doctor output before writes
- Prefer
--jsonfor automation - Stick to one invocation path per session:
zot ...orcargo run -q -p zot-cli -- ... - Treat feeds as explicit
library feeds/library feed-itemsflows, not as a global--libraryscope
Common starting commands
bash
zot --json doctor
zot --json config show
zot --json library search "attention" --tag transformer --creator Vaswani --year 2017
zot --json library recent --count 10
zot --json library citekey Smith2024
zot --json library semantic-status
zot --json item get ATTN001
zot --json item merge KEEP001 DUPE001
zot --json item download ATCH005
zot --json item children ATTN001
zot --json collection search Transform
zot --json workspace query llm-safety "What are the main failure modes?" --mode hybrid --limit 5
zot completions powershellCommand responsibilities
config: inspect and update runtime config, profiles, and write credentialslibrary: default read-first surface for search, enumeration, semantic flows, feeds, and duplicatesitem: single-item inspection, most write actions, attachment download, annotations, and Scitecollection: maintenance of real Zotero collections plus fine-grained collection readsworkspace: local reading workspacessync: preprint publication-status checksmcp: currently reserved, not a usable workflowcompletions: generate shell completions for bash / zsh / fish / powershell
Migrating from ref\zotero-cli
If you used ref/zotero-cli before:
recent 10now maps tolibrary recent --count 10- generic two-item merge now maps to
item merge KEY1 KEY2 - old flat top-level aliases and
--api-baseare intentionally not returning
For the full migration guide, see Migrating from ref\zotero-cli.
Migrating from ref\zotagent
If you used ref/zotagent before:
synchere is not attachment indexing; it is publication-status sync for preprintsstatushas no single equivalent command; today the real sources aredoctor+library semantic-statussearch-in,metadata,read, andexpandare not implemented yets2and import bypaperIdare also not implemented yet
For the full comparison and completion plan, see Migrating from ref\zotagent.