Metadata-Version: 2.3
Name: slab-cli
Version: 0.2.0
Summary: CLI for the slab trading-card API — catalog, collect, and track your cards from the terminal.
Author: dev_jeb
Requires-Dist: slab-schemas>=0.1.0
Requires-Dist: httpx>=0.27
Requires-Dist: rich>=13.0
Requires-Dist: inquirerpy>=0.3
Requires-Python: >=3.13
Description-Content-Type: text/markdown

# slab-cli

A terminal client for the [slab](https://api.slab.dev-jeb.com) trading-card API — browse the
catalog, price cards against real sales comps, and track your own collection from the command line.

```bash
pip install slab-cli
```

This installs the `slab` command.

## Setup

The CLI talks to the hosted slab API. You need an **API key** — mint one from the
[slab portal](https://app.slab.dev-jeb.com) (sign in → **API Keys** → create). Then:

```bash
export SLAB_API_KEY=sk_live_...        # your key (required)
# optional:
export SLAB_API_URL=https://api.slab.dev-jeb.com   # default; override for a self-hosted API
export SLAB_COLLECTOR=<collector-uuid>             # your active collector, reused across commands
```

## Quickstart

```bash
# Catalog + pricing (no collector needed)
slab card search --subject "Connor Bedard"      # find cards
slab card price <card-uuid>                      # fair-market value from sales comps
slab card comps <card-uuid>                      # the underlying recent sales
slab set "OPC Platinum"                          # a set's sealed FMV + top cards

# Your collection
slab collector create                            # one-time: create your collector profile
slab collection add                              # add an owned copy (grade, cost, acquisition)
slab collection cost                             # log grading/shipping costs on a copy
slab break new                                   # record a box/case break
slab collection dashboard                        # portfolio value, cost basis, P&L
slab collection search                           # search + filter your copies
```

Run `slab` with no arguments for the full command list, or `slab <group>` (e.g. `slab collection`)
to see a group's verbs.

## Configuration reference

| Env var         | Purpose                                    | Default                          |
| --------------- | ------------------------------------------ | -------------------------------- |
| `SLAB_API_KEY`  | API key for authentication (**required**)  | —                                |
| `SLAB_API_URL`  | Base URL of the slab API                   | `https://api.slab.dev-jeb.com`   |
| `SLAB_COLLECTOR`| Active collector UUID, reused per command  | —                                |

## What it depends on

Requests and responses are typed against [`slab-schemas`](https://pypi.org/project/slab-schemas/) —
the same pydantic wire contract the API itself uses — so the CLI and API can never drift.

Requires Python 3.13+.
