candlekeep-cli 0.7.2

CandleKeep CLI - Manage your document library from the terminal
# CandleKeep CLI

Rust CLI for managing your CandleKeep document library.

## Quick Start

```bash
cargo build --release    # Build
cargo test               # Run tests
./target/release/ck      # Run locally
```

## Project Structure

```
src/
├── main.rs              # Entry point, CLI argument parsing (clap)
├── commands/            # Command implementations
│   ├── mod.rs
│   ├── auth.rs          # Login/logout flows
│   └── items.rs         # List, add, read, toc, remove
├── api.rs               # API client (types + ApiClient, all use Bearer auth)
└── output.rs            # Terminal output (comfy_table, colored, JSON mode)
```

## Supported File Types

- **PDF** (.pdf) - `application/pdf`
- **Markdown** (.md, .markdown) - `text/markdown`

## Release Process

Uses `cargo-release` with tag prefix `cli-v`:

```bash
cargo release patch --execute   # 0.6.0 → 0.6.1, tags cli-v0.6.1
cargo release minor --execute   # 0.6.0 → 0.7.0
cargo release major --execute   # 0.6.0 → 1.0.0
```

Tag `cli-v*` triggers CI: multi-platform build → GitHub Release → crates.io → Homebrew.

**Important:** Tag version and Cargo.toml version must match.

## Configuration

Config file: `~/.candlekeep/config.toml`

```toml
[auth]
api_key = "ck_..."

[api]
url = "https://www.getcandlekeep.com"  # or http://localhost:3000
```

## Testing Against Local Server

1. Start local: `../../infrastructure/scripts/dev.sh`
2. Edit `~/.candlekeep/config.toml``url = "http://localhost:3000"`
3. Re-auth: `ck auth logout && ck auth login`
4. Test: `ck items list`