cli-anything-zotero

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

cli-anything-zotero

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:
cli-anything-zotero
是一款面向Agent的Zotero桌面版CLI工具。它并未重新实现Zotero的功能,而是整合了Zotero本地的实际操作界面:

Installation

安装

bash
pip install -e .
bash
pip install -e .

Entry Points

入口点

bash
cli-anything-zotero
python -m cli_anything.zotero
bash
cli-anything-zotero
python -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.
  • 搜索条目
    条目导出
    条目引用
    条目参考文献
    功能需要启用Zotero的Local API。
  • 添加笔记
    功能依赖Zotero GUI的实时上下文,且要求应用中已选中对应的库。
  • 导入时的PDF附件支持仅限于同一连接器会话中创建的条目;为任意现有条目上传附件目前仍不在功能范围内。
  • 实验性SQLite写入命令仅支持本地操作,且仅限用户库使用,应视为非稳定的高级用户操作。
  • 如果不同库中存在重复的裸键,请在后续命令前执行
    session use-library <id>

Command Groups

命令组

App

应用(App)

Application and runtime inspection commands.
CommandDescription
status
Execute
status
.
version
Execute
version
.
launch
Execute
launch
.
enable-local-api
Execute
enable-local-api
.
ping
Execute
ping
.
用于检查应用和运行时状态的命令。
命令描述
status
执行状态检查。
version
执行版本查询。
launch
启动Zotero。
enable-local-api
启用Local API。
ping
执行连通性检测。

Collection

集合(Collection)

Collection inspection and selection commands.
CommandDescription
list
Execute
list
.
find
Execute
find
.
tree
Execute
tree
.
get
Execute
get
.
items
Execute
items
.
use-selected
Execute
use-selected
.
create
Execute
create
.
用于检查和选择集合的命令。
命令描述
list
列出集合。
find
查找集合。
tree
显示集合树形结构。
get
获取集合详情。
items
获取集合中的条目。
use-selected
选中当前GUI中选定的集合。
create
创建集合。

Item

条目(Item)

Item inspection and rendering commands.
CommandDescription
list
Execute
list
.
find
Execute
find
.
get
Execute
get
.
children
Execute
children
.
notes
Execute
notes
.
attachments
Execute
attachments
.
file
Execute
file
.
export
Execute
export
.
citation
Execute
citation
.
bibliography
Execute
bibliography
.
context
Execute
context
.
analyze
Execute
analyze
.
add-to-collection
Execute
add-to-collection
.
move-to-collection
Execute
move-to-collection
.
用于检查和渲染条目的命令。
命令描述
list
列出条目。
find
查找条目。
get
获取条目详情。
children
获取子条目。
notes
获取条目笔记。
attachments
获取条目附件。
file
获取条目关联文件。
export
导出条目。
citation
生成引用格式。
bibliography
生成参考文献。
context
获取条目上下文。
analyze
分析条目。
add-to-collection
将条目添加到集合。
move-to-collection
将条目移动到集合。

Search

搜索(Search)

Saved-search inspection commands.
CommandDescription
list
Execute
list
.
get
Execute
get
.
items
Execute
items
.
用于检查已保存搜索的命令。
命令描述
list
列出已保存搜索。
get
获取已保存搜索详情。
items
获取已保存搜索的结果条目。

Tag

标签(Tag)

Tag inspection commands.
CommandDescription
list
Execute
list
.
items
Execute
items
.
用于检查标签的命令。
命令描述
list
列出标签。
items
获取带有该标签的条目。

Style

样式(Style)

Installed CSL style inspection commands.
CommandDescription
list
Execute
list
.
用于检查已安装CSL样式的命令。
命令描述
list
列出已安装的CSL样式。

Import

导入(Import)

Official Zotero import and write commands.
CommandDescription
file
Execute
file
.
json
Execute
json
.
官方Zotero导入和写入命令。
命令描述
file
导入文件。
json
导入JSON数据。

Note

笔记(Note)

Read and add child notes.
CommandDescription
get
Execute
get
.
add
Execute
add
.
读取和添加子笔记的命令。
命令描述
get
获取笔记。
add
添加笔记。

Session

会话(Session)

Session and REPL context commands.
CommandDescription
status
Execute
status
.
use-library
Execute
use-library
.
use-collection
Execute
use-collection
.
use-item
Execute
use-item
.
use-selected
Execute
use-selected
.
clear-library
Execute
clear-library
.
clear-collection
Execute
clear-collection
.
clear-item
Execute
clear-item
.
history
Execute
history
.
会话和REPL上下文相关命令。
命令描述
status
检查会话状态。
use-library
指定使用的库。
use-collection
指定使用的集合。
use-item
指定使用的条目。
use-selected
选中当前GUI中选定的对象。
clear-library
清除当前指定的库。
clear-collection
清除当前指定的集合。
clear-item
清除当前指定的条目。
history
查看命令历史。

Examples

示例

Runtime Status

运行时状态

Inspect Zotero paths and backend availability.
bash
cli-anything-zotero app status --json
检查Zotero路径和后端可用性。
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
保存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
使用Zotero的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
在现有Zotero条目下创建子笔记。
bash
cli-anything-zotero note add <item-key> --text "Key takeaway" --json

Build LLM Context

构建LLM上下文

Assemble structured context for downstream model analysis.
bash
cli-anything-zotero item context <item-key> --include-notes --include-links --json
为下游模型分析组装结构化上下文。
bash
cli-anything-zotero item context <item-key> --include-notes --include-links --json

Version

版本

0.1.0
0.1.0