Skip to main content

A CLI tool to interact with local Zotero library.

Project description

zoterios

A CLI tool to interact with your local Zotero library.

Prerequisites

  • Python 3.13+
  • Zotero 7+ running locally (default port 23119)

Installation

# with uv (recommended)
uv tool install zoterios

# or with pip
pip install zoterios

Quick Start

# Check connection
zoterios ping

# List recent papers
zoterios papers list

# Search papers
zoterios papers list --query "transformer" --tag "ML" --limit 10

# Get paper details
zoterios papers get ABCD1234

# Open a paper's PDF
zoterios papers pdf ABCD1234 --open

# Read a paper as markdown
zoterios papers markdown ABCD1234

Commands

ping

Test connection to the local Zotero instance.

papers

Command Description
papers list [--query Q] [--tag T] [--limit N] List papers (default limit: 20)
papers get KEY Show paper details
papers pdf KEY [--open] Print PDF path, or open it with --open
papers markdown KEY Convert paper's PDF to markdown
papers import-pdf PATH --title T [opts] Import a local PDF into Zotero

import-pdf options:

--title TEXT        Paper title (required)
-a, --author TEXT   Author name (repeatable)
--year TEXT         Publication year
--type TEXT         Item type: document (default), journalArticle,
                    conferencePaper, preprint, book, thesis, report
--journal TEXT      Journal / publication name
--abstract TEXT     Abstract
--doi TEXT          DOI
--url TEXT          URL
-t, --tag TEXT      Tag (repeatable)

Example:

zoterios papers import-pdf paper.pdf \
  --title "Attention Is All You Need" \
  -a "Ashish Vaswani" -a "Noam Shazeer" \
  --year 2017 --type conferencePaper \
  --journal "NeurIPS" -t "transformer"

arxiv

Command Description
arxiv fetch ID Fetch paper metadata from arXiv
arxiv pdf ID [--open] Download PDF (cached locally)
arxiv markdown ID Convert arXiv PDF to markdown
arxiv source ID Download and extract TeX source
arxiv save ID [--no-pdf] Save paper to Zotero (with PDF by default)
arxiv check ID Check if paper already exists in Zotero
arxiv clear-cache ID Clear cached data for a paper

Example:

zoterios arxiv fetch 1706.03762
zoterios arxiv save 1706.03762

markdownit

Convert any supported file to markdown (PDF, DOCX, PPTX, HTML, etc.):

zoterios markdownit report.pdf
zoterios markdownit slides.pptx

Global Options

--base-url TEXT   Zotero API URL (default: http://localhost:23119)
--cache-dir TEXT  Cache directory (default: ~/.cache/zoterios)
--json            Output JSON for all commands

Configuration

Settings can be configured via environment variables (prefix ZOTERIOS_) or a .env file:

Variable Default Description
ZOTERIOS_BASE_URL http://localhost:23119 Zotero local API URL
ZOTERIOS_CACHE_DIR ~/.cache/zoterios Cache directory
ZOTERIOS_HTTP_PROXY HTTP proxy
ZOTERIOS_HTTPS_PROXY HTTPS proxy

CLI flags (--base-url, --cache-dir) take priority over env vars.

License

MIT

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

zoterios-0.2.0.tar.gz (12.9 kB view details)

Uploaded Source

Built Distribution

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

zoterios-0.2.0-py3-none-any.whl (19.9 kB view details)

Uploaded Python 3

File details

Details for the file zoterios-0.2.0.tar.gz.

File metadata

  • Download URL: zoterios-0.2.0.tar.gz
  • Upload date:
  • Size: 12.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.18 {"installer":{"name":"uv","version":"0.9.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for zoterios-0.2.0.tar.gz
Algorithm Hash digest
SHA256 6d9d580239db1765c519dae0f3b6bced9e0c47dde74d55b882e7f72a881e4d04
MD5 ae24255cb816c2f6e6693118d65d3398
BLAKE2b-256 eafbf09183139985f00436e9069a2f736bb60362207401ed3abf156c0a341422

See more details on using hashes here.

File details

Details for the file zoterios-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: zoterios-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 19.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.18 {"installer":{"name":"uv","version":"0.9.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for zoterios-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c3e076145f3fb85f14cfe9215d8a94bed08c10fca3c8c6d17ec3fe8c4e5da25f
MD5 7de976ae9a1e2a28bbf747eeb712b33a
BLAKE2b-256 f48f37614d9b072f868dbf343beb322b6434eff0c5697b2fa468279146bc29c1

See more details on using hashes here.

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