K-Dense-AI/scientific-agent-skills / skills/pyzotero
pyzotero
VerifiedManages Zotero reference libraries using the pyzotero Python client: retrieves, creates, updates, and deletes items, collections, tags, and attachments via the Zotero Web API v3 or local API. Applies when working with Zotero libraries programmatically, managing bibliographic references, exporting citations, searching library contents, uploading PDF attachments, or building research automation workflows that integrate with Zotero.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 7.8 KB |
| references/authentication.md | markdown | 5.1 KB |
| references/cli.md | markdown | 3.7 KB |
| references/collections.md | markdown | 3.8 KB |
| references/error-handling.md | markdown | 3.9 KB |
| references/exports.md | markdown | 3.9 KB |
| references/files-attachments.md | markdown | 4.3 KB |
| references/full-text.md | markdown | 2.4 KB |
| references/mcp.md | markdown | 6.1 KB |
| references/pagination.md | markdown | 2.4 KB |
| references/read-api.md | markdown | 4.3 KB |
| references/saved-searches.md | markdown | 3.6 KB |
| references/search-params.md | markdown | 3.7 KB |
| references/tags.md | markdown | 2.6 KB |
| references/write-api.md | markdown | 5.6 KB |
references/cli.md
View on GitHub# Command-Line Interface
The pyzotero CLI connects to your **local Zotero installation** (Zotero 7+ for reads, Zotero 10+ for writes) (not the remote Web API). It requires a running Zotero desktop app with local API access enabled:
**Zotero → Settings → Advanced → Allow other applications on this computer to communicate with Zotero**
## Installation
```bash
uv add "pyzotero[cli]==1.15.2"
# or run without installing:
uvx --from "pyzotero[cli]==1.15.2" pyzotero search -q "your query"
```
## Searching
```bash
# Search titles and metadata
pyzotero search -q "machine learning"
# Full-text search (includes PDF content)
pyzotero search -q "climate change" --fulltext
# Filter by item type
pyzotero search -q "methodology" --itemtype journalArticle --itemtype book
# Filter by tags (AND logic)
pyzotero search -q "evolution" --tag "reviewed" --tag "high-priority"
# Search within a collection
pyzotero search --collection ABC123 -q "test"
# Paginate results
pyzotero search -q "deep learning" --limit 20 --offset 40
# Output as JSON (for machine processing)
pyzotero search -q "protein" --json
```
## Getting Individual Items
```bash
# Get a single item by key
pyzotero item ABC123
# Get as JSON
pyzotero item ABC123 --json
# Get child items (attachments, notes)
pyzotero children ABC123 --json
# Get multiple items at once (up to 50)
pyzotero subset ABC123 DEF456 GHI789 --json
```
## Collections & Tags
```bash
# List all collections
pyzotero listcollections
# List all tags
pyzotero tags
# Tags in a specific collection
pyzotero tags --collection ABC123
```
## Full-Text Content
```bash
# Get full-text content of an attachment
pyzotero fulltext ABC123
```
## Item Types
```bash
# List all available item types
pyzotero itemtypes
```
## DOI Index
```bash
# Get complete DOI-to-key mapping (useful for caching)
pyzotero doiindex > doi_cache.json
# Returns JSON: {"10.1038/s41592-024-02233-6": {"key": "ABC123", "doi": "..."}}
```
## Output Format
By default the CLI outputs human-readable text including title, authors, date, publication, volume, issue, DOI, URL, and PDF attachment paths.
Use `--json` for structured JSON output suitable for piping to other tools.
## Search Behaviour Notes
- Default search covers top-level item titles and metadata fields only
- `--fulltext` expands search to PDF content; results show parent bibliographic items (not raw attachments)
- Multiple `--tag` flags use AND logic
- Multiple `--itemtype` flags use OR logic
## Authorized Local Writes (Zotero 10+)
The CLI also supports local writes in the reviewed 1.15.2 release. These are illustrative commands, not part of the read-only smoke test:
```bash
# Zotero displays its authorization dialog; choose the scope you intend.
pyzotero authorize --app-name "Research library tool"
pyzotero listitemfields journalArticle
pyzotero createitem items.json --json
pyzotero createcollection "Review papers" --json
pyzotero addtocollection COLKEY ITEMKEY --json
pyzotero removefromcollection COLKEY ITEMKEY --json
pyzotero movetocollection --from OLDCOLKEY --to NEWCOLKEY ITEMKEY --json
```
`items.json` contains an editable item object or array of objects. Validate bibliographic metadata before importing. The stored persistent local key and server ID are in `$XDG_CONFIG_HOME/pyzotero/local-api-key.json` (default `~/.config/pyzotero/local-api-key.json`); a Web API key does not authorize these commands. Collection membership commands update one item at a time.
For Semantic Scholar CLI commands (`related`, `citations`, `references`, `s2search`), network access is required; see the limitations in [mcp.md](mcp.md). Sources: [CLI documentation](https://pyzotero.readthedocs.io/en/latest/#command-line-interface), [release CLI source](https://github.com/urschrei/pyzotero/blob/v1.15.2/src/pyzotero/cli.py).
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| canvas-designanthropics/skillsCreate beautiful visual art in .png and .pdf documents using design philosophy. You should use this skill when the user asks to create a poster, piece of art, design, or other static piece. Create original visual designs, never copying existing artists' work to avoid copyright violations. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| docxanthropics/skillsUse this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files) or Word templates (.dotx files). Triggers include: any mention of 'Word doc', 'word document', '.docx', '.dotx', or requests to produce professional documents with formatting like tables of contents, headings, page numbers, or letterheads. Also use when extracting or reorganizing content from .docx or .dotx files, inserting or replacing images in documents, performing find-and-replace in Word files, working with tracked changes or comments, or converting content into a polished Word document. If the user asks for a 'report', 'memo', 'letter', 'template', or similar deliverable as a Word or .docx file, use this skill. Do NOT use for PDFs, spreadsheets, Google Docs, or general coding tasks unrelated to document generation. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| pdfanthropics/skillsUse this skill whenever the user wants to do anything with PDF files. This includes reading or extracting text/tables from PDFs, combining or merging multiple PDFs into one, splitting PDFs apart, rotating pages, adding watermarks, creating new PDFs, filling PDF forms, encrypting/decrypting PDFs, extracting images, and OCR on scanned PDFs to make them searchable. If the user mentions a .pdf file or asks to produce one, use this skill. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| pptxanthropics/skillsUse this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or presentations; reading, parsing, or extracting text from any .pptx or .potx file (even if the extracted content will be used elsewhere, like in an email or summary); editing, modifying, or updating existing presentations; combining or splitting slide files; working with templates (.potx), layouts, speaker notes, or comments. Trigger whenever the user mentions "deck," "slides," "presentation," or references a .pptx or .potx filename, regardless of what they plan to do with the content afterward. If a .pptx or .potx file needs to be opened, created, or touched, use this skill. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |