Repository navigation
v3.1.0
The first minor release after 3.0: output you can pipe, deletes you can undo, and consistent flags. Nothing is removed or changed incompatibly in 3.x: every command and flag that works today still works. Where a spelling or behaviour is going away it prints a deprecation warning now and is removed in 4.0, and each item is listed in #462. Worth knowing:
search,collection list,tag list,report stats,slr list *andsystem jobs listtake--format json|csv, anditem trash,item restoreand a new--trashflag onitem delete,item merge,slr dedupe,collection delete --recursiveanditem transfer --delete-sourcemove things to Zotero's trash (recoverable) through the Web API, not only--offline.item delete,storage checkoutandsystem restorestill apply without a flag, but warn; from 4.0 they preview unless you pass--execute.- The old flag spellings (
--item-id,--item,--nameon existing collections,--verboseon subcommands,--formaton exports) keep working, with a warning, until 4.0. ragis deprecated and leaves zotero-cli in 4.0; it is becoming a separate tool.
Added
--trashon the bulk deletes (Issue #402):collection delete --recursive,item merge(and--from-plan),slr dedupeanditem transfer --delete-sourcetake--trashto move what they would delete to Zotero's trash instead, whereitem restore(or Desktop) brings it back - so a merge or a transfer can be undone. Without it nothing changes: they still delete permanently. Forcollection delete --recursive --trashthe items are recoverable but the collections themselves are still deleted for good (only items' trash was verified against the Web API), so restored items come back without them; the preview says so.slr pruneneeds no flag: it only removes items from a collection. Trash by default, with--permanent, is 4.0 (#462).item trashanditem restorework online, anditem delete --trash(Issue #402): moving an item to Zotero's trash no longer needs--offline. Online the commands set the item'sdeletedflag through the Web API - the property Zotero Desktop syncs - so the item appears in Desktop's trash, keeps its collections, and can be restored from either side; with--offlinethey still write Desktop's own rows tozotero.sqlite. Verified against a real library before building it (trash and restore, each204, reflected initems/trash). Writes use the item's own version, so an item changed since it was read is refused, not overwritten.item delete --trashdoes the same in one step and applies without theitem deletedeprecation warning, being recoverable;--permanentand trash-by-default arrive in 4.0 (#462), and the bulk deletes take--trashtoo (below).--format {table,json,csv}on the commands you'd pipe next (Issue #380):search,collection list(treestays the default; json/csv are flatkey, name, parent, num_itemsrecords),tag list,report stats(json is one object, csv is long-formsection, label, count, percent),slr list pending|included|excluded|qa-approvedandsystem jobs listnow print machine-readable output, not justitem list. Stdout carries only the data - progress and notices go to stderr, and an empty result is an empty JSON list or a header-only CSV. The default output of every command is unchanged. The rendering moved into a sharedpresenters/records.py, whichitem listnow uses too.- OpenAlex API key, and one 429 policy for every metadata client (Issue #420): set
openalex_api_key(orOPENALEX_API_KEY) to send your free OpenAlex key asapi_key=on every request; it's masked in logs and listed, commented, inconfig.toml.example. OpenAlex's pricing page now describes a daily usage allowance per key, so unkeyed heavy use may run out. Every client built onBaseAPIClientnow handles429the same way: wait the provider'sRetry-After(at most 30 s) and retry twice, or fail at once with a warning naming the provider when it wants a longer wait (a daily quota) instead of a bare HTTP error.docs/DATA_SOURCES.mddocuments both. - Item keys can be positional or
--keyeverywhere they were one or the other (Issue #379):item inspect ABCD1234now works (the docs already showed it), andslr sdb inspect|editaccept--key KEYas well as the positional.
Changed
- A stray argument now reports the subcommand's usage line (Issue #379):
item inspect K --bogusprintsusage: zotero-cli item inspect ...instead of the top-level usage.
Deprecated
ragis deprecated and leaves zotero-cli in 4.0 (Issue #414): RAG is being rebuilt as a separate product that connects to your Zotero library on its own, so theragcommands (ingest,query,context,purge,model) and the[rag]extra will be removed in 4.0 (tracked in #462). Until then they keep working and everyragcommand prints a deprecation warning to stderr. The release binaries never included them.--as {bibtex,ris,md}names the export type;--formaton exports is deprecated (Issue #380):item export,item inspectandcollection exportnow take--as, so--formatalways means how output is rendered.--formatkeeps working on those three as a hidden alias that prints a deprecation warning; it is removed in 4.0 (Issue #462).slr snowball export --formatandrag query --formatare unchanged.--keyand--collectionare the standard spellings (Issue #379):item move --item-id,tag add --item, and the--nameflag ofcollection backup,collection export,collection purge,slr sdb resetandslr source add(where it names an existing collection) are now--key/--collection. The old spellings keep working as hidden aliases that print a deprecation warning; they are removed in 4.0 (Issue #462). Flags that create a name (collection create/rename --name,slr source init --name,system demo-sandbox --name) are unchanged, as are the plural list flags (--keys,--collections) and--master/--tree, which mean something different.- The 11 per-command
--verboseflags are renamed--details(Issue #374):import file/arxiv/doi/bdtd,item pdf fetch/strip,collection clean,report audit,slr report prisma,slr source addandslr reconcilenow take--details, which never touches the global-v(debug logging).--verboseon those commands keeps working as a hidden alias for one minor release, printing a deprecation warning; it is removed in 4.0 (Issue #462). item delete,storage checkoutandsystem restoregain--dry-run/--execute(Issue #378): all three predate the preview-by-default policy and still apply immediately when neither flag is given - that keeps working unchanged in 3.x, but now prints a deprecation warning to stderr telling you to pass--execute.item delete --dry-runalso now previews the item and lists its attached notes/files (which the Web API'sDELETEdoesn't cascade to - they'd become orphaned, not deleted).storage checkout --dry-runlists what would be downloaded and relinked without touching the filesystem or the library. All three switch to preview-by-default in 4.0 (Issue #462).
Verifying downloads: SHA256SUMS lists the checksum of every file
(sha256sum -c SHA256SUMS --ignore-missing). Each file also has signed build
provenance: gh attestation verify <file> -R fchicout/zotero-cli confirms it
was built by this repository's release workflow.
PyPI: uv tool install zotero-command-line==3.1.0 (or pipx install).