CLI Reference
Memory Management
While AI agents write facts via MCP automatically, the CLI gives you direct access to read, write, search, and explore your project's knowledge graph.
Working with facts
# List all facts
$ spiral facts list
# Add a fact manually
$ spiral facts add stack auth "Supabase Auth with JWT"
# Search across all facts
$ spiral facts search "payment"
$ spiral facts list
# Add a fact manually
$ spiral facts add stack auth "Supabase Auth with JWT"
# Search across all facts
$ spiral facts search "payment"
Knowledge graph
# View the knowledge graph summary
$ spiral graph show
# List nodes with connection counts
$ spiral graph list
# View typed relationships
$ spiral edges list
# Add a relationship
$ spiral edges add --from stack.frontend --to stack.backend --type communicates_with
$ spiral graph show
# List nodes with connection counts
$ spiral graph list
# View typed relationships
$ spiral edges list
# Add a relationship
$ spiral edges add --from stack.frontend --to stack.backend --type communicates_with
History & time travel
# Full version history of a fact
$ spiral history stack.frontend
# View all facts valid at a specific date
$ spiral snapshot --at 2026-03-01
# Provenance log (what happened and when)
$ spiral episodes
# Timeline of all fact mutations
$ spiral log
$ spiral history stack.frontend
# View all facts valid at a specific date
$ spiral snapshot --at 2026-03-01
# Provenance log (what happened and when)
$ spiral episodes
# Timeline of all fact mutations
$ spiral log
Extraction
# Quick extraction from codebase
$ spiral extract
# Comprehensive 8-phase deep extraction
$ spiral extract --deep
$ spiral extract
# Comprehensive 8-phase deep extraction
$ spiral extract --deep