← Back to Blog
CLIAIDeveloper ToolsTutorial

Space CLI: Manage Flashcards with AI in Your Terminal

Till Friebe ·

You learn a new framework, dive into system design, or prep for a technical interview. A week later, 80% of it is gone. Spaced repetition fixes that. But as a developer, it feels wrong to open a GUI, tap cards, and click through menus for it.

Space CLI gives you programmatic access to your flashcards. Export decks as JSON, full-text search your cards, create new ones with a single command, and pipe everything into Claude or ChatGPT for a learning workflow that lives where you already work.

What is Space CLI?

Space CLI is a standalone command-line tool that reads and writes your local Space database directly. The app stores every flashcard in a SQLite database on your device. The CLI talks to that file. No server round-trips, no API keys.

🚀

Your data stays yours

Space CLI works against your local database. Offline, fast, private. No server sees your queries. More than 160,000 users trust Space with their learning.

Thanks to SQLite’s WAL mode, the CLI and the app can run side by side without blocking each other.

CommandPurpose
space deck listList all decks with card counts and due cards
space deck cards <id>Show cards of a deck with due status
space card show <id>Detailed view: FSRS stability, retrievability, strength
space card search <query>Full-text search across fronts and backs
space deck stats <id>Learning stats with maturity distribution
space deck export <id>Export as JSON or CSV
space deck create <name>Create a new deck
space card create --deck <id>Add a new card to a deck
space card edit <id>Edit card content

Space CLI runs on macOS (Apple Silicon), Linux, and Windows.

Installation

The fastest path on macOS and Linux:

brew install space-org/tap/space-cli

No Homebrew? The installer handles everything in one step:

curl -fsSL https://raw.githubusercontent.com/space-org/space-cli/main/scripts/install.sh | sh

For Windows or manual installs, grab the binary for your system from the latest release and drop it on your PATH.

Verify:

space --version
# space-cli 0.1.0

Space CLI finds your database automatically. On macOS it lives in ~/Library/Containers/app.getspace.space/, on Linux in ~/.config/app.getspace.space/. For more details and troubleshooting, see the CLI page.

Custom database path

If auto-detection fails, set the path manually: space --db-path /path/to/space.db deck list

Space CLI in action

See decks and learning status at a glance

$ space deck list

ID        Name                  Cards  Due      Created
────────  ────────────────────  ─────  ───────  ──────────
a1b2c3d4  Spanish Vocabulary      342  12 due   2025-08-14
e5f6g7h8  System Design            89  0 due    2025-11-03
i9j0k1l2  Rust Ownership           56  3 due    2026-01-20

3 deck(s) total

One glance: 12 Spanish cards are due, System Design is clean.

Analyze learning progress

$ space deck stats a1b2c3d4

Spanish Vocabulary

Maturity Distribution
  New        ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░   3%  (10)
  Learning   ████░░░░░░░░░░░░░░░░░░░░░░░░░░  12%  (41)
  Young      ████████████░░░░░░░░░░░░░░░░░░  38%  (130)
  Mature     ██████████████░░░░░░░░░░░░░░░░  47%  (161)

Total Cards: 342
Due Now: 12
Avg Retrievability: 91.3%
Avg Strength: 74.8%

Review History (30 days)
  Total Reviews: 287
  Known: 246
  Unknown: 41
  Accuracy: 85.7%

These stats come from FSRS-6. “Retrievability” is the probability you’d answer the card correctly right now. “Strength” combines stability and retrievability into one score. Cards with stability below 30 days are “Young”, above are “Mature”.

Export your data

$ space deck export a1b2c3d4 --format json
{
  "deck": {
    "id": "a1b2c3d4-7b33-461c-b40f-c4ee786b54ea",
    "name": "Spanish Vocabulary",
    "description": "A1-B1 Core Vocabulary",
    "frontLanguage": "es-ES",
    "backLanguage": "en-US"
  },
  "cards": [
    {
      "id": "82ae9e66-b21b-4db5-956d-8d1062d4c835",
      "front": "el gato",
      "back": "the cat",
      "position": 0
    },
    {
      "id": "7507eef0-808d-410d-ba1c-e0f325e5012b",
      "front": "la casa",
      "back": "the house",
      "position": 1
    }
  ]
}

JSON for structured processing, CSV for spreadsheets. Both pipe straight into any AI tool.

Manage flashcards with AI in the terminal

Combining Space CLI with an LLM unlocks workflows a GUI cannot touch. You pipe structured data into a model and get back analyses, explanations, or new cards.

Find confusion pairs

Export a deck and let the AI surface semantic overlap:

space deck export a1b2c3d4 --format json | claude \
  "Here are my Spanish flashcards. Which words have similar
   meanings I could easily confuse? Generate mnemonics for the
   most confusing pairs."

The AI sees the whole deck at once. It spots patterns you miss when studying one card at a time: false friends, similar-sounding words, overlapping meanings.

Generate explanations for tough cards

When a card refuses to stick, a deeper explanation helps. Research on the elaboration effect shows that linking new knowledge to existing knowledge creates more retrieval paths in the brain.

space card show m3n4o5p6 | claude \
  "Explain this concept with a hands-on example and an analogy
   to something I already know as a developer."

Derive new cards from existing data

The generation effect says attempting your own answer before seeing the solution anchors knowledge deeper. AI-generated follow-up questions hit this mechanism directly.

space deck export e5f6g7h8 --format json | claude \
  "Analyze these system-design flashcards and create 10
   follow-up questions that deepen my understanding.
   Format: JSON array with 'front' and 'back' per card."

Write the result straight back into Space:

space card create --deck e5f6g7h8 \
  --front "How does eventual consistency differ from strong consistency?" \
  --back "Eventual: all replicas converge to the same state eventually. Strong: every read returns the latest write. Trade-off: latency vs. consistency (CAP theorem)."

Get stats analyzed

Feed real data and ask for recommendations:

space deck stats a1b2c3d4 | claude \
  "Analyze my learning stats. 47% of my cards are mature, 12%
   still in learning status. Where am I doing well, where
   should I invest more time?"

Automate with a shell script

For recurring reviews, script the workflow:

#!/bin/bash
# weekly-review.sh: Weekly deck analysis
for deck_id in $(space deck list --no-color | awk 'NR>2 && NF>0 {print $1}'); do
  echo "=== Analyzing deck $deck_id ==="
  space deck stats "$deck_id" --no-color
  echo ""
done

Any AI tool works

Claude, ChatGPT, Ollama, LM Studio: Space CLI provides the data, you pick the tool. With a local model like Ollama, your flashcard data never leaves your machine.

Why AI plus flashcards works

The pairing rides three well-documented learning principles. Retrieval practice is 2 to 3x more effective than rereading (Roediger and Karpicke, 2006), and spaced repetition is its most efficient form. The generation effect means knowledge you produce yourself sticks better than knowledge you passively consume, which is exactly what happens when AI drafts follow-up questions from your own deck. Elaboration anchors new knowledge by linking it to existing knowledge, so a developer analogy from Claude builds extra retrieval paths in your brain.

Space CLI automates access to all three. Instead of grinding through cards manually, you let AI find the weak spots and generate targeted material for them.

Sync across all your devices

Cards you create in the CLI show up automatically on your phone, tablet, and desktop. Cards you learn on the go are instantly queryable from the CLI.

This runs on PowerSync, an offline-first sync framework. Every CLI change lands in a local CRUD queue first. The next time the Space app is online, PowerSync pushes those changes to the server, and from there to all your devices. No manual sync, no export/import, no cloud login in the CLI.

The workflow:

  1. Commuting: review due cards on your phone
  2. At your desk: analyze stats via CLI, let AI generate new cards
  3. Evening: review on your tablet what you created during the day

Who Space CLI is for

  • Developers learning new technologies. Working your way into Kubernetes, Rust, or a new cloud service. Instead of letting knowledge vanish into bookmarks, export it as flashcards and let AI generate follow-up questions.
  • Language learners going systematic. Learning Japanese and want to auto-generate example sentences from your existing vocabulary deck. One pipe command does it.
  • Anyone who wants full control over their learning data. No paywall on export (unlike Quizlet). No lock-in. Your data as JSON or CSV, whenever you need it.

Ready? One command:

brew install space-org/tap/space-cli

Then space deck list turns your terminal into a learning hub. The Space app runs in parallel on phone, tablet, and desktop, so anything you create via CLI is immediately available everywhere.