CLI Reference
@spiral/cli Overview
The Spiral CLI is a Git-like interface for managing your project's knowledge. It allows any developer to synchronize their local environment with the central knowledge graph, regardless of which IDE they use.
Git-like mental model
If you know Git, you already know how to use Spiral. While Git synchronizes lines of code, Spiral synchronizes decisions, facts, and constraints.
| Git | Spiral | What it does |
|---|---|---|
| git init | spiral init | Scan codebase, extract context, create project |
| git clone | spiral clone | Download knowledge base + IDE config files |
| git status | spiral status | Health score, drift, proposals, locks |
| git pull | spiral pull | Fetch the latest knowledge from the server |
| git push | spiral push | Upload local context changes |
| git diff | spiral diff | Unified diff of local vs. server |
| git log | spiral log | Timeline of fact mutations |
| git log --follow | spiral history <key> | Full version history of a specific fact |
| — | spiral graph show | Knowledge graph summary |
| — | spiral edges list | Typed relationships between facts |
| — | spiral snapshot --at | Point-in-time view at a specific date |
| — | spiral extract --deep | Comprehensive 8-phase codebase analysis |
| — | spiral explore | Browse public knowledge bases |
Global flags
--jsonOutput responses in JSON format for CI/CD integration.--quietSuppress non-essential logging output.