Skip to content

CLI Reference ​

Setup ​

CommandDescription
somtum initInstall the SessionEnd + PreCompact capture hooks (Claude Code)
somtum init --cacheAlso install the UserPromptSubmit cache + auto-inject hook
somtum init --file-gatingAlso install the PreToolUse file-gating hook
somtum init --allInstall all hooks + MCP server
somtum init --forceReinstall even if hooks are already present
somtum init --agent codexInstall for Codex: capture + auto-inject hooks in .codex/hooks.json, MCP server in .codex/config.toml
somtum doctorCheck DB health, migrations, hooks, API key, breakeven ratio, stale memories

Memory ​

CommandDescription
somtum listList stored memories (most recent first)
somtum list --kind decisionFilter by kind: decision | learning | bugfix | command | file_summary
somtum list --limit 20Limit to 20 results
somtum list --jsonMachine-readable JSON output
somtum search <query>Search observations (default: bm25 strategy)
somtum search <query> --strategy hybridForce a specific retrieval strategy
somtum search <query> -k 16Return more results
somtum show <id>Print the full body of an observation
somtum rememberManually store an observation
somtum forget <id>Soft-delete an observation by id
somtum forget --allSoft-delete all observations in the current project
somtum edit <id>Open an observation body in $EDITOR
somtum rebuildRegenerate index.md from all observations
somtum reindexRecompute embeddings (after enabling embeddings or changing model)
somtum suggest-claude-mdSuggest CLAUDE.md additions from accumulated observations (interactive)
somtum suggest-claude-md --dry-runPreview suggestions without writing
somtum suggest-claude-md --yes --limit 20Auto-confirm, limit to top 20 by tokens saved

Stats & Visibility ​

CommandDescription
somtum statsTokens saved, cache hit rate, retrieval breakdown
somtum stats --jsonMachine-readable JSON output
somtum serveOpen the visual dashboard in the browser
somtum serve --port <n>Use a custom port (default: 3000)
somtum serve --no-openStart server without opening the browser

Data Management ​

CommandDescription
somtum exportExport observations to stdout as JSON
somtum export --format jsonl --output obs.jsonlExport as JSONL file
somtum export --format markdownExport as readable Markdown
somtum export --include-deletedInclude soft-deleted entries
somtum import <file>Import observations from JSON or JSONL
somtum purge --older-than 30dHard-delete soft-deleted entries older than 30 days
somtum purge --older-than 30d --dry-runPreview without deleting
somtum resetPermanently wipe all memories for the current project (asks to confirm)
somtum reset --yesSkip confirmation (useful in CI or scripts)

Configuration ​

CommandDescription
somtum config getPrint the full resolved config
somtum config get retrieval.strategyRead a single key (dot-separated)
somtum config set retrieval.strategy hybridWrite to .somtum/config.json
somtum config set retrieval.embeddings.enabled true --globalWrite to ~/.somtum/config.json

Sync ​

CommandDescription
somtum sync statusCompare local vs remote observation count
somtum sync pushExport and scp observations to remote
somtum sync pullscp from remote and merge into local DB

Set your remote:

bash
somtum config set sync.remote "user@host:/path/.somtum/projects/<id>"

Somtum uses hostname-aware syncing — merging observations from multiple machines without data loss.

Released under the MIT License.