Reference for Causantic command-line interface.
npx causantic <command> [options]Initialize Causantic with an interactive setup wizard.
npx causantic init [options]Options:
| Option | Description |
|---|---|
--skip-mcp |
Skip MCP configuration (settings.json, project .mcp.json, skills, CLAUDE.md) |
--skip-encryption |
Skip the database encryption prompt |
--skip-ingest |
Skip the session import step |
The wizard performs the following steps:
- Checks Node.js version (requires 20+)
- Creates
~/.causantic/directory structure - Offers database encryption setup (ChaCha20-Poly1305, key stored in system keychain)
- Initializes the SQLite database
- Configures MCP server in
~/.claude.json - Patches project-level
.mcp.jsonfiles - Installs Causantic skills to
~/.claude/skills/ - Updates
~/.claude/CLAUDE.mdwith Causantic reference block - Runs a health check
- Offers to import existing Claude Code sessions
- Runs post-ingestion processing (clustering)
- Offers Anthropic API key setup for cluster labeling
Example:
# Full interactive setup
npx causantic init
# Non-interactive (skip all prompts)
npx causantic init --skip-mcp --skip-encryption --skip-ingestStart the MCP server.
npx causantic serve [options]Options:
| Option | Description |
|---|---|
--port <port> |
HTTP port (default: stdio) |
--health-check |
Enable health check endpoint |
Example:
npx causantic serve
npx causantic serve --health-checkIngest a single session.
npx causantic ingest <session-path> [options]Arguments:
| Argument | Description |
|---|---|
session-path |
Path to session JSONL file or project directory |
Options:
| Option | Description |
|---|---|
--force |
Re-ingest even if already processed |
--dry-run |
Show what would be ingested |
Example:
npx causantic ingest ~/.claude/projects/my-project/session-123.jsonl
npx causantic ingest ~/.claude/projects/my-project/Ingest all sessions from a directory.
npx causantic batch-ingest <directory> [options]Options:
| Option | Description |
|---|---|
--parallel <n> |
Number of parallel workers (default: 4) |
--force |
Re-ingest all sessions |
Example:
npx causantic batch-ingest ~/.claude/projects
npx causantic batch-ingest ~/.claude/projects --parallel 8Query memory from the command line.
npx causantic recall <query> [options]Options:
| Option | Description |
|---|---|
--limit <n> |
Maximum results (default: 10) |
--json |
Output as JSON |
Example:
npx causantic recall "authentication flow"
npx causantic recall "error handling" --limit 5 --jsonRun maintenance tasks.
npx causantic maintenance <subcommand> [options]Subcommands:
| Subcommand | Description |
|---|---|
run <task> |
Run a specific task |
run all |
Run all tasks |
status |
Show task status |
daemon |
Run as background daemon |
rebuild-edges |
Rebuild all edges from ingested session data |
Tasks:
| Task | Description |
|---|---|
scan-projects |
Discover and ingest new sessions |
update-clusters |
Re-run HDBSCAN clustering and refresh labels |
cleanup-vectors |
Remove expired vectors and chunks (TTL + FIFO cap) |
vacuum |
Optimize database |
Example:
npx causantic maintenance run cleanup-vectors
npx causantic maintenance run all
npx causantic maintenance status
npx causantic maintenance daemonManage configuration.
npx causantic config <subcommand> [options]Subcommands:
| Subcommand | Description |
|---|---|
show |
Display current configuration |
validate |
Validate configuration files |
set-key <name> |
Store an API key |
get-key <name> |
Retrieve an API key |
Example:
npx causantic config show
npx causantic config validate
npx causantic config set-key anthropic
npx causantic config get-key anthropicManage database encryption.
npx causantic encryption <subcommand> [options]Subcommands:
| Subcommand | Description |
|---|---|
setup |
Enable encryption and generate a key |
status |
Show encryption status |
rotate-key |
Rotate the encryption key |
backup-key [path] |
Back up the encryption key to a password-protected file |
restore-key <path> |
Restore an encryption key from a backup file |
audit [limit] |
Show recent audit log entries |
Example:
# Enable encryption
npx causantic encryption setup
# Check status
npx causantic encryption status
# Rotate key
npx causantic encryption rotate-key
# Back up key
npx causantic encryption backup-key ~/causantic-key-backup.enc
# Restore key
npx causantic encryption restore-key ~/causantic-key-backup.enc
# View last 20 audit entries
npx causantic encryption audit 20Export memory data. Archives are gzip-compressed by default and include vector embeddings for semantic search continuity.
npx causantic export [options]Options:
| Option | Description |
|---|---|
--output <path> |
Output file path (default: causantic-backup.causantic) |
--no-encrypt |
Skip encryption |
--projects <slugs> |
Comma-separated project slugs to export |
--redact-paths |
Redact file paths in content |
--redact-code |
Redact code blocks in content |
--no-vectors |
Skip vector embeddings (smaller file, but semantic search won't work after import) |
Example:
npx causantic export --output backup.causantic
npx causantic export --output backup.json --no-encrypt
npx causantic export --projects my-project,other-project --no-encrypt --output filtered.json
npx causantic export --redact-paths --redact-code --output sanitized.causantic
npx causantic export --no-vectors --output lightweight.causanticImport memory data. Supports encrypted, compressed, and plain JSON archives.
npx causantic import <file> [options]Options:
| Option | Description |
|---|---|
--merge |
Merge with existing data (default: replace) |
--dry-run |
Validate and report without importing |
Example:
npx causantic import backup.causantic
npx causantic import backup.causantic --merge
npx causantic import backup.causantic --dry-runShow memory statistics.
npx causantic stats [options]Options:
| Option | Description |
|---|---|
--json |
Output as JSON |
Example:
npx causantic stats
npx causantic stats --jsonRe-embed all chunks with the current embedding model. Required after changing embedding.model in configuration.
npx causantic reindex [options]Options:
| Option | Description |
|---|---|
--batch-size <n> |
Number of chunks per batch (default: 50) |
--dry-run |
Show what would be re-embedded |
Example:
# Re-embed all chunks
npx causantic reindex
# Dry run to see scope
npx causantic reindex --dry-run
# Re-embed in larger batches
npx causantic reindex --batch-size 100Check system health.
npx causantic healthExample:
npx causantic healthRun a hook manually.
npx causantic hook <hook-name> [options]Hooks:
| Hook | Description |
|---|---|
session-start |
Session start hook — retrieves memory context |
session-end |
Session end hook — ingests the current session |
pre-compact |
Pre-compaction hook — ingests the current session before compaction |
claudemd-generator |
Update CLAUDE.md with memory context |
Example:
npx causantic hook session-start
npx causantic hook claudemd-generatorLaunch the web dashboard for exploring your memory graph, clusters, and search results.
npx causantic dashboard [options]Options:
| Option | Description |
|---|---|
--port <port> |
HTTP port (default: 3333) |
Example:
# Launch on default port
npx causantic dashboard
# Launch on custom port
npx causantic dashboard --port 8080The dashboard provides 5 pages: Overview (collection stats), Timeline (D3.js swimlane visualization with chain walking), Search (query memory), Clusters (browse topic clusters), and Projects (per-project breakdowns).
See Dashboard Guide for details.
Run benchmarks against your collection to evaluate health, retrieval quality, graph value, and latency.
npx causantic benchmark-collection [options]Options:
| Option | Description |
|---|---|
--quick |
Health only (~1 second) |
--standard |
Health + retrieval (~30 seconds, default) |
--full |
All categories (~2-5 minutes) |
--categories <list> |
Comma-separated: health,retrieval,chain,latency |
--sample-size <n> |
Number of sample queries (default: 50) |
--seed <n> |
Random seed for reproducibility |
--project <slug> |
Limit to one project |
--output <path> |
Output directory (default: ./causantic-benchmark/) |
--json |
Output JSON only (no markdown) |
--no-tuning |
Skip tuning recommendations |
--history |
Show trend from past runs |
Example:
# Quick health check
npx causantic benchmark-collection --quick
# Standard benchmark with reproducible sampling
npx causantic benchmark-collection --seed 42
# Full benchmark for a specific project
npx causantic benchmark-collection --full --project my-app
# View historical trends
npx causantic benchmark-collection --historySee Benchmarking Guide for details on interpreting results and acting on recommendations.
Remove Causantic and all its artifacts.
npx causantic uninstall [options]Options:
| Option | Description |
|---|---|
--force |
Skip confirmation prompt and export offer |
--keep-data |
Remove integrations but preserve ~/.causantic/ data |
--dry-run |
Show what would be removed without making changes |
Removes the following artifacts:
- CLAUDE.md Causantic memory block
~/.claude.jsonMCP server entry~/.claude/settings.jsonlegacy MCP server entry (pre-0.5.0)- Project
.mcp.jsonCausantic server entries ~/.claude/skills/causantic-*/skill directories- Keychain entries (
causantic-db-key,anthropic-api-key) ~/.causantic/data directory (unless--keep-data)
Example:
# Preview what would be removed
npx causantic uninstall --dry-run
# Remove integrations but keep data
npx causantic uninstall --keep-data
# Remove everything without prompts
npx causantic uninstall --force
# Full uninstall, non-interactive
npx causantic uninstall --forceThese options work with all commands:
| Option | Description |
|---|---|
--version |
Show version |
--help |
Show help |
| Code | Description |
|---|---|
| 0 | Success |
| 1 | General error |
| 2 | Invalid arguments |
| 3 | Configuration error |
| 4 | Database error |