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 从公开仓库中收录这些内容。

举报或申请下架