Command reference¶
Every zotio command, generated directly from the binary. Add --agent to any command for JSON output and non-interactive defaults; mutating commands preview unless --yes is passed.
Global flags¶
These flags are available on every command.
| Flag | Type | Default | Description |
|---|---|---|---|
--agent |
bool |
false |
Set agent-friendly defaults (--json --compact --no-input --no-color); does NOT auto-apply writes — pass --yes to mutate |
--allow-destructive |
bool |
false |
Allow irreversible operations (merge, permanent delete, empty-trash) to apply |
--compact |
bool |
false |
Return only key fields (id, name, status, timestamps) for minimal token usage |
--config |
string |
Config file path | |
--connector-target |
string |
Desktop connector save target ID (for example C78); overrides --collection target mapping | |
--continue-on-error |
bool |
false |
On bulk mutations, continue past per-item failures/conflicts instead of stopping at the first |
--csv |
bool |
false |
Output as CSV (table and array responses) |
--data-source |
string |
auto |
Data source for read commands: auto (live with local fallback), live (API only), local (synced data only) |
--deliver |
string |
Route output to a sink: stdout (default), file: |
|
--dry-run |
bool |
false |
Show request without sending |
--group |
string |
Operate on a Zotero group library by numeric group ID (default: personal library) | |
--human-friendly |
bool |
false |
Enable colored output and rich formatting |
--idempotent |
bool |
false |
Treat already-existing create results as a successful no-op |
--ignore-missing |
bool |
false |
Treat missing delete targets as a successful no-op |
--json |
bool |
false |
Output as JSON |
--max-changes |
int |
-1 |
Max write operations a single mutation may apply before refusing (-1 = default: 500, or 50 under --agent) |
--max-failures |
int |
0 |
With --continue-on-error, stop after this many failures (0 = unlimited) |
--no-cache |
bool |
false |
Bypass response cache |
--no-color |
bool |
false |
Disable colored output |
--no-input |
bool |
false |
Disable all interactive prompts (for CI/agents) |
--plain |
bool |
false |
Output as plain tab-separated text |
--profile |
string |
Apply values from a saved profile (see 'zotio profile list') | |
--quiet |
bool |
false |
Bare output, one value per line |
--rate-limit |
float64 |
0 |
Max requests per second (0 to disable) |
--select |
string |
Comma-separated fields to include in output (e.g. --select id,name,status) | |
--timeout |
duration |
30s |
Request timeout |
--via |
string |
auto |
Item-creation route: auto (connector when local+reachable), connector (desktop), or web (api.zotero.org) |
--yes |
bool |
false |
Skip confirmation prompts (for agents and scripts) |
zotio agent-context¶
Emit structured JSON describing this CLI for agents
Outputs a machine-readable description of commands, flags, and auth so agents can introspect this CLI at runtime without parsing --help or reading source. Schema is versioned via schema_version.
| Flag | Type | Default | Description |
|---|---|---|---|
--pretty |
bool |
false |
indent JSON output for human reading |
zotio analytics¶
Run analytics queries on locally synced data
Analyze locally synced data with count, group-by, and summary operations. Data must be synced first with the sync command.
Examples:
# Count records by type
zotio analytics --type messages
# Group by a field
zotio analytics --type messages --group-by author_id
# Top 10 most frequent values
zotio analytics --type messages --group-by channel_id --limit 10 --json
| Flag | Type | Default | Description |
|---|---|---|---|
--db |
string |
Database path | |
--group-by |
string |
Field to group by | |
--limit |
int |
25 |
Max groups to show |
--type |
string |
Resource type to analyze |
zotio annotations¶
Search and export annotations from your Zotero library
zotio annotations export¶
Export annotations as markdown or JSON
| Flag | Type | Default | Description |
|---|---|---|---|
--collection |
string |
Scope to items in this collection key | |
--format |
string |
markdown |
Output format (markdown or json) |
--limit |
int |
50 |
Maximum number of items to process |
--output |
string |
Output file path (default: stdout) | |
--refresh |
bool |
false |
Fetch live from the API instead of the local store |
--tag |
string |
Scope to items with this tag |
zotio annotations search¶
Search annotations by text
| Flag | Type | Default | Description |
|---|---|---|---|
--color |
string |
Filter by annotation color (yellow, red, green, blue, purple, orange) | |
--limit |
int |
50 |
Maximum number of annotations to return |
--refresh |
bool |
false |
Fetch live from the API instead of the local store |
zotio annotations timeline¶
List annotations sorted by creation date
Examples:
zotio annotations timeline --limit 50
zotio annotations timeline --since 2024-01-01
zotio annotations timeline --item ABCD1234 --json
| Flag | Type | Default | Description |
|---|---|---|---|
--collection |
string |
Scope to items in this collection key | |
--item |
string |
Scope to annotations of a specific parent item key | |
--limit |
int |
50 |
Maximum number of annotations to return |
--refresh |
bool |
false |
Fetch live from the API instead of the local store |
--since |
string |
ISO date string; include annotations after this date |
zotio auth¶
Manage authentication for Zotero
zotio auth logout¶
Clear stored credentials
Examples:
zotio auth set-token¶
Save an API token to the config file
Examples:
| Flag | Type | Default | Description |
|---|---|---|---|
--stdin |
bool |
false |
Read the API token from stdin |
zotio auth status¶
Show authentication status
Examples:
zotio capabilities¶
Emit the machine-readable capability + preconditions registry
Outputs a typed registry describing each command's operation kind (read/write/destructive), write target, supported data sources, and preconditions (live_local_api, web_api_key, synced_store, better_bibtex) so agents can select safe commands and pre-flight requirements without parsing --help or guessing from names.
| Flag | Type | Default | Description |
|---|---|---|---|
--pretty |
bool |
false |
indent JSON output for human reading |
zotio capabilities drift¶
Probe core read endpoints for capability/API drift
Probes core Zotero read endpoints declared in the capability registry and reports any endpoint that now returns an API error or cannot be reached. This is read-only and treats every non-nil GET error as drift, including HTTP 4xx/5xx and network failures.
zotio collections¶
Manage collections in your Zotero library
zotio collections bundle¶
Write a local research package for a collection
Assemble a self-contained research package from the local store for a collection: synthesis context, annotations, and compact bibliography. This command never writes to Zotero; run sync first if local data is missing.
| Flag | Type | Default | Description |
|---|---|---|---|
--out |
string |
Output directory for the research package |
zotio collections create¶
Create one or more collections
Examples:
| Flag | Type | Default | Description |
|---|---|---|---|
--name |
string |
Collection name | |
--parent-collection |
string |
Parent collection key (omit for top-level) | |
--stdin |
bool |
false |
Read request body as JSON from stdin |
zotio collections delete¶
Delete a collection (does not delete items)
Examples:
zotio collections export¶
Export a collection (and subcollections) as BibTeX, RIS, or CSL-JSON
Recursively walks a collection and all its subcollections, then emits a single combined export in the requested format. Use --flat to export only the top-level collection without recursing into subcollections.
Examples:
# Export collection as BibTeX (default)
zotio collections export ABCD1234
# Export as RIS to a file
zotio collections export ABCD1234 --format ris --output refs.ris
# Export without descending into subcollections
zotio collections export ABCD1234 --flat
| Flag | Type | Default | Description |
|---|---|---|---|
--flat |
bool |
false |
Export only the top-level collection, skip subcollections |
--format |
string |
bibtex |
Export format: bibtex, ris, csljson |
--limit |
int |
200 |
Maximum items per collection request |
--output |
string |
Write output to file instead of stdout |
zotio collections gaps¶
Find highly cited DOI references missing from a collection's library
| Flag | Type | Default | Description |
|---|---|---|---|
--limit |
int |
50 |
Maximum DOI-bearing collection items to scan (0 = all) |
--top |
int |
20 |
Number of citation gaps to show |
zotio collections get¶
Get a specific collection
Examples:
zotio collections items¶
List all items in a collection
Examples:
| Flag | Type | Default | Description |
|---|---|---|---|
--format |
string |
Response format (json, bibtex, ris, etc.) | |
--limit |
int |
0 |
Maximum number of items to return |
--start |
int |
0 |
Pagination offset |
zotio collections list¶
List all collections
Examples:
| Flag | Type | Default | Description |
|---|---|---|---|
--limit |
int |
0 |
Maximum number of collections to return |
--start |
int |
0 |
Pagination offset |
zotio collections move¶
Move a collection under a new parent
| Flag | Type | Default | Description |
|---|---|---|---|
--to |
string |
New parent collection key (use root or empty string for top-level) |
zotio collections stats¶
Show analytics for a collection (item count, PDF coverage, year range, top journals)
| Flag | Type | Default | Description |
|---|---|---|---|
--top |
int |
5 |
Number of top venues to show |
zotio collections subcollections¶
List subcollections of a collection
Examples:
zotio collections tags¶
List tags used within a collection
Examples:
zotio collections top¶
List only top-level collections (no parents)
Examples:
| Flag | Type | Default | Description |
|---|---|---|---|
--limit |
int |
0 |
Maximum number to return |
zotio collections update¶
Update a collection
Examples:
| Flag | Type | Default | Description |
|---|---|---|---|
--name |
string |
New collection name | |
--parent-collection |
string |
New parent collection key (false for top-level) | |
--stdin |
bool |
false |
Read request body as JSON from stdin |
zotio creators¶
Audit creator names across your Zotero library
zotio creators audit¶
Audit synced creator names for variant candidates
Audit synced creator names for variant candidates without mutating Zotero.
The audit reads item creators from the local synced store and groups likely name variants into three confidence tiers: exact-after-normalization, initial/full-name compatibility, and ambiguous same-surname diagnostics. Use --orcid to fetch CrossRef author ORCIDs for DOI-bearing tier-2/3 candidates and store them in the local creator_orcids sidecar table as corroboration evidence. That sidecar is local-only evidence; zotio never writes ORCIDs back to Zotero because Zotero has no creator ORCID field.
Examples:
zotio creators audit
zotio creators audit --scope collection:ABCD1234
zotio creators audit --orcid --json
| Flag | Type | Default | Description |
|---|---|---|---|
--orcid |
bool |
false |
Fetch CrossRef author ORCIDs into the local-only sidecar table; never writes ORCIDs to Zotero |
--scope |
string |
library |
Item scope: library, collection: |
zotio creators audit fix¶
Apply safe creator variant renames from creators audit
Apply safe creator variant renames from creators audit through the shared mutation preview/apply envelope.
By default this previews item writes without sending network mutations. Pass --yes to apply. Tier-1 exact-normalized groups are planned automatically. Tier-2 initial/full-name groups are planned only for explicit repeatable mappings such as --map "J. Smith=John Smith". Tier-3 ambiguous groups are never planned.
Creator renames PATCH each affected item with its full creators array and a version precondition, preserving creatorType, creator order, and unrelated creators. Applied creator renames are journaled for audit history, but journal undo does not reverse them because ordered creator-array inverses are not supported.
Examples:
zotio creators audit fix
zotio creators audit fix --map "J. Smith=John Smith"
zotio creators audit fix --scope collection:ABCD1234 --yes
| Flag | Type | Default | Description |
|---|---|---|---|
--map |
stringArray |
[] |
Tier-2 alias mapping alias=canonical; repeatable |
--scope |
string |
library |
Item scope: library, collection: |
zotio demo¶
Seed a zero-setup sample library and print a guided tour
Seed a bundled sample library into a separate demo store and print a short tour of commands to try.
The sandbox is a self-contained SQLite database (demo.db) beside your real store. Set ZOTIO_DEMO=1 on any command to read from it with a pristine, key-less config -- your real library, config, and API key are never touched. No Zotero desktop and no API key are required.
| Flag | Type | Default | Description |
|---|---|---|---|
--reset |
bool |
false |
Delete and re-seed the sandbox (also removes demo.db) |
zotio doctor¶
Check CLI health
Examples:
| Flag | Type | Default | Description |
|---|---|---|---|
--ensure-live |
bool |
false |
Check the Zotero desktop local API is reachable; exit 9 if not |
--fail-on |
string |
Exit non-zero when a health level is reached: stale, error. Default is never. | |
--launch |
bool |
false |
With --ensure-live, launch Zotero and wait up to 15s for the local API |
zotio export¶
Export data to JSONL or JSON for backup, migration, or analysis
Export paginated API data to a local file. Supports JSONL (one JSON object per line, streaming-friendly) and JSON (array). JSONL is recommended for large datasets as it has no memory pressure.
Examples:
# Export all items as JSONL (streaming, recommended for large datasets)
zotio export <resource> --format jsonl --output data.jsonl
# Export with limit
zotio export <resource> --format jsonl --limit 1000
# Pipe to another tool
zotio export <resource> --format jsonl | jq '.id'
| Flag | Type | Default | Description |
|---|---|---|---|
--format |
string |
jsonl |
Output format: jsonl or json |
--limit |
int |
0 |
Maximum records to export (0 = unlimited) |
--no-cache |
bool |
false |
Bypass response cache for fresh data |
-o, --output |
string |
Output file path (default: stdout) |
zotio export snapshot¶
Reproducible, resumable paginated export with a content lockfile
Export a structured item set (JSONL) across all pages into a data file, plus a sidecar lockfile (
Scope is one of: library (default), collection:KEY, or tag:NAME.
Examples:
zotio export snapshot --output backup.jsonl
zotio export snapshot collection:ABCD1234 --output coll.jsonl
zotio export snapshot --output backup.jsonl --resume
| Flag | Type | Default | Description |
|---|---|---|---|
--limit |
int |
0 |
Maximum items to export (0 = all) |
--page-size |
int |
100 |
Items per API page (1-100) |
--resume |
bool |
false |
Resume an interrupted snapshot from its checkpoint sidecar |
-o, --output |
string |
Output JSONL data file (required); the lockfile is written to |
zotio export snapshot verify¶
Verify a snapshot lockfile against the current library
Verify a snapshot lockfile against the current Zotero library.
The verifier re-resolves the lockfile scope when possible, recomputes the same content hash as export snapshot, and separates semantic drift (added, removed, changed) from Zotero version churn (touched). Touched items have a newer version but identical normalized content and never fail --fail-on-drift.
Examples:
zotio export snapshot verify backup.jsonl.lock.json
zotio export snapshot verify backup.jsonl.lock.json --fail-on-drift
zotio export snapshot verify backup.jsonl.lock.json --json
| Flag | Type | Default | Description |
|---|---|---|---|
--fail-on-drift |
bool |
false |
Exit 11 when added, removed, or changed items are detected (touched never fails) |
zotio feedback¶
Record feedback about this CLI (local by default; upstream opt-in)
Feedback is captured locally first at ~/.zotio/feedback.jsonl.
When ZOTERO_FEEDBACK_ENDPOINT is set and either --send is
passed or ZOTERO_FEEDBACK_AUTO_SEND=true, the entry is
POSTed as JSON after the local write.
Write what surprised you or tripped you up, not a bug report. The loop is: agent notices friction -> one invocation -> captured -> the maintainer sees it.
| Flag | Type | Default | Description |
|---|---|---|---|
--send |
bool |
false |
POST to the configured feedback endpoint in addition to local write |
--stdin |
bool |
false |
Read feedback body from stdin rather than arguments |
zotio feedback list¶
List recent feedback entries
Examples:
| Flag | Type | Default | Description |
|---|---|---|---|
--limit |
int |
20 |
Maximum number of recent entries to return |
zotio groups¶
Discover Zotero group libraries you can access
zotio groups inspect¶
Check whether a Zotero group library is accessible and writable
zotio groups list¶
List the group libraries the configured user belongs to
Examples:
zotio groups list
zotio groups list --json
# Then sync and search a specific group:
zotio sync --group <id>
zotio search --group <id> <query>
zotio import¶
Import data from JSONL file via API create/upsert calls
Import data from a JSONL file by issuing POST requests for each record. Each line must be a valid JSON object. Failed records are logged to stderr but do not stop the import.
Examples:
# Import from a JSONL file
zotio import <resource> --input data.jsonl
# Dry-run to preview without sending
zotio import <resource> --input data.jsonl --dry-run
# Import from stdin
cat data.jsonl | zotio import <resource> --input -
| Flag | Type | Default | Description |
|---|---|---|---|
--batch-size |
int |
1 |
Records per batch (future: batch API support) |
--dry-run |
bool |
false |
Preview import without sending requests |
-i, --input |
string |
Input JSONL file path (use - for stdin) |
zotio import apply¶
Apply a reviewed import manifest
| Flag | Type | Default | Description |
|---|---|---|---|
--attach-mode |
string |
none |
Attachment handling: none, linked-file, or stored |
--fetch-pdf |
bool |
false |
Attach an open-access PDF via Zotero's desktop resolver (requires --via connector) |
zotio import arxiv¶
Import a preprint from arXiv metadata
| Flag | Type | Default | Description |
|---|---|---|---|
--collection |
string |
Collection key to add the item to | |
--dry-run |
bool |
false |
Preview import without sending requests |
--fetch-pdf |
bool |
false |
Attach an open-access PDF via Zotero's desktop resolver (requires --via connector) |
zotio import discover¶
Discover missing references and write a reviewable import manifest
| Flag | Type | Default | Description |
|---|---|---|---|
--direction |
string |
backward |
Citation chase direction: backward, forward, or both |
--limit |
int |
25 |
Maximum manifest entries to emit |
--min-count |
int |
2 |
Minimum number of source items citing a DOI |
--out |
string |
Path to write the reviewable import manifest | |
--scope |
string |
Scope expression to discover from (required; e.g. collection: |
zotio import doi¶
Import an item from CrossRef DOI metadata
| Flag | Type | Default | Description |
|---|---|---|---|
--collection |
string |
Collection key to add the item to | |
--fetch-pdf |
bool |
false |
Attach an open-access PDF via Zotero's desktop resolver (requires --via connector) |
zotio import file¶
Import items from BibTeX, RIS, or CSL JSON
| Flag | Type | Default | Description |
|---|---|---|---|
--collection |
string |
Collection key to add imported items to | |
--format |
string |
Input format (bibtex, ris, csljson) |
zotio import isbn¶
Import a book from Open Library ISBN metadata
| Flag | Type | Default | Description |
|---|---|---|---|
--collection |
string |
Collection key to add the item to | |
--dry-run |
bool |
false |
Preview import without sending requests |
--fetch-pdf |
bool |
false |
Attach an open-access PDF via Zotero's desktop resolver (requires --via connector) |
zotio import pdf¶
Create items from PDFs using Zotero desktop recognition
Create Zotero items from local PDF files by asking the Zotero desktop Connector API to save each PDF as a standalone attachment and run Zotero's metadata recognizer.
This command requires a local Zotero base URL, Zotero running, and Zotero's local API preference enabled. Recognition failures are reported as unrecognized standalone PDF attachments instead of hard errors.
zotio import pmid¶
Import a journal article from PubMed metadata
| Flag | Type | Default | Description |
|---|---|---|---|
--collection |
string |
Collection key to add the item to | |
--dry-run |
bool |
false |
Preview import without sending requests |
--fetch-pdf |
bool |
false |
Attach an open-access PDF via Zotero's desktop resolver (requires --via connector) |
zotio import resolve¶
Resolve PDFs into an editable import manifest
| Flag | Type | Default | Description |
|---|---|---|---|
--limit |
int |
200 |
Scan at most N PDFs when resolving a directory |
zotio import scan¶
Triage a folder of PDFs against your library (read-only): new vs duplicate vs attach-candidate
Scan a directory of PDFs and classify each against your synced library WITHOUT importing anything. For each PDF it extracts a DOI (from the filename, then the file's embedded metadata) and reports:
duplicate the DOI already belongs to an item in your library
attach_candidate matches an item you have that is missing its PDF
new not in your library (use 'import doi
This complements Zotero's "Retrieve Metadata for PDF": it makes the library-aware decision the GUI does not — which PDFs to import, which are duplicates, and which complete items you already have. It never writes; hand the actual import and file attach to Zotero.
DOI extraction is dependency-free: it reads the filename and the PDF's uncompressed embedded metadata (Info/XMP). It does NOT decode compressed page text, so scanned or text-only PDFs may report "unidentified".
Examples:
| Flag | Type | Default | Description |
|---|---|---|---|
--limit |
int |
0 |
Scan at most N PDFs (0 = all) |
--resolve |
bool |
false |
Fetch CrossRef titles for 'new' PDFs (network) |
zotio import targets¶
List Zotero desktop Connector save targets
List Zotero desktop Connector save targets for connector-backed imports. Use the id column (for example C78) with --connector-target when --collection is ambiguous or the local Web API collection key cannot be mapped automatically.
zotio import translators¶
Detect Zotero desktop translators for a URL
Fetch a page and ask Zotero desktop which web translators match it.
This is diagnostic-only: Zotero's desktop connector can detect matching web translators, but browser-side web translation is not run by the desktop server.
zotio import url¶
Import a URL as a metadata-enriched item
Import a URL, resolving real metadata where possible.
If the URL embeds a DOI, full metadata is fetched from CrossRef. Otherwise the page's embedded metadata (citation_*, Open Graph, Dublin Core meta tags) is mapped into a typed item with title, creators, abstract, and publication venue. A bare webpage item is used only when no metadata is available.
Use --dry-run to preview the proposed item without writing it.
| Flag | Type | Default | Description |
|---|---|---|---|
--collection |
string |
Collection key to add the item to | |
--fetch-pdf |
bool |
false |
Attach an open-access PDF via Zotero's desktop resolver (requires --via connector) |
zotio init¶
Guided first-run setup using doctor, auth, sync, and health checks
Guided first-run setup for Zotero automation.
Checks the local Zotero API, stores an API key when one is provided interactively, runs the first local sync when the store is missing or empty, and finishes with the quick library-health preset plus suggested next commands.
| Flag | Type | Default | Description |
|---|---|---|---|
--launch |
bool |
false |
Launch Zotero and wait for the local API when it is not reachable |
zotio items¶
Manage items in your Zotero library
zotio items annotations¶
List annotation children for an item
| Flag | Type | Default | Description |
|---|---|---|---|
--color |
string |
Filter by annotation color (yellow, red, green, blue, purple, orange) | |
--type |
string |
Filter by annotation type (highlight, note, image) |
zotio items audit¶
Audit locally synced items for missing metadata and PDFs
| Flag | Type | Default | Description |
|---|---|---|---|
--limit |
int |
0 |
Maximum number of items per category (0 = no limit) |
--missing-abstract |
bool |
false |
List items with no abstract |
--missing-citation |
bool |
false |
List citeable items missing core citation fields (creators, title, date, venue) |
--missing-doi |
bool |
false |
List journal articles, conference papers, and preprints with no DOI |
--missing-pdf |
bool |
false |
List items that should have an attached PDF but do not |
--missing-tags |
bool |
false |
List items with no tags |
--verify-files |
bool |
false |
Verify each PDF attachment's file exists on disk (one local-API lookup per attachment) |
zotio items authors¶
Count synced items per creator
| Flag | Type | Default | Description |
|---|---|---|---|
--collection |
string |
Filter to items in this collection key | |
--top |
int |
20 |
Maximum number of authors to return |
--type |
string |
Filter by creatorType (for example author or editor) |
zotio items bibcheck¶
Check manuscript citation keys against the synced Better BibTeX library
Examples:
zotio items bibcheck paper.tex
zotio items bibcheck manuscript.md --fail-on-unknown
zotio items bibcheck paper.tex chapter.md --json
zotio items bibcheck chapter.qmd --fail-on high
| Flag | Type | Default | Description |
|---|---|---|---|
--fail-on |
string |
Exit 11 when findings reach this severity: high, any, or none | |
--fail-on-unknown |
bool |
false |
Exit 11 when any cited key is unknown or ambiguous |
zotio items bibliography¶
Render a formatted bibliography for a scoped item selection
Render a formatted bibliography for items selected with the shared scope grammar.
The bibliography is rendered by Zotero's Web API CSL renderer so named styles such as apa, chicago, mla, nature, and journal-specific CSL IDs are honored. The Web API limits itemKey batches, so large scopes are fetched in stable 50-key chunks and concatenated in scope order.
Examples:
zotio items bibliography --scope collection:ABCD1234 --style apa
zotio items bibliography --scope tag:to-submit --style nature
zotio items bibliography --scope item:ABCD1234 --json
| Flag | Type | Default | Description |
|---|---|---|---|
--scope |
string |
library |
Shared scope expression (library, collection:KEY, tag:NAME, item:KEY, query:TEXT) |
--style |
string |
CSL style ID (default uses Zotero's default bibliography style) |
zotio items children¶
Get child items (attachments and notes) for an item
Examples:
| Flag | Type | Default | Description |
|---|---|---|---|
--item-type |
string |
Filter by type (attachment or note) |
zotio items cite¶
Get a formatted citation for an item
Retrieve a formatted bibliographic citation for an item. The Zotero local API renders citations using your installed CSL styles. For the most common styles (apa, chicago, mla), use the --style flag. For others, pass the CSL style ID directly (e.g. "nature", "harvard-cite-them-right").
Examples:
zotio items cite ABCD1234
zotio items cite ABCD1234 --style apa
zotio items cite ABCD1234 --style bibtex
| Flag | Type | Default | Description |
|---|---|---|---|
--style |
string |
Citation style (apa, mla, chicago, bibtex, ris, csljson) — default uses Zotero's current default style |
zotio items citekey-conflicts¶
Find missing and duplicate Better BibTeX citation keys
Examples:
zotio items citekey-conflicts
zotio items citekey-conflicts --missing
zotio items citekey-conflicts --conflicts --json
| Flag | Type | Default | Description |
|---|---|---|---|
--conflicts |
bool |
false |
Show only items with duplicate citation keys |
--missing |
bool |
false |
Show only items without a citation key |
zotio items collections-of¶
Show collections containing an item
zotio items create¶
Create one or more items
Examples:
| Flag | Type | Default | Description |
|---|---|---|---|
--items |
string |
Array of item objects to create (use item-types and item-type-fields for schema) | |
--stdin |
bool |
false |
Read request body as JSON from stdin |
zotio items delete¶
Delete an item (moves to trash)
Examples:
zotio items duplicates¶
Find likely duplicate items in the local store
| Flag | Type | Default | Description |
|---|---|---|---|
--by |
string |
all |
Duplicate detector to run (doi, title, all) |
zotio items duplicates resolve¶
Resolve duplicate items by merging metadata onto a master and trashing duplicates
Resolve duplicate items by merging metadata onto a master and trashing duplicates.
By default, resolve only matches duplicate DOI groups. Title matching can group distinct items that share generic titles; pass --title only when you are ready to review the preview carefully before applying.
Examples:
zotio items duplicates resolve
zotio items duplicates resolve --doi
zotio items duplicates resolve --title
zotio items duplicates resolve --doi --title --yes
| Flag | Type | Default | Description |
|---|---|---|---|
--doi |
bool |
false |
Resolve duplicate DOI groups |
--strategy |
string |
keep-most-complete |
Resolution strategy (keep-most-complete) |
--title |
bool |
false |
Opt into riskier duplicate title groups |
zotio items enrich¶
Fill or validate item metadata (DOI, abstract, open-access PDF link) from CrossRef, OpenAlex, Semantic Scholar, Unpaywall, and OpenCitations
Resolve missing metadata for locally synced items and apply it back to Zotero.
Work queues come from the same checks as 'items audit': --missing-doi resolve a DOI by title from CrossRef, then OpenAlex/Semantic Scholar (exact title match) --missing-abstract fill the abstract from CrossRef, then OpenAlex/Semantic Scholar (requires the item's DOI) --missing-pdf attach an open-access PDF link from Unpaywall (requires DOI)
By default this previews the proposed changes (a patch plan). Pass --collection to scope the work queue to items in a single collection, or --keys-from to scope to exact item keys produced by another command. Pass --yes to apply them via the Zotero API; --dry-run always previews. Applied field changes record provenance in the item's Extra field.
| Flag | Type | Default | Description |
|---|---|---|---|
--collection |
string |
Scope the work queue to items in a collection key | |
--email |
string |
Contact email for Unpaywall (required for --missing-pdf) and the OpenAlex polite pool (optional); or set UNPAYWALL_EMAIL | |
--keys-from |
string |
Read exact item keys from a file or '-' for stdin, then enrich only matching queued items | |
--limit |
int |
25 |
Maximum items to process per category |
--missing-abstract |
bool |
false |
Fill the abstract from CrossRef, OpenAlex, or Semantic Scholar (uses the item's DOI) |
--missing-doi |
bool |
false |
Resolve and add a DOI from CrossRef, OpenAlex, or Semantic Scholar |
--missing-pdf |
bool |
false |
Attach an open-access PDF link from Unpaywall (uses the item's DOI) |
--no-openalex |
bool |
false |
Disable the OpenAlex fallback for --missing-doi/--missing-abstract |
--no-semantic-scholar |
bool |
false |
Disable the Semantic Scholar fallback for --missing-doi/--missing-abstract |
--validate |
bool |
false |
Read-only DOI discrepancy report against CrossRef and OpenCitations |
zotio items file¶
Resolve the on-disk path (file:// URL) of an item's attachment
Return the local filesystem location of an item's attachment via the Zotero
local API (/items/
This complements 'items open' (which launches the Zotero desktop app): 'items file' hands you the actual file so an agent or script can read or process it. The local API must be enabled (Settings → Advanced → "Allow other applications…").
Examples:
# Path of an item's PDF
zotio items file ABCD1234
# JSON envelope (item key, resolved attachment key, url, path)
zotio items file ABCD1234 --json
zotio items find¶
Find locally synced items by DOI, ISBN, PMID, or citation key
Examples:
zotio items find --doi 10.1145/3290605.3300709
zotio items find --isbn 978-0-262-03384-8
zotio items find --citekey smith2023 --json
| Flag | Type | Default | Description |
|---|---|---|---|
--citekey |
string |
Find items with this Better BibTeX citation key | |
--doi |
string |
Find items with this DOI | |
--isbn |
string |
Find items with this ISBN | |
--pmid |
string |
Find items with this PMID in Extra |
zotio items fulltext¶
Get full text from an item's PDF attachment
| Flag | Type | Default | Description |
|---|---|---|---|
--refresh |
bool |
false |
Fetch live from the API instead of the local store |
--search |
string |
Return only full-text lines containing this string |
zotio items get¶
Get a single item by key
Examples:
| Flag | Type | Default | Description |
|---|---|---|---|
--format |
string |
Response format (json, bib, bibtex, csljson, ris, etc.) |
zotio items list¶
List all items in the library
Examples:
| Flag | Type | Default | Description |
|---|---|---|---|
--direction |
string |
Sort direction (asc or desc) | |
--format |
string |
Response format (json, atom, bib, bibtex, bookmarks, coins, csljson, mods, refer, rdf_bibliontology, rdf_dc,... | |
--item-type |
string |
Filter by item type (journalArticle, book, bookSection, conferencePaper, etc.) | |
--limit |
int |
0 |
Maximum number of items to return (max 100) |
--query |
string |
Quick search across title, creator, and year | |
--since |
int |
0 |
Return only items modified after this library version number |
--sort |
string |
Sort field (dateAdded, dateModified, title, creator, type, date, publisher, publicationTitle, journalAbbreviation,... | |
--start |
int |
0 |
Pagination offset (zero-based) |
--tag |
string |
Filter by tag name |
zotio items missing-pdf¶
List items that should have an attached PDF but do not
| Flag | Type | Default | Description |
|---|---|---|---|
--limit |
int |
0 |
Maximum number of items to return (0 = no limit) |
--type |
string |
Filter to a specific Zotero item type |
zotio items move¶
Add, remove, or move item collection memberships
| Flag | Type | Default | Description |
|---|---|---|---|
--from |
string |
Collection key to remove item from | |
--keys-from |
string |
Read item keys from a file, '-' for stdin, or positional args when omitted | |
--to |
string |
Collection key to add item into |
zotio items new¶
Create a schema-validated item from Zotero's blank item template
| Flag | Type | Default | Description |
|---|---|---|---|
--collection |
string |
Collection key to add the item to | |
--field |
stringArray |
[] |
Item field assignment name=value (repeatable) |
--item-type |
string |
Zotero item type to create (e.g. journalArticle) | |
--stdin |
bool |
false |
Read a JSON object of item fields from stdin |
zotio items note-template¶
Generate a markdown reading-note template for an item
Examples:
zotio items note-template ABCD1234
zotio items note-template ABCD1234 --format obsidian
zotio items note-template ABCD1234 --format logseq
| Flag | Type | Default | Description |
|---|---|---|---|
--format |
string |
standard |
Template format: standard, obsidian, or logseq |
zotio items open¶
Print or launch a Zotero desktop deep link (item, collection, or PDF)
Build a zotero:// desktop deep link for an item (default), a collection (--type collection), or a PDF attachment (--type attachment), then print it or launch it (--launch) via the OS handler (open on macOS, xdg-open on Linux, rundll32 on Windows).
The link targets the personal library by default, or a group library when the
global --group
| Flag | Type | Default | Description |
|---|---|---|---|
--launch |
bool |
false |
Launch the deep link via the OS handler (open/xdg-open/rundll32) |
--type |
string |
item |
Target type: item, collection, or attachment (PDF) |
zotio items preprint-check¶
Check arXiv preprints for published CrossRef records
| Flag | Type | Default | Description |
|---|---|---|---|
--limit |
int |
20 |
Maximum number of preprints to check |
zotio items preprint-check fix¶
Apply published DOIs to preprints that CrossRef reports as published
| Flag | Type | Default | Description |
|---|---|---|---|
--limit |
int |
20 |
Maximum number of preprints to check |
zotio items recent¶
List recently added items
| Flag | Type | Default | Description |
|---|---|---|---|
--days |
int |
0 |
Return only items added in the last N days |
--limit |
int |
20 |
Maximum number of items to return |
--type |
string |
Filter by item type |
zotio items related¶
Show outgoing and incoming Zotero related-item edges
Examples:
zotio items restore¶
Restore a trashed item
zotio items retract-check¶
Check DOI-bearing local items for CrossRef retraction notices
Check DOI-bearing items from the locally synced store against CrossRef's updated-by metadata. The command reports retractions, expressions of concern, and corrections without writing to Zotero. Run 'zotio sync' first so the local store is current.
| Flag | Type | Default | Description |
|---|---|---|---|
--collection |
string |
Scope checks to items in a collection key | |
--limit |
int |
0 |
Maximum DOI-bearing items to check (0 = all) |
zotio items stale¶
Find old items without PDFs or annotations
| Flag | Type | Default | Description |
|---|---|---|---|
--days |
int |
365 |
Items added more than this many days ago |
--limit |
int |
50 |
Maximum number of items to return |
--no-annotations |
bool |
false |
Include only items without annotation children |
--no-pdf |
bool |
false |
Include only items without a PDF attachment |
zotio items summarize¶
Assemble a bounded, synthesis-ready context bundle for an item or collection
Gather the highest-signal local context for an item (or every item in a collection) into one bounded bundle — citation, abstract, your annotations, a capped fulltext excerpt, and known metadata gaps — plus a synthesis prompt.
This command never calls a model: it does the assembly and budgeting the host LLM is bad at, then hands off. Reads are local only. With --agent/--json it emits the structured bundle; otherwise a readable Markdown brief you can paste into any LLM.
Examples:
zotio items summarize 9UXV5R7L
zotio items summarize 9UXV5R7L --agent --max-chars 6000
zotio items summarize --collection MAR7RFQN --no-fulltext
| Flag | Type | Default | Description |
|---|---|---|---|
--collection |
string |
Summarize every item in this collection key | |
--max-annotations |
int |
40 |
Max annotations included per item |
--max-chars |
int |
8000 |
Max characters of fulltext excerpt per item |
--no-fulltext |
bool |
false |
Omit the fulltext excerpt (abstract + annotations only) |
zotio items tags¶
Get or manage tags for a specific item
Examples:
zotio items tags add¶
Add one or more tags to items
| Flag | Type | Default | Description |
|---|---|---|---|
--keys-from |
string |
Read item keys from a file, '-' for stdin, or positional args when omitted | |
--tag |
stringArray |
[] |
Tag to add (repeatable) |
zotio items tags list¶
Get tags for a specific item
Examples:
zotio items tags remove¶
Remove one or more tags from items
| Flag | Type | Default | Description |
|---|---|---|---|
--keys-from |
string |
Read item keys from a file, '-' for stdin, or positional args when omitted | |
--tag |
stringArray |
[] |
Tag to remove (repeatable) |
zotio items top¶
List top-level items only (excludes attachments and notes)
Examples:
| Flag | Type | Default | Description |
|---|---|---|---|
--item-type |
string |
Filter by item type | |
--limit |
int |
0 |
Maximum number of items to return |
--query |
string |
Quick search query | |
--sort |
string |
Sort field | |
--start |
int |
0 |
Pagination offset |
--tag |
string |
Filter by tag |
zotio items trash¶
List items in the trash
Examples:
| Flag | Type | Default | Description |
|---|---|---|---|
--limit |
int |
0 |
Maximum number of items to return |
zotio items unfiled¶
List top-level items not assigned to any collection
| Flag | Type | Default | Description |
|---|---|---|---|
--limit |
int |
0 |
Maximum number of items to return (0 = no limit) |
--type |
string |
Filter by Zotero item type |
zotio items update¶
Update a specific item
Examples:
| Flag | Type | Default | Description |
|---|---|---|---|
--abstract-note |
string |
Abstract or summary | |
--collections |
string |
Collection keys to assign this item to | |
--extra |
string |
Extra notes field (also stores Better BibTeX citation key) | |
--stdin |
bool |
false |
Read request body as JSON from stdin |
--tags |
string |
Tags to apply (array of {tag: string} objects) | |
--title |
string |
Item title |
zotio items venues¶
Count synced items by publication venue
Examples:
| Flag | Type | Default | Description |
|---|---|---|---|
--top |
int |
20 |
Maximum number of venues to return |
--type |
string |
Filter by Zotero itemType |
zotio journal¶
Inspect the mutation run journal (applied write history)
zotio journal list¶
List recorded mutation runs, newest first
zotio journal show¶
Show the operations recorded for one mutation run
zotio journal undo¶
Reverse a recorded run's reversible (tag/collection) changes
zotio library¶
Library-wide analytics and reporting
zotio library health¶
Composite read-only library health report with a CI gate
Run a ranked, finding-typed health report over the locally synced library.
Composes the existing audit primitives (citekey conflicts, duplicates, missing metadata, tag drift, broken attachments) into one report. Pick what "ready" means with --for:
--for citation manuscript/bibliography readiness (citekeys, core fields, duplicates) --for systematic-review PRISMA screening corpus (duplicates, screenable metadata, full text) --for quick (default) anything obviously broken (citekey conflicts, duplicates, attachments) --for all every check
Gate CI with --fail-on critical|high|info (or legacy any) (exit 11 when the bar is not met).
The broken-attachment and retraction checks are live checks that need Zotero desktop or CrossRef network access respectively; pass --verify-files and/or --check-retractions to run them. When a gate-relevant check can't run because its precondition is unmet, the command refuses loudly (exit 9) rather than passing.
| Flag | Type | Default | Description |
|---|---|---|---|
--badge |
bool |
false |
Emit a shields.io endpoint JSON badge instead of the report |
--badge-label |
string |
bibliography |
Label for the shields.io endpoint badge |
--baseline |
string |
Read health finding identities from this baseline JSON; missing file establishes a baseline | |
--check-retractions |
bool |
false |
Run the live CrossRef retraction check (network; DOI-bearing items) |
--fail-on |
string |
Exit 11 if findings reach this severity: critical, high, info/any; none disables the gate (default: the preset's) | |
--fail-on-new |
string |
Exit 11 if new baseline-diff findings reach this severity: critical, high, info/any (requires --baseline) | |
--for |
string |
quick |
Check preset: quick, citation, systematic-review, all |
--limit |
int |
0 |
Max findings listed per kind (0 = all); also caps the live attachment scan |
--report |
string |
Write the full JSON health report to this file in addition to stdout/badge output | |
--require-fresh |
duration |
0s |
Refuse (exit 12) when the local store is staler than this (e.g. 24h); 0 = disabled |
--scope |
string |
Limit to a cohort: collection:KEY | tag:NAME | item:KEY | query:TEXT | saved-search:KEY (default: whole library) | |
--verify-files |
bool |
false |
Run the live broken-attachment check (needs Zotero desktop running) |
--write-baseline |
string |
Write current health finding identities to this baseline JSON after checks |
zotio library stats¶
Show library-wide local statistics
| Flag | Type | Default | Description |
|---|---|---|---|
--top |
int |
10 |
Number of venues to show |
--years |
int |
20 |
Number of years to show |
zotio library wrapped¶
Show a local year-in-review for your Zotero library
| Flag | Type | Default | Description |
|---|---|---|---|
--card |
string |
Write an 800x418 SVG share card to this path | |
--year |
int |
2026 |
Year to summarize |
zotio profile¶
Named sets of flags saved for reuse
Profiles capture a set of flag values under a name so a scheduled agent can invoke the same command with the same configuration each run.
profile save
Use --profile
zotio profile delete¶
Remove a profile
Examples:
zotio profile list¶
List saved profiles
Examples:
zotio profile save¶
Save the current invocation's non-default flags as a named profile
Captures every flag explicitly set on the invocation and stores
them under
To avoid creating empty profiles, at least one non-default flag must be present (other than --profile and --config).
Examples:
| Flag | Type | Default | Description |
|---|---|---|---|
--description |
string |
Short description shown in 'profile list' |
zotio profile show¶
Show a profile's values as JSON
Examples:
zotio profile use¶
Print the flag values a profile will apply (does not execute anything)
Examples:
zotio reading-list¶
Show the Zotero reading queue
| Flag | Type | Default | Description |
|---|---|---|---|
--limit |
int |
20 |
Maximum number of items to show |
--tag |
string |
to-read |
Override the reading queue tag |
zotio reading-list add¶
Add items to the reading queue
| Flag | Type | Default | Description |
|---|---|---|---|
--keys-from |
string |
Read item keys from a file, '-' for stdin, or positional args when omitted |
zotio reading-list done¶
Mark reading items as read
| Flag | Type | Default | Description |
|---|---|---|---|
--keys-from |
string |
Read item keys from a file, '-' for stdin, or positional args when omitted |
zotio reading-list start¶
Move queued items into the reading state
| Flag | Type | Default | Description |
|---|---|---|---|
--keys-from |
string |
Read item keys from a file, '-' for stdin, or positional args when omitted |
zotio schema¶
Zotero item type and field schema
zotio schema creator-fields¶
List all creator fields (firstName, lastName, name)
Examples:
zotio schema drift¶
Detect Zotero schema changes (new/removed item types and fields) vs a saved baseline
Capture a baseline fingerprint of the running Zotero's item-type and field schema, then on later runs report what changed. Use this after upgrading Zotero to see which item types, fields, or creator fields a new version added or removed — the deltas the CLI may not yet model.
The first run captures the baseline. Re-run after an upgrade to see drift. Pass --update to adopt the current live schema as the new baseline. The baseline is stored at ~/.local/share/zotio/schema-baseline.json (override with --baseline) and is shared across libraries because the schema is global to the Zotero install.
Examples:
# Capture a baseline on the current Zotero version
zotio schema drift
# After upgrading Zotero, see what changed
zotio schema drift
# Include per-item-type field/creator validity (many extra API calls)
zotio schema drift --deep
# Re-baseline to the current schema
zotio schema drift --update
| Flag | Type | Default | Description |
|---|---|---|---|
--baseline |
string |
Baseline file path (default: ~/.local/share/zotio/schema-baseline.json) | |
--deep |
bool |
false |
Also diff per-item-type field and creator-type validity (many extra API calls) |
--update |
bool |
false |
Adopt the current live schema as the new baseline after reporting |
zotio schema item-fields¶
List all available item fields
Examples:
zotio schema item-type-creator-types¶
List valid creator types for an item type
Examples:
| Flag | Type | Default | Description |
|---|---|---|---|
--item-type |
string |
Item type (e.g. journalArticle) |
zotio schema item-type-fields¶
List valid fields for a specific item type
Examples:
| Flag | Type | Default | Description |
|---|---|---|---|
--item-type |
string |
Item type (e.g. journalArticle) |
zotio schema item-types¶
List all available Zotero item types
Examples:
zotio schema new-item-template¶
Get a blank template for creating a new item of a given type
Examples:
| Flag | Type | Default | Description |
|---|---|---|---|
--item-type |
string |
Item type to get template for (e.g. journalArticle) |
zotio search¶
Full-text search across synced data or live API
Search data using FTS5 full-text search on locally synced data, or hit the API's search endpoint when available.
In auto mode (default): uses the API search endpoint if the API has one, otherwise searches local data. Falls back to local on network failure. In live mode: uses the API search endpoint only. In local mode: searches locally synced data only.
Examples:
# Search (uses API endpoint if available, local FTS otherwise)
zotio search "error timeout"
# Force local search only
zotio search "payment failed" --data-source local
# Search a specific resource type locally
zotio search "critical" --type transactions --data-source local
# JSON output for piping
zotio search "critical" --json --limit 20
| Flag | Type | Default | Description |
|---|---|---|---|
--db |
string |
Database path (default: ~/.local/share/zotio/data.db) | |
--limit |
int |
50 |
Maximum results to return |
--type |
string |
Filter by resource type |
zotio searches¶
Manage saved searches in your Zotero library
zotio searches get¶
Get a specific saved search
Examples:
zotio searches list¶
List all saved searches
Examples:
| Flag | Type | Default | Description |
|---|---|---|---|
--limit |
int |
0 |
Maximum number of searches to return |
zotio searches materialize¶
Add items from a saved search to a collection
| Flag | Type | Default | Description |
|---|---|---|---|
--to |
string |
Collection key to add saved-search items into |
zotio searches run¶
Run a saved Zotero search when the API exposes results
zotio sync¶
Sync API data to local SQLite for offline search and analysis
Sync data from the API into a local SQLite database. Supports resumable incremental sync (only fetches new data since last sync) and full resync. Once synced, use the 'search' command for instant full-text search.
Exit codes & warnings: Resources the API denies access to (HTTP 403, or HTTP 400 with an access-policy body) are reported as warnings rather than failing the run. In --json mode each is emitted as a {"event":"sync_warning",...} line carrying status, reason, and message fields, and a final {"event":"sync_summary",...} aggregates the run.
Exit 0 when at least one resource synced and no resource flagged in the spec as critical (x-critical: true) failed. Pass --strict to exit non-zero on any per-resource failure. Exit is always non-zero when every selected resource failed, regardless of --strict.
Examples:
# Sync all resources
zotio sync
# Sync specific resources only
zotio sync --resources channels,messages
# Full resync (ignore previous checkpoint)
zotio sync --full
# Incremental sync: only objects modified since a Zotero library version
zotio sync --since 4521
# Parallel sync with 8 workers
zotio sync --concurrency 8
# Latest-only: refresh head of each resource, no historical backfill
zotio sync --latest-only
| Flag | Type | Default | Description |
|---|---|---|---|
--concurrency |
int |
4 |
Number of parallel sync workers |
--db |
string |
Database path (default: ~/.local/share/zotio/data.db) | |
--full |
bool |
false |
Full resync (ignore previous checkpoint) |
--fulltext |
bool |
false |
Also sync PDF full-text content (slower; one request per attachment) |
--latest-only |
bool |
false |
Refresh head of each resource only; clears resume cursor and caps pages at 1. Mutually exclusive with --since (--since wins). |
--max-pages |
int |
100 |
Maximum pages to fetch per resource (0 = unlimited; cap-hit emits a sync_warning event) |
--resources |
stringSlice |
[] |
Comma-separated resource types to sync |
--since |
int |
0 |
Only sync objects modified since this Zotero library version (0 = use stored checkpoint). Get versions from a prior sync or 'items list --since'. |
--strict |
bool |
false |
Exit non-zero on any per-resource failure (default: only critical failures or all-resource failure exit non-zero). |
zotio tags¶
Manage tags across your Zotero library
zotio tags audit¶
Audit tags for case and spacing drift
Examples:
zotio tags audit fix¶
Apply the tag rename plan produced by tags audit
zotio tags get¶
Get a specific tag by name
Examples:
zotio tags inventory¶
Show tag usage within collections and across the library
| Flag | Type | Default | Description |
|---|---|---|---|
--collection |
string |
Show only tags within this collection key |
zotio tags list¶
List all tags in the library
Examples:
| Flag | Type | Default | Description |
|---|---|---|---|
--limit |
int |
0 |
Maximum number of tags to return |
--query |
string |
Filter tags by name substring | |
--start |
int |
0 |
Pagination offset |
zotio tags rename¶
Rename a tag across matching items
| Flag | Type | Default | Description |
|---|---|---|---|
--from |
string |
Old tag name | |
--limit |
int |
100 |
Maximum number of items to process per page |
--to |
string |
New tag name |
zotio tail¶
Stream live changes by polling the API at regular intervals
Tail streams live data changes by polling the API at configurable intervals. Events are emitted as NDJSON to stdout for piping to other tools. Gracefully shuts down on SIGTERM/SIGINT.
Note: For APIs with WebSocket or SSE support, a future version will use native streaming instead of polling.
Examples:
# Tail all changes every 10 seconds
zotio tail --interval 10s
# Tail a specific resource
zotio tail messages --interval 5s
# Pipe to jq for filtering
zotio tail events --interval 30s | jq 'select(.type == "error")'
| Flag | Type | Default | Description |
|---|---|---|---|
--db |
string |
Database path (default: ~/.local/share/zotio/data.db) | |
--follow |
bool |
true |
Keep running (set --follow=false for single poll) |
--interval |
duration |
10s |
Poll interval |
--resource |
string |
Resource type to tail |
zotio vault¶
Sync the library into an Obsidian/Logseq Markdown vault
zotio vault audit¶
Audit managed vault notes without writing
| Flag | Type | Default | Description |
|---|---|---|---|
--out |
string |
Vault directory (overrides [vault].root + notes_dir from config) |
zotio vault conflicts¶
List unresolved Zotero note write-back conflicts
| Flag | Type | Default | Description |
|---|---|---|---|
--out |
string |
Vault directory (overrides [vault].root + notes_dir from config) |
zotio vault pull¶
Bring remote Zotero child-note edits into the "## Notes" region (fast-forward)
Pull edits made to a managed Zotero child note back into the vault note's "## Notes" region. This is fast-forward only: a note is updated only when its local region is unchanged since the last sync. If both the local region and the remote note changed, it is reported as a conflict and nothing is merged or overwritten (resolve by hand, or 'vault resolve --keep-vault' to keep the vault copy). Only notes in the shape this CLI writes are pulled.
Use --dry-run to preview without writing to the vault.
Examples:
| Flag | Type | Default | Description |
|---|---|---|---|
--out |
string |
Vault directory (overrides [vault].root + notes_dir from config) |
zotio vault push¶
Write each note's "## Notes" region back to a Zotero child note
Push the user-owned Notes region of each vault note to a single managed Zotero child note (Obsidian -> Zotero). Reads stay local; writes go to the Web API (an api_key must be configured). Idempotent and conflict-safe: a note is only written when its Notes region changed since the last push, the remote note body is checked first, and a divergent remote is never overwritten — a conflict artifact is written under _vault-zotero-conflicts/ and reported instead.
Use --dry-run to preview create/update/conflict without writing anything.
Examples:
| Flag | Type | Default | Description |
|---|---|---|---|
--out |
string |
Vault directory (overrides [vault].root + notes_dir from config) |
zotio vault resolve¶
Resolve a note write-back conflict by keeping the vault or the remote copy
Resolve a conflict (or a remotely-deleted note) by choosing a direction:
--keep-vault writes the vault's Notes region over the Zotero child note, using the live remote version as the precondition. --recreate re-creates a child note that was deleted in Zotero.
--keep-remote does the reverse: it pulls the live Zotero note body over the vault Notes region, discarding local edits (a forced 'vault pull'). Only notes in the shape this CLI writes are pulled.
Exactly one direction is required so the destructive side is explicit; the resolved conflict artifact is removed on success.
Examples:
| Flag | Type | Default | Description |
|---|---|---|---|
--keep-remote |
bool |
false |
Pull the Zotero note over the vault Notes region (discards local edits) |
--keep-vault |
bool |
false |
Write the vault copy over the Zotero note (required direction) |
--out |
string |
Vault directory (overrides [vault].root + notes_dir from config) | |
--recreate |
bool |
false |
Re-create a child note deleted in Zotero |
zotio vault sync¶
Create/update one Markdown note per item in a vault (idempotent)
Materialize literature notes into an Obsidian or Logseq vault from the local store (run 'sync' first). Notes are named from the citation key, carry zotero:// backlinks, and embed current annotations in a managed block.
Re-running is idempotent and non-destructive: only the managed frontmatter keys and the fenced annotations block change; your prose and other frontmatter keys are preserved. Use --dry-run to preview create/update/unchanged without writing.
Examples:
zotio vault sync # uses [vault] root/notes_dir from config
zotio vault sync --out ~/vault/refs
zotio vault sync --out ~/vault/refs --collection ABCD1234 --dry-run
| Flag | Type | Default | Description |
|---|---|---|---|
--collection |
string |
Only sync items in this collection key | |
--format |
string |
obsidian |
Note format: obsidian or logseq |
--item-type |
string |
Only sync items of this type | |
--limit |
int |
0 |
Maximum items to sync (0 = all) |
--out |
string |
Vault directory (overrides [vault].root + notes_dir from config) | |
--tag |
string |
Only sync items with this tag |
zotio version¶
Print version
zotio watch¶
Keep the local store fresh with periodic incremental syncs
Watch keeps the local store fresh by running incremental sync cycles on
a configurable interval. It starts with an immediate sync, logs one concise status line per cycle to stderr, and exits gracefully on SIGINT or SIGTERM.
| Flag | Type | Default | Description |
|---|---|---|---|
--health |
bool |
false |
Run quick library health checks after each successful sync |
--health-for |
string |
quick |
Health preset for --health: quick, citation, systematic-review, all |
--health-webhook |
string |
POST health drift JSON to this webhook URL | |
--interval |
duration |
5m0s |
Sync interval |
--once |
bool |
false |
Run one sync cycle and exit |
zotio which¶
Find the command that implements a capability
which resolves a natural-language capability query (for example, "search messages" or "stale tickets") to the best matching command from this CLI's curated feature index.
Exit codes: 0 at least one match found 2 no confident match - the query did not score against any indexed capability; fall back to '--help' or 'search' if this CLI has one
Examples:
zotio which "stale tickets"
zotio which "bottleneck"
zotio which --limit 1 "send message"
zotio which # list the full capability index
| Flag | Type | Default | Description |
|---|---|---|---|
--limit |
int |
3 |
Maximum number of matches to return |
zotio workflow¶
Compound workflows that combine multiple API operations
zotio workflow archive¶
Sync all resources to local store for offline access and search
Archive fetches all syncable resources from the API and stores them in a local SQLite database. Supports incremental sync (only new data since last run) and full resync. After archiving, use 'search' for instant full-text search.
Examples:
# Archive all resources
zotio workflow archive
# Full re-archive (ignore previous sync state)
zotio workflow archive --full
| Flag | Type | Default | Description |
|---|---|---|---|
--db |
string |
Database path (default: ~/.local/share/zotio/data.db) | |
--full |
bool |
false |
Full re-archive (ignore previous sync state) |
zotio workflow run¶
Run a declarative workflow spec in-process
zotio workflow status¶
Show local archive status and sync state for all resources
Examples:
| Flag | Type | Default | Description |
|---|---|---|---|
--db |
string |
Database path |