Metadata-Version: 2.4
Name: kaizoku-client
Version: 0.1.0
Summary: Unofficial CLI and Python client for the Kaizoku.NET API
Project-URL: Homepage, https://github.com/koreanmelon/kaizoku-client
Project-URL: Repository, https://github.com/koreanmelon/kaizoku-client
Project-URL: Issues, https://github.com/koreanmelon/kaizoku-client/issues
Author: koreanmelon
License-Expression: MIT
License-File: LICENSE
Keywords: api-client,cli,kaizoku,kaizoku-net,manga
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Console
Classifier: Intended Audience :: End Users/Desktop
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Internet :: WWW/HTTP
Classifier: Topic :: Utilities
Requires-Python: >=3.10
Requires-Dist: rich-argparse>=1.7
Description-Content-Type: text/markdown

# kaizoku-client

[![CI](https://github.com/koreanmelon/kaizoku-client/actions/workflows/ci.yml/badge.svg)](https://github.com/koreanmelon/kaizoku-client/actions/workflows/ci.yml)
[![PyPI](https://img.shields.io/pypi/v/kaizoku-client.svg)](https://pypi.org/project/kaizoku-client/)
[![Python Versions](https://img.shields.io/pypi/pyversions/kaizoku-client.svg)](https://pypi.org/project/kaizoku-client/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)

Unofficial CLI and Python client for the Kaizoku.NET API.

This project is not affiliated with, endorsed by, or maintained by the Kaizoku.NET project.

## Naming

- PyPI package: `kaizoku-client`
- Import package: `kaizoku`
- CLI command: `kaizoku`

## Usage

Prerequisite: a running Kaizoku.NET server with its API reachable from your machine. The default
API base URL is `http://127.0.0.1:9833`.

Run without installing permanently:

```sh
uvx --from kaizoku-client kaizoku --help
```

Install as a persistent CLI tool:

```sh
uv tool install kaizoku-client
kaizoku --help
```

Other install options:

```sh
pipx install kaizoku-client
pip install kaizoku-client
```

Override the API endpoint with `--url` or `KAIZOKU_URL`.

```sh
KAIZOKU_URL=http://127.0.0.1:9833 kaizoku metrics
kaizoku --url http://127.0.0.1:9833 providers --table
kaizoku --version
```

## CLI Examples

```sh
kaizoku --help
kaizoku metrics
kaizoku providers --table
kaizoku search-sources --table
kaizoku search "Absolute Regression" --languages en --table
kaizoku library --table
kaizoku downloads --status waiting --table
```

Destructive commands are guarded. `retry`, `delete`, and `cleanup --yes` mutate the Kaizoku.NET
server download queue; this CLI does not directly delete local files.

```sh
kaizoku delete "<download-id>" --yes
kaizoku cleanup --status completed
kaizoku cleanup --status completed --yes
```

`cleanup` is a dry run unless `--yes` is passed. Cleaning up running downloads requires
`--force-running`.

## Python Client

```python
from kaizoku import KaizokuClient

client = KaizokuClient()
print(client.metrics())
```

Pass a custom base URL explicitly:

```python
from kaizoku import KaizokuClient

client = KaizokuClient("http://127.0.0.1:9833")
```

## Development

```sh
uv run kaizoku --help
uv run --group dev ruff check .
uv run --group dev ruff format --check .
uv run --group dev mypy
uv run --group dev pytest
uv build
```

## Release

Releases are published from GitHub Actions with trusted publishing.

Before running the release workflow, manually bump `version` in `pyproject.toml`, run `uv lock`,
update `CHANGELOG.md`, and commit those changes. The release workflow publishes exactly the version
already committed to `pyproject.toml`; it does not bump versions automatically.

The workflow fails if the version already exists as a git tag, GitHub Release, TestPyPI release, or
PyPI release.

Configure these GitHub environments before the first release:

- `testpypi`
- `pypi`

Configure trusted publishers for `.github/workflows/release.yml` on both TestPyPI and PyPI.
The release workflow publishes to TestPyPI first, verifies an install with `uvx`, then publishes
the same artifacts to PyPI.
