Metadata-Version: 2.4
Name: zotero
Version: 0.1.1
Summary: Single-user, agent-first CLI for Zotero (literature management, PDF upload, RSS query)
Project-URL: Homepage, https://github.com/cywwycedward/zotero-cli
Project-URL: Repository, https://github.com/cywwycedward/zotero-cli
Project-URL: Issues, https://github.com/cywwycedward/zotero-cli/issues
Author: cywwycatari
License: MIT License
        
        Copyright (c) 2026 cywwycatari
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
License-File: LICENSE
Keywords: bibliography,cli,research,rss,webdav,zotero
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Console
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Utilities
Classifier: Typing :: Typed
Requires-Python: >=3.11
Requires-Dist: defusedxml>=0.7.1
Requires-Dist: pydantic-settings>=2.2.0
Requires-Dist: pyyaml>=6.0
Requires-Dist: pyzotero>=1.13.1
Requires-Dist: tomli-w>=1.0.0
Requires-Dist: typer[all]>=0.12.0
Requires-Dist: webdav4>=0.10.0
Provides-Extra: dev
Requires-Dist: mypy>=1.10; extra == 'dev'
Requires-Dist: pytest-cov>=5.0; extra == 'dev'
Requires-Dist: pytest-mock>=3.14; extra == 'dev'
Requires-Dist: pytest>=8.0; extra == 'dev'
Requires-Dist: respx>=0.21; extra == 'dev'
Requires-Dist: ruff>=0.4; extra == 'dev'
Requires-Dist: types-pyyaml>=6.0; extra == 'dev'
Provides-Extra: webdav-test
Requires-Dist: pytest-httpserver>=1.0; extra == 'webdav-test'
Requires-Dist: wsgidav>=4.3; extra == 'webdav-test'
Description-Content-Type: text/markdown

# zotero-cli

[![CI](https://github.com/cywwycedward/zotero-cli/actions/workflows/ci.yml/badge.svg)](https://github.com/cywwycedward/zotero-cli/actions/workflows/ci.yml)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)

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

## Installation

```bash
# 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

```bash
# 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, create, 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`):

```toml
[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

```bash
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.
