Files
mempalace/website/reference/cli.md
T
Igor Lins e Silva 0cb9ee5c58 fix(website): correct false claims and stale numbers in live docs
- Landing: replace nonexistent `mempalace remember` CLI demo with real
  `mempalace mine ./notes`
- Landing: soften unverifiable absolutes ("forever available",
  "100% recall by design", "<50 ms", "90%+ compression",
  "two-thousand-year-old", "tens of thousands of entries")
- MCP tool count: 19 → 29 across mcp-integration, claude-code, openclaw,
  and modules; expand tool overview with Drawers, Tunnels, and System
  categories to match mcp_server.py
- Wake-up token range: ~170–900 → ~600–900 in cli/api-reference/python-api
  to match cli.py help text and concept docs
- Gemini CLI: move `--scope user` before target name and add `--`
  separator so `-m mempalace.mcp_server` isn't parsed as Gemini flags
2026-04-16 23:31:35 -03:00

4.6 KiB
Raw Blame History

CLI Commands

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

mempalace init

Scan a project directory for people, projects, and rooms, and set up the palace.

mempalace init <dir>                 # <dir> is required
mempalace init <dir> --yes           # non-interactive mode
mempalace init ~/projects/myapp      # example
mempalace init .                     # initialize from the current directory
Option Description
<dir> Required. Project directory to scan. Pass . for the current directory.
--yes Auto-accept all detected entities

What it does:

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

Running mempalace init with no argument will exit with error: the following arguments are required: dir.

mempalace mine

Mine files into the palace.

mempalace mine <dir>
mempalace mine <dir> --mode convos
mempalace mine <dir> --mode convos --extract general
mempalace mine <dir> --wing myapp
Option Default Description
<dir> Directory to mine
--mode projects projects for code/docs, convos for chat exports
--wing directory name Wing name override
--agent mempalace Agent name tag
--limit 0 (all) Max files to process
--dry-run Preview without filing
--extract exchange exchange 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.

mempalace search "query"
mempalace search "query" --wing myapp
mempalace search "query" --wing myapp --room auth
mempalace search "query" --results 10
Option Default Description
"query" What to search for
--wing all Filter by wing
--room all Filter by room
--results 5 Number of results

mempalace split

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

mempalace split <dir>
mempalace split <dir> --dry-run
mempalace split <dir> --min-sessions 3
mempalace split <dir> --output-dir ~/split-output/
Option Default Description
<dir> Directory with transcript files
--output-dir same dir Write split files here
--dry-run Preview without writing
--min-sessions 2 Only split files with N+ sessions

mempalace wake-up

Show L0 + L1 wake-up context (~600900 tokens).

mempalace wake-up
mempalace wake-up --wing driftwood
Option Description
--wing Project-specific wake-up

mempalace compress

Compress drawers using AAAK Dialect.

mempalace compress --wing myapp
mempalace compress --wing myapp --dry-run
mempalace compress --config entities.json
Option Description
--wing Wing to compress (default: all)
--dry-run Preview without storing
--config Entity config JSON file

mempalace status

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

mempalace status

mempalace repair

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

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.

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

mempalace hook

Run hook logic for Claude Code / Codex integration.

mempalace hook run --hook stop --harness claude-code
mempalace hook run --hook precompact --harness claude-code
mempalace hook run --hook session-start --harness codex
Option Values Description
--hook session-start, stop, precompact Hook name
--harness claude-code, codex Harness type

mempalace instructions

Output skill instructions to stdout.

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