---
title: CLI
description: The cardstock CLI makes, links and exports cards.
---

The `cardstock` CLI in `packages/cli` does everything the web app does, and
is what agents use. Every command that returns data takes `--json`.

| Command                                         | What it does                                    |
| ----------------------------------------------- | ----------------------------------------------- |
| `cardstock setup`                               | Makes your owner key and vault key              |
| `cardstock pair`                                | A one-time code to pair another device          |
| `cardstock devices list`, `devices remove`      | The paired devices, and removing one            |
| `cardstock card create`                         | Makes a card from a card spec as JSON           |
| `cardstock card edit`, `show`, `list`, `delete` | Changes, shows, lists or deletes cards          |
| `cardstock media add <file>`                    | Adds your own picture or sound                  |
| `cardstock media add --openverse <query>`       | Finds a picture on Openverse                    |
| `cardstock media add --unsplash <query>`        | Finds a photo on Unsplash                       |
| `cardstock link add <card> --name <who>`        | A link for one person, with `--expires <date>`  |
| `cardstock link list`, `link remove`            | A card's links, and removing one                |
| `cardstock preset save`, `preset list`          | Saved starting points for new cards             |
| `cardstock export <card>`                       | Saves a card with `--still`, `--mp4` or `--gif` |
| `cardstock status`                              | Whether the server answers, and what's stored   |
| `cardstock agent tools --json`                  | The Code Mode manifest; see [Agents](/agents)   |
| `cardstock mcp`                                 | Serves the same operations over MCP on stdio    |

Its config lives in `~/.config/cardstock/config.json`, readable only by you.
Unsplash needs an access key in `UNSPLASH_ACCESS_KEY`; Openverse needs none.

Run it from the repository with `bun packages/cli/src/cli.ts`.

## Status

The CLI is still being built; today it only prints its version.
