Skip to main content

Single-user, agent-first CLI for Zotero (literature management, PDF upload, RSS query)

Project description

zotero-cli

CI License: MIT

Single-user, agent-first CLI for Zotero — literature management, PDF upload, RSS query.

Installation

# From PyPI after the first release is published
uv tool install zotero

# From source
git clone https://github.com/cywwycedward/zotero-cli.git
cd zotero-cli
uv sync --extra dev
uv run zotero-cli --help

Quick Start

# Initialize config
zotero-cli config init

# Set API key
zotero-cli config set api_key <your-zotero-api-key>
zotero-cli config set library_id <your-library-id>

# List items
zotero-cli items list

# Attach a PDF (ZFS default)
zotero-cli items create --type journalArticle --title "My Paper" --attach paper.pdf

Commands

Group Commands
items list, search, show, find-doi, create, add-doi, update, delete, attach, export
collections list, show, create, delete, add-items, remove-items
tags list, add, remove, rename, delete
feeds list, show, items
config init, show, set, get, validate, profiles
schema JSON command tree introspection

Global Flags

--json        JSON envelope output
--profile     Profile name (default: "default")
--quiet, -q   Quiet mode: keys only

Output Modes

  • Default: Human-readable (KV, tree, summary, YAML) — designed for agent consumption
  • --json: Full JSON envelope with ok, data, error, meta — for scripts and jq
  • --quiet: Keys only, one per line — for xargs pipelining

Configuration

~/.config/zotero-cli/config.toml (permission 0600):

[default]
api_key = "..."
library_id = "12345678"
library_type = "user"

[default.webdav]          # Optional: enables WebDAV attachment upload
url = "https://dav.example.com"
storage_path = "/zotero"
username = "myuser"
password = "mypass"

[default.sqlite]
path = "/home/user/Zotero/zotero.sqlite"

Environment overrides: ZOTERO_CLI_<PROFILE>_<KEY> (e.g. ZOTERO_CLI_DEFAULT_API_KEY).

Development

uv sync --extra dev
uv run ruff check src tests
uv run mypy src
uv run pytest --cov=src
uv build

See DEVELOPMENT.md for the full development guide and CONTRIBUTING.md for contribution expectations.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

zotero-0.2.5.tar.gz (191.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

zotero-0.2.5-py3-none-any.whl (64.1 kB view details)

Uploaded Python 3

File details

Details for the file zotero-0.2.5.tar.gz.

File metadata

  • Download URL: zotero-0.2.5.tar.gz
  • Upload date:
  • Size: 191.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for zotero-0.2.5.tar.gz
Algorithm Hash digest
SHA256 8ef7fb72bc62fe8890469c2d12ed7399c3fa9b9e38d1695a6d00f52000ae0e23
MD5 8ea4035b8ab2fc267d8692df8f32aaed
BLAKE2b-256 17ee8ed46f85c5ca0d09f1877818e2a3e4f68d17cc4f056087b3349fe0f2efba

See more details on using hashes here.

Provenance

The following attestation bundles were made for zotero-0.2.5.tar.gz:

Publisher: release.yml on cywwycedward/zotero-cli

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file zotero-0.2.5-py3-none-any.whl.

File metadata

  • Download URL: zotero-0.2.5-py3-none-any.whl
  • Upload date:
  • Size: 64.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for zotero-0.2.5-py3-none-any.whl
Algorithm Hash digest
SHA256 eb697a6f00cc085371ef878b8e6831a77ddf3c5176a3d14f34d8372a5e8a6cec
MD5 de9dde0d675140bba3658fd626c0342a
BLAKE2b-256 3055ea5f94123a55b29a21fcc7a597d6b37c81c90154ab3fba6d145865a33414

See more details on using hashes here.

Provenance

The following attestation bundles were made for zotero-0.2.5-py3-none-any.whl:

Publisher: release.yml on cywwycedward/zotero-cli

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page