Cli Anything Zotero

作者 hkuds34f519533bc1無授權條款51K 個星標收錄於 2026年10月8日更新於 2026年10月8日儲存庫2 週前更新

CLI harness for Zotero.

AI 產生的概覽

面向代理的命令列工具,用來檢視與操作本機 Zotero 桌面文獻庫。

功能
這個技能說明了一套命令列工具,它包裝 Zotero 桌面版本機介面,而非重新實作 Zotero。它提供應用程式狀態、分類、條目、已儲存檢索、標籤、CSL 樣式、匯入、筆記與工作階段脈絡等命令群組,可渲染引文與參考文獻、匯出條目,並組裝供下游模型分析用的結構化脈絡。它輸出 JSON,也能新增子筆記或將檔案與 JSON 匯入文獻庫。
適用情境
當代理需要讀取或操作本機 Zotero 文獻庫時使用,例如列出分類與條目、渲染引文或參考文獻、匯出文獻、新增筆記,或為後續分析建立條目脈絡。適合 Zotero 桌面版在本機執行且可啟用其本機 API 的情境。
執行需求
需要 Python 並以 pip 安裝此套件、本機安裝的 Zotero 桌面版,以及為檢索、匯出、引文與參考文獻命令啟用 Zotero 本機 API。新增筆記依賴正在執行的 Zotero 圖形介面並選取同一個文獻庫;實驗性 SQLite 寫入命令僅限本機與使用者文獻庫。不附帶指令碼,僅為說明文件。

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

來源與署名

來源:hkuds/cli-anything位於skills/cli-anything-zotero提交34f5195

授權條款: 無授權條款

內容歸原作者所有。SourceWeft 從公開儲存庫中收錄這些內容。

檢舉或申請下架