In this section
FIRST RUN
From a bare machine to your first authenticated CLI call — nothing assumed installed.
One goal: get slab collector current to print your collector. When it does, every layer is wired — Python, the CLI, your API key, and your identity. Everything below is one-time setup. Do it once and every terminal you open afterwards just works — no re-typing, no export before each session.
what you're wiring up
Python → the slab CLI → key + collector → slab collector current ✓ install install saved in shell proves the whole chain works
WHERE YOU'LL TYPE THESE
Every command below runs in a terminal— a text window where you type a command and press Enter. If you've never opened one:
- macOS — press
⌘ Space, type "Terminal", hit Enter. - Windows— open the Start menu, type "PowerShell", hit Enter. (Use PowerShell, not the older Command Prompt.)
- Linux — open your terminal app (often
Ctrl+Alt+T).
1. GET PYTHON
The slabCLI is a Python program, so you need Python 3.13 or newer. Installing Python is its own thing and depends on your OS, so we won't reprint it here — follow the official python.org downloads, or ask an AI assistant "how do I install Python 3.13 on {your OS}?" and follow along.
Confirm it's there before moving on — macOS/Linux call it python3, Windows just python:
python3 --version # want: Python 3.13.x or newer
2. INSTALL THE CLI
The slab command ships on PyPI — one install, no clone:
pip install slab-cli # installs the `slab` command
pipx install slab-cli (or uv tool install slab-cli) keeps the CLI in its own environment.Confirm the command resolves — running it bare prints every command group:
slab
3. GRAB YOUR KEY AND COLLECTOR UUID
Your account — and the collector that owns your collection — were set up for you in this portal when you signed up (you don't create either from the CLI). The CLI needs two one-time values from the portal:
- API key — mint one on API Keys. The raw key shows once, so copy it now.
- Collector UUID — the identity the CLI acts as. On the same API Keys page, copy your collector (or the one marked Default).
4. SAVE BOTH IN THE SHELL — FOR GOOD
Setting these for just the current window works, but they're forgotten the moment you close the terminal — you'd retype them every session. Save them once so every future terminal loads them automatically. Pick your OS:
echo 'export SLAB_API_KEY=sk_live_...' >> ~/.zshrc echo 'export SLAB_COLLECTOR=your-collector-uuid' >> ~/.zshrc source ~/.zshrc # load them into the current terminal too
echo $SHELL ends in bash, use ~/.bashrc (or ~/.bash_profile on macOS) instead of ~/.zshrc. Windows: setx saves them for every new terminal — but not the one you ran it in, so open a fresh window before the next step.5. PROVE IT WORKS
The payoff command — it echoes back the collector you just set:
slab collector current
what you should see
Active collector: 3f9c1a2e-...
If that prints your collector UUID, the whole chain is live: Python runs the CLI, and the CLI reads your key and collector from the shell. From here, every new terminal is ready with zero setup.
SLAB_COLLECTOR is not set? The CLI never guesses a collector — go back to step 4 and set it to the UUID from API Keys. Managing several collectors? Point SLAB_COLLECTOR at whichever one you want the CLI to act as.What next
The CLI is wired — now put cards in it. The Adding Your Cards flow shows the three ways to build your collection and which to reach for first — walking a break's checklist and filling a purchase are far faster than adding one card at a time.
Prefer to explore first? The CLI documents itself — slab lists the groups, slab <group> --helpdetails one. And when you're ready to build your own project on the same endpoints, everything starts from that one API key.