Communitygithub.com

cli-anything-zotero

一款面向AI代理的原生CLI工具,用于与Zotero桌面版交互,无需重新实现Zotero本身。

cli-anything-zotero 是什么?

cli-anything-zotero 是一款专门为 AI 代理(如 Claude Code、Cursor 等)设计的原生命令行工具,用于与 Zotero 桌面版进行深度交互。它不重新实现 Zotero 功能,而是通过组合 Zotero 本地的 API、SQLite 数据库和 GUI 上下文,提供了一种高效、可编程的方式来管理参考文献、条目、笔记和附件。该工具支持查询项目、导出引用、管理集合和标签、添加笔记等操作,特别适合开发者或研究人员需要将 Zotero 集成到自动化工作流或 LLM 上下文构建中的场景。它遵循 Zotero 的本地约束(如需要启用本地 API、依赖 GUI 上下文等),并提供了丰富的命令组和会话管理功能,使得在命令行环境中进行复杂的文献管理任务变得流畅自然。

兼容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/HKUDS/CLI-Anything/tree/main/skills/cli-anything-zotero

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

cli-anything-zotero 是做什么的?

cli-anything-zotero 是一款面向AI代理的原生CLI工具,用于与Zotero桌面版交互。它并不重新实现Zotero,而是通过组合Zotero真实的本地表面来实现功能:

安装

pip install -e .

入口点

cli-anything-zotero
python -m cli_anything.zotero

重要约束

  • search items、item export、item citation 和 item bibliography 需要启用 Zotero 的本地 API。
  • note add 依赖于实时的 Zotero GUI 上下文,并期望在应用中选择了相同的库。
  • 导入时的 PDF 附件支持仅限于在同一连接器会话中创建的条目;对任意现有条目附加文件的功能仍超出范围。
  • 实验性的 SQLite 写入命令仅限本地、用户库操作,应视为非稳定的高级用户操作。
  • 如果裸键在多个库中重复,应在后续命令前使用 session use-library <id>。

命令组

App

应用和运行时检查命令。

命令描述
status执行 status。
version执行 version。
launch执行 launch。
enable-local-api执行 enable-local-api。
ping执行 ping。

Collection

集合检查和选择命令。

命令描述
list执行 list。
find执行 find。
tree执行 tree。
get执行 get。
items执行 items。
use-selected执行 use-selected。
create执行 create。

Item

条目检查和渲染命令。

命令描述
list执行 list。
find执行 find。
get执行 get。
children执行 children。
notes执行 notes。
attachments执行 attachments。
file执行 file。
export执行 export。
citation执行 citation。
bibliography执行 bibliography。
context执行 context。
analyze执行 analyze。
add-to-collection执行 add-to-collection。
move-to-collection执行 move-to-collection。

Search

已保存搜索的检查命令。

命令描述
list执行 list。
get执行 get。
items执行 items。

Tag

标签检查命令。

命令描述
list执行 list。
items执行 items。

Style

已安装的 CSL 样式检查命令。

命令描述
list执行 list。

Import

官方 Zotero 导入和写入命令。

命令描述
file执行 file。
json执行 json。

Note

读取和添加子笔记。

命令描述
get执行 get。
add执行 add。

Session

会话和 REPL 上下文命令。

命令描述
status执行 status。
use-library执行 use-library。
use-collection执行 use-collection。
use-item执行 use-item。
use-selected执行 use-selected。
clear-library执行 clear-library。
clear-collection执行 clear-collection。
clear-item执行 clear-item。
history执行 history。

示例

运行时状态

检查 Zotero 路径和后端可用性。

cli-anything-zotero app status --json

读取选定集合

持久化 Zotero GUI 中选择的集合。

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

渲染引用

使用 Zotero 本地 API 渲染引用。

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

添加子笔记

在现有 Zotero 条目下创建子笔记。

cli-anything-zotero note add <item-key> --text "关键要点" --json

构建 LLM 上下文

为下游模型分析组装结构化上下文。

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

版本

0.1.0

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

cli-anything-adguardhome

>-

cli-anything-anygen

>-

cli-anything-audacity

>-

cli-anything-blender

>-

cli-anything-browser

Browser automation CLI using DOMShell MCP server. Maps Chrome

cli-anything-calibre

>-

cli-anything-ccswitch

CLI interface for CC Switch — manage AI coding tool configurations from the terminal

cli-anything-chromadb

>-

cli-anything-cloudanalyzer

Command-line interface for CloudAnalyzer — Agent-friendly harness for CloudAnalyzer, a QA platform for mapping, localization, and perception outputs. Supports 27 commands across 8 groups: point cloud evaluation, trajectory evaluation, ground segmentation QA, config-driven quality gates, baseline evolution, processing, visualization, and interactive REPL.

cli-anything-cloudcompare

Command-line interface for CloudCompare — Agent-friendly harness for CloudCompare, the open-source 3D point cloud and mesh processing software. Supports 41 commands across 9 groups: project management, session control, point cloud operations (subsample, filter, segment, analyze), mesh operations, distance computation (C2C, C2M), transformations (ICP, matrix), export (LAS/LAZ/PLY/PCD/OBJ/STL/E57), and interactive REPL.

cli-anything-comfyui

>-

cli-anything-dify-workflow

Wrapper for the Dify workflow DSL CLI. Create, inspect, validate, edit, and export Dify workflow files through a CLI-Anything harness.

cli-anything-drawio

>-

cli-anything-eez-studio

Use EEZ Studio from the command line: inspect and modify native .eez-project files, edit LVGL screens/widgets, manage SCPI commands, and invoke the real EEZ Studio backend for LVGL builds.

cli-anything-eth2-quickstart

>-

cli-anything-exa

>-

cli-anything-firefly-iii

Firefly III CLI - Personal finance management via CLI-Anything

cli-anything-freecad

Complete CLI harness for FreeCAD parametric 3D CAD modeler (258 commands). Covers ALL workbenches: Part (29 primitives + boolean + mirror + loft + sweep), Sketcher (26 cmds: geometry + constraints + editing), PartDesign (38 cmds: pad/pocket/groove/fillet/chamfer/patterns/hole/datum), Assembly (11 cmds), Mesh (16 cmds), TechDraw (15 cmds: views + dimensions + PDF/SVG), Draft (33 cmds: 2D shapes + arrays + transforms), FEM (12 cmds), CAM/CNC (10 cmds), Surface (6 cmds), Spreadsheet (7 cmds), Import (13 formats), Export (17 formats), Measure (12 cmds), Materials (21 presets). Headless FreeCAD export to STEP/IGES/STL/OBJ/DXF/PDF/glTF/3MF.

cli-anything-gimp

>-

cli-anything-godot

>-

相关技能