Skip to content

CLI Commands ​

All commands accept --palace <path> to override the default palace location.

mempalace init ​

Detect rooms from your folder structure and set up the palace.

bash
mempalace init <dir>
mempalace init <dir> --yes  # non-interactive mode
OptionDescription
<dir>Project directory to scan
--yesAuto-accept all detected entities

What it does:

  1. Scans for people and projects in file content
  2. Detects rooms from folder structure
  3. Creates ~/.mempalace/ config directory
  4. Saves detected entities to <dir>/entities.json

mempalace mine ​

Mine files into the palace.

bash
mempalace mine <dir>
mempalace mine <dir> --mode convos
mempalace mine <dir> --mode convos --extract general
mempalace mine <dir> --wing myapp
OptionDefaultDescription
<dir>—Directory to mine
--modeprojectsprojects for code/docs, convos for chat exports
--wingdirectory nameWing name override
--agentmempalaceAgent name tag
--limit0 (all)Max files to process
--dry-run—Preview without filing
--extractexchangeexchange or general (for convos mode)
--no-gitignore—Don't respect .gitignore
--include-ignored—Always scan these paths even if ignored

Find anything by semantic search.

bash
mempalace search "query"
mempalace search "query" --wing myapp
mempalace search "query" --wing myapp --room auth
mempalace search "query" --results 10
OptionDefaultDescription
"query"—What to search for
--wingallFilter by wing
--roomallFilter by room
--results5Number of results

mempalace split ​

Split concatenated transcript mega-files into per-session files.

bash
mempalace split <dir>
mempalace split <dir> --dry-run
mempalace split <dir> --min-sessions 3
mempalace split <dir> --output-dir ~/split-output/
OptionDefaultDescription
<dir>—Directory with transcript files
--output-dirsame dirWrite split files here
--dry-run—Preview without writing
--min-sessions2Only split files with N+ sessions

mempalace wake-up ​

Show L0 + L1 wake-up context (~170–900 tokens).

bash
mempalace wake-up
mempalace wake-up --wing driftwood
OptionDescription
--wingProject-specific wake-up

mempalace compress ​

Compress drawers using AAAK Dialect.

bash
mempalace compress --wing myapp
mempalace compress --wing myapp --dry-run
mempalace compress --config entities.json
OptionDescription
--wingWing to compress (default: all)
--dry-runPreview without storing
--configEntity config JSON file

mempalace status ​

Show what's been filed — drawer count, wing/room breakdown.

bash
mempalace status

mempalace repair ​

Rebuild palace vector index from stored data. Fixes segfaults after database corruption.

bash
mempalace repair

Creates a backup at <palace_path>.backup before rebuilding.

mempalace mcp ​

Helper command that outputs setup syntax (like claude mcp add...) to connect MemPalace to your AI client, automatically handling paths.

bash
mempalace mcp
mempalace mcp --palace ~/.custom-palace

mempalace hook ​

Run hook logic for Claude Code / Codex integration.

bash
mempalace hook run --hook stop --harness claude-code
mempalace hook run --hook precompact --harness claude-code
mempalace hook run --hook session-start --harness codex
OptionValuesDescription
--hooksession-start, stop, precompactHook name
--harnessclaude-code, codexHarness type

mempalace instructions ​

Output skill instructions to stdout.

bash
mempalace instructions init
mempalace instructions search
mempalace instructions mine
mempalace instructions help
mempalace instructions status

Released under the MIT License.