cli-anything-zotero 是做什麼的?
cli-anything-zotero 是一個為 Zotero 桌面版設計的 AI Agent 原生 CLI。它並非重新實作 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