Cli Anything Zotero

by hkuds34f519533bc1No licenseListed Oct 8, 2026Updated Oct 8, 2026

CLI harness for Zotero.

Instructions onlyResearch & Analysis
AI-generated overview

Agent-native CLI harness for inspecting and operating a local Zotero desktop library.

What it does
This skill documents a command-line harness that wraps Zotero desktop's local surfaces rather than reimplementing it. It exposes command groups for app status, collections, items, saved searches, tags, CSL styles, imports, notes and session context, and can render citations and bibliographies, export items, and assemble structured context for downstream model analysis. It produces JSON output and can add child notes or import files and JSON into a library.
When to use it
Use it when an agent needs to read or act on a local Zotero library: listing collections and items, rendering citations or bibliographies, exporting references, adding notes, or building item context for later analysis. It suits workflows where Zotero desktop is running locally and its Local API can be enabled.
Requirements
Requires Python with the package installed via pip, a local Zotero desktop installation, and Zotero's Local API enabled for search, export, citation and bibliography commands. Note-adding depends on the live Zotero GUI with the same library selected; experimental SQLite write commands are local and user-library only. Ships no scripts; instructions only.

cli-anything-zotero

cli-anything-zotero is an agent-native CLI for Zotero desktop. It does not reimplement Zotero. Instead, it composes Zotero's real local surfaces:

Installation

bash
pip install -e .

Entry Points

bash
cli-anything-zoteropython -m cli_anything.zotero

Important Constraints

  • search items, item export, item citation, and item bibliography require Zotero's Local API to be enabled.
  • note add depends on the live Zotero GUI context and expects the same library to be selected in the app.
  • Import-time PDF attachment support is limited to items created in the same connector session; arbitrary existing-item attachment upload is still out of scope.
  • Experimental SQLite write commands are local-only, user-library-only, and should be treated as non-stable power-user operations.
  • If a bare key is duplicated across libraries, set session use-library <id> before follow-up commands.

Command Groups

App

Application and runtime inspection commands.

CommandDescription
statusExecute status.
versionExecute version.
launchExecute launch.
enable-local-apiExecute enable-local-api.
pingExecute ping.

Collection

Collection inspection and selection commands.

CommandDescription
listExecute list.
findExecute find.
treeExecute tree.
getExecute get.
itemsExecute items.
use-selectedExecute use-selected.
createExecute create.

Item

Item inspection and rendering commands.

CommandDescription
listExecute list.
findExecute find.
getExecute get.
childrenExecute children.
notesExecute notes.
attachmentsExecute attachments.
fileExecute file.
exportExecute export.
citationExecute citation.
bibliographyExecute bibliography.
contextExecute context.
analyzeExecute analyze.
add-to-collectionExecute add-to-collection.
move-to-collectionExecute move-to-collection.

Search

Saved-search inspection commands.

CommandDescription
listExecute list.
getExecute get.
itemsExecute items.

Tag

Tag inspection commands.

CommandDescription
listExecute list.
itemsExecute items.

Style

Installed CSL style inspection commands.

CommandDescription
listExecute list.

Import

Official Zotero import and write commands.

CommandDescription
fileExecute file.
jsonExecute json.

Note

Read and add child notes.

CommandDescription
getExecute get.
addExecute add.

Session

Session and REPL context commands.

CommandDescription
statusExecute status.
use-libraryExecute use-library.
use-collectionExecute use-collection.
use-itemExecute use-item.
use-selectedExecute use-selected.
clear-libraryExecute clear-library.
clear-collectionExecute clear-collection.
clear-itemExecute clear-item.
historyExecute history.

Examples

Runtime Status

Inspect Zotero paths and backend availability.

bash
cli-anything-zotero app status --json

Read Selected Collection

Persist the collection selected in the Zotero GUI.

bash
cli-anything-zotero collection use-selected --json

Render Citation

Render a citation using Zotero's Local API.

bash
cli-anything-zotero item citation <item-key> --style apa --locale en-US --json

Add Child Note

Create a child note under an existing Zotero item.

bash
cli-anything-zotero note add <item-key> --text "Key takeaway" --json

Build LLM Context

Assemble structured context for downstream model analysis.

bash
cli-anything-zotero item context <item-key> --include-notes --include-links --json

Version

0.1.0

Source and attribution

Source:hkuds/cli-anythinginskills/cli-anything-zoteroat commit34f5195

License: No license

Content belongs to its original authors. SourceWeft indexes it from a public repository.

Report or request removal