Skip to content

Command reference

Auto-generated from the zot CLI (v0.5.1) — do not edit by hand; run python scripts/gen_cli_reference.py.

Global flags on every command: --json, -q/--quiet, --debug, --yes, --base/--token/--user-id (or ZOTERO_AGENT_*). Exit codes: 0 ok, 1 error, 2 connection/exec, 3 not-found, 4 config.

zot search [-h] [--base BASE] [--token TOKEN] [--user-id USER_ID] [-q]
[--debug] [-y] [--json] [--limit LIMIT] [--all]
[--item-type ITEM_TYPE] [--tag TAG]
query
ArgumentDescription
query
--limit
--allfetch all results (paginate)
--item-type
--tag
zot get [-h] [--base BASE] [--token TOKEN] [--user-id USER_ID] [-q]
[--debug] [-y] [--json]
key
ArgumentDescription
keyZotero item key, or a BBT citekey (prefix @ to force)
zot cite [-h] [--base BASE] [--token TOKEN] [--user-id USER_ID] [-q]
[--debug] [-y] [--json]
citekey
ArgumentDescription
citekey
zot pdf [-h] [--base BASE] [--token TOKEN] [--user-id USER_ID] [-q]
[--debug] [-y] [--json]
key
ArgumentDescription
keyitem/attachment key, or a BBT citekey (prefix @ to force)
zot collections [-h] [--base BASE] [--token TOKEN] [--user-id USER_ID]
[-q] [--debug] [-y] [--json] [--limit LIMIT] [--all]
ArgumentDescription
--limit
--allfetch all (paginate)
zot tags [-h] [--base BASE] [--token TOKEN] [--user-id USER_ID] [-q]
[--debug] [-y] [--json] [--limit LIMIT] [--all]
ArgumentDescription
--limit
--allfetch all (paginate)
zot export [-h] [--base BASE] [--token TOKEN] [--user-id USER_ID] [-q]
[--debug] [-y] [--json]
[--format {json,csv,csljson,bibtex,biblatex,ris}]
[--out OUT]
collection
ArgumentDescription
collectioncollection key or name
--format
--outwrite to file instead of stdout
zot missing [-h] [--base BASE] [--token TOKEN] [--user-id USER_ID] [-q]
[--debug] [-y] [--json] [--collection COLLECTION]
[--detail {concise,full}]
field
ArgumentDescription
fieldfield or alias: abstract, date, doi, url, publisher, publication
--collectionlimit to a collection (key or name)
--detailfull keeps abstracts
zot author [-h] [--base BASE] [--token TOKEN] [--user-id USER_ID] [-q]
[--debug] [-y] [--json] [--detail {concise,full}]
name
ArgumentDescription
name
--detailfull keeps abstracts
zot stats [-h] [--base BASE] [--token TOKEN] [--user-id USER_ID] [-q]
[--debug] [-y] [--json]
zot recent [-h] [--base BASE] [--token TOKEN] [--user-id USER_ID] [-q]
[--debug] [-y] [--json] [--limit LIMIT]
ArgumentDescription
--limit
zot bib [-h] [--base BASE] [--token TOKEN] [--user-id USER_ID] [-q]
[--debug] [-y] [--json] [--style STYLE] [--linkwrap]
[--out OUT]
keys [keys ...]
ArgumentDescription
keysitem keys or citekeys
--styleCSL style id (e.g. apa, chicago-note-bibliography)
--linkwrap
--out
zot annotations [-h] [--base BASE] [--token TOKEN] [--user-id USER_ID]
[-q] [--debug] [-y] [--json] [--to-note]
[--samples SAMPLES]
key
ArgumentDescription
key
--to-notewrite annotations into a child note
--samples
zot related [-h] [--base BASE] [--token TOKEN] [--user-id USER_ID] [-q]
[--debug] [-y] [--json]
key
ArgumentDescription
key
zot notes [-h] [--base BASE] [--token TOKEN] [--user-id USER_ID] [-q]
[--debug] [-y] [--json]
key
ArgumentDescription
key
zot lint [-h] [--base BASE] [--token TOKEN] [--user-id USER_ID] [-q]
[--debug] [-y] [--json] [--samples SAMPLES]
ArgumentDescription
--samplesexamples to show per issue
zot add [-h] [--base BASE] [--token TOKEN] [--user-id USER_ID] [-q]
[--debug] [-y] [--json] [--pdf] [--collection COLLECTION]
{doi,isbn,arxiv} identifier
ArgumentDescription
kind
identifier
--pdfalso try to attach an open-access PDF
--collectionadd to this collection (key or name)
zot dedupe [-h] [--base BASE] [--token TOKEN] [--user-id USER_ID] [-q]
[--debug] [-y] [--json] [--by {title,doi}]
[--collection COLLECTION] [--merge] [--fuzzy]
[--threshold THRESHOLD] [--samples SAMPLES]
ArgumentDescription
--by
--collectionlimit to a collection (key or name); else whole library
--mergemerge each group (keeps oldest as master)
--fuzzyalso group near-identical titles (Levenshtein)
--thresholdsimilarity threshold for —fuzzy (0-1)
--samples
zot tag [-h] [--base BASE] [--token TOKEN] [--user-id USER_ID] [-q]
[--debug] [-y] [--json] [--new NEW] [--map MAP] [--dry-run]
[--samples SAMPLES]
{add,rm,rename,purge,normalize} [tag] [keys ...]
ArgumentDescription
action
tagthe tag (for add/rm/rename)
keysitem keys/citekeys (for add/rm; ’-’ reads stdin)
--newnew tag name (for rename)
--mapCSV old,new mapping file (for normalize)
--dry-runpreview (for normalize)
--samples
zot set [-h] [--base BASE] [--token TOKEN] [--user-id USER_ID] [-q]
[--debug] [-y] [--json]
field value keys [keys ...]
ArgumentDescription
fieldfield or alias (e.g. abstract, publisher, date)
value
keysitem keys/citekeys (’-’ reads stdin)
zot move [-h] [--base BASE] [--token TOKEN] [--user-id USER_ID] [-q]
[--debug] [-y] [--json]
collection keys [keys ...]
ArgumentDescription
collection
keysitem keys/citekeys (’-’ reads stdin)
zot collection [-h] [--base BASE] [--token TOKEN] [--user-id USER_ID]
[-q] [--debug] [-y] [--json] [--parent PARENT]
name
ArgumentDescription
name
--parentparent collection (key or name)
zot note [-h] [--base BASE] [--token TOKEN] [--user-id USER_ID] [-q]
[--debug] [-y] [--json] [--file FILE] [--text TEXT]
[--if-not-exists] [--dry-run]
key
ArgumentDescription
key
--fileread note body (HTML or text) from a file
--textnote body as a string
--if-not-existsskip if an identical note already exists (idempotent)
--dry-runshow what would be added, don’t write
zot toc [-h] [--base BASE] [--token TOKEN] [--user-id USER_ID] [-q]
[--debug] [-y] [--json] [--from FILE] [--attachment ATTACHMENT]
[--dry-run] [--max-level MAX_LEVEL] [--offset OFFSET]
[--backup] [--mark-for-sync] [--cap CAP] [--samples SAMPLES]
{show,scan,set,auto,clear} key
ArgumentDescription
actionshow the embedded outline, scan for evidence, set one from a file, build one automatically, or remove it
keyitem/attachment key, or a BBT citekey (prefix @ to force)
--fromoutline to write (for set); ’-’ reads stdin. Text or JSON.
--attachmentattachment key, when the item has several PDFs
--dry-runpreview the outline; don’t touch the file
--max-leveldeepest nesting level to keep (default 4)
--offsetforce printed-page → physical-page delta instead of detecting it
--backupcopy the untouched PDF into ~/.local/state/zotero-agent first
--mark-for-synctell Zotero to re-upload the file on the next sync
--capmax heading candidates in a scan
--samplesrows to print per section of a scan
zot apply [-h] [--base BASE] [--token TOKEN] [--user-id USER_ID] [-q]
[--debug] [-y] [--json] [--dry-run] [--samples SAMPLES]
file
ArgumentDescription
fileJSONL file, or ’-’ for stdin
--dry-runpreview writes, don’t persist
--samples
zot undo [-h] [--base BASE] [--token TOKEN] [--user-id USER_ID] [-q]
[--debug] [-y] [--json] [--keep]
[op]
ArgumentDescription
opop id, ‘last’ (default), or ‘list’
--keepdon’t delete the snapshot after undo
zot enrich [-h] [--base BASE] [--token TOKEN] [--user-id USER_ID] [-q]
[--debug] [-y] [--json] --field {doi,date,abstract}
[--source {crossref,openalex}] [--collection COLLECTION]
[--limit LIMIT] [--delay DELAY] [--dry-run]
[--samples SAMPLES]
ArgumentDescription
--field
--source
--collectionlimit to a collection (key or name)
--limitcap items looked up (0 = no cap)
--delayseconds between API calls (be polite)
--dry-runpreview, don’t write
--samples
zot ping [-h] [--base BASE] [--token TOKEN] [--user-id USER_ID] [-q]
[--debug] [-y] [--json]
zot init [-h] [--base BASE] [--token TOKEN] [--user-id USER_ID] [-q]
[--debug] [-y] [--json]
zot skill [-h] [--base BASE] [--token TOKEN] [--user-id USER_ID] [-q]
[--debug] [-y] [--json] [--dest DEST] [--project] [--force]
[--link]
{install,path,agents-md}
ArgumentDescription
actioninstall it, print the bundled source path, or print AGENTS.md to stdout
--destinstall here (default: ~/.claude/skills/zotero)
--projectinstall into ./.claude/skills/zotero (this project only)
--forcereplace an existing install
--linksymlink the source instead of copying (dev checkout)
zot backup [-h] [--base BASE] [--token TOKEN] [--user-id USER_ID] [-q]
[--debug] [-y] [--json] [--dir DIR]
ArgumentDescription
--dirdestination dir (default: ~/.config/zotero-agent/backups)
zot sync [-h] [--base BASE] [--token TOKEN] [--user-id USER_ID] [-q]
[--debug] [-y] [--json]
zot exec [-h] [--base BASE] [--token TOKEN] [--user-id USER_ID] [-q]
[--debug] [-y] [--json] [--dry-run]
source
ArgumentDescription
source
--dry-runintercept writes and report what would change (best-effort)
zot mcp [-h] [--base BASE] [--token TOKEN] [--user-id USER_ID] [-q]
[--debug] [-y] [--json] [--allow-exec]
ArgumentDescription
--allow-execexpose the run_javascript tool (arbitrary JS)
zot completion [-h] [--base BASE] [--token TOKEN] [--user-id USER_ID]
[-q] [--debug] [-y] [--json]
{bash,zsh,fish}
ArgumentDescription
shell