Skip to Content
Mind Palace 0.4.2-alpha is out. Check it out →
ReferenceCLI Reference

CLI Reference

All commands are deterministic. Validation uses embedded schemas.


Quick Reference

CommandPurposeModifies State
exploreSearch codebase, symbols, call graphsNo
storeStore idea/decision/learningYes
recallSearch and retrieve knowledgeNo
statusShow workspace status and statsNo
initInitialize .palace/ structureYes
indexManage code index (scan, check, stats)Yes
serveStart MCP serverNo
lspStart LSP server for editorsNo
sessionManage agent sessionsYes
corridorCross-workspace sharingVaries
cleanCleanup stale dataYes
updateSelf-update to latestYes
versionShow version infoNo
helpShow help for commandsNo

Core Commands

explore

Search the codebase, symbols, and call graphs.

palace explore "<query>" [options] palace explore --map <symbol> [options] palace explore --rooms

Options:

FlagDescription
--room <name>Filter to specific room
--roomsList all configured rooms
--limit <n>Maximum results (default: 10)
--fuzzyEnable fuzzy matching
--fullGet full context (generates context-pack.json)
--map <symbol>Trace call graph for a symbol or file
--file <path>File path for --map mode
--depth <n>Recursion depth for call chain (1-10)
--direction <d>Trace direction: up, down, or both

Note: Flags can appear before or after the query (e.g., palace explore "auth" --full).

Entry Point Detection: When tracing calls for entry points like main, init, Test*, or handlers, the tool explains these are called by the runtime rather than showing “no callers found”.


store

Store ideas, decisions, and learnings (auto-classified).

palace store "<content>" [options]

Options:

FlagDescription
--as <type>Force type: decision, idea, learning
--scope <scope>Scope: file, room, palace (default: palace)
--path <path>Scope path for file/room scope
--confidence <n>Confidence for learnings, 0.0-1.0 (default: 0.5)
--tag <tags>Comma-separated tags

Auto-Classification: Content is classified based on natural language signals:

  • “Let’s use…”, “We should…”, “Decision:” → decision (95%+ confidence)
  • “What if…”, “Maybe…”, “Idea:” → idea
  • “TIL…”, “Always…”, “Note:” → learning

Input Validation: Ambiguous input (less than 40% confidence with no signals) is rejected with helpful tips.


recall

Search and retrieve knowledge.

palace recall [query] [options] palace recall <type> # Shorthand: decisions, ideas, learnings palace recall update <id> <outcome> palace recall link --<rel> <target> <source>

Options:

FlagDescription
--type <type>Filter by type: decision, idea, learning
--scope <scope>Filter by scope: file, room, palace
--path <path>Filter by scope path
--pendingShow decisions awaiting outcome
--limit <n>Maximum results (default: 10)

Type Shortcuts: First argument can be a type name:

  • palace recall decisions → same as --type decision
  • palace recall ideas → same as --type idea
  • palace recall learnings → same as --type learning

Subcommands:

  • update <id> <outcome>: Record decision outcome (success, failed, mixed)
  • link --<rel> <target> <source>: Create relationships between records (flags before source ID)

brief

Get file briefing and intelligence.

palace brief <file-path> [options]

Options:

FlagDescription
--sessionsInclude recent agent activity details

Setup & Indexing

init

Initialize the palace in the current directory.

palace init [options]

Options:

FlagDescription
--detectAuto-detect project type and generate rooms
--with-outputsAlso create generated output templates
--forceOverwrite existing curated files

scan

Build or refresh the Index (Tier-0).

palace scan [options]

Options:

FlagDescription
--fullForce full rescan (default: incremental)
--deepEnable LSP-based deep analysis

Parses files using Tree-sitter and stores symbols in SQLite. For Dart/Flutter projects, deep analysis runs automatically to extract accurate call relationships via LSP.


check

Verify Index freshness and validate schemas.

palace check [options]

Options:

FlagDescription
--strictHash all files (slower but thorough)
--diff <range>Scope check to a specific git diff range
--collectAlso generate context pack from diff
--signalAlso generate change signal from diff

Services

lsp

Start the Language Server Protocol server for editor integration.

palace lsp [options]

Options:

FlagDescription
--root <path>Workspace root directory (default: current directory)
--log <file>Log file path (logs to file instead of stderr)

The LSP server provides:

  • Real-time pattern violation diagnostics
  • Contract mismatch detection
  • Hover information for patterns and contracts
  • Code actions (approve, ignore, verify)
  • Code lens showing issue counts

Typically started automatically by the VS Code extension. See LSP Server for details.


Maintenance

clean

Cleanup stale sessions, agents, and old learnings.

palace clean [--dry-run]

Performs the following maintenance tasks:

  • Sessions: Marks sessions inactive for >24h as abandoned
  • Agents: Removes agents with no heartbeat for >5 minutes
  • Learnings: Decays confidence of learnings unused for >30 days
  • Pruning: Removes learnings with confidence below 0.1
  • Corridor Links: Validates and removes stale workspace links

Shows status for each category even when nothing needs cleanup.

Last updated on