Skip to content

Index and Import Existing Content

Estimated time: 10 minutes

Goal: bring in one small source, search a known phrase, and verify the returned source path.

Complete Quick Start first.

SourceUseWhat happens
Notes, docs, code, Obsidian vault, exported Notion filesmm index PATHindexes the selected file or directory in place
Claude Code auto-memory directorymm ingest claude-memorycreates a read-only snapshot under claude-memory:<slug>
Codex memories directorymm ingest codex-memorycreates a read-only snapshot under codex-memory:<slug>
Gemini or Antigravity GEMINI.mdmm ingest gemini-memorycreates a read-only snapshot under gemini-memory:<slug>

Neither operation deletes or rewrites the source files. They do not start background watching. Run the operation again when you intentionally want to pick up changes.

Start with a small directory that contains no credentials or personal data. Create memtomem-demo-notes/deployment.md in an editor with this content:

# Deployment decision
Use blue-green deployment. Run the smoke suite before traffic cutover.

Index and verify it:

Terminal window
mm index ./memtomem-demo-notes
mm status
mm search "smoke suite traffic cutover"

Success means the result includes the sentence and a source path ending in memtomem-demo-notes/deployment.md.

Edit one sentence, then run the same index command again. Unchanged chunks are skipped; only changed chunks are updated.

Terminal window
mm index ./memtomem-demo-notes
mm search "smoke suite traffic cutover"

Use the same mm index flow for Markdown, Python, JavaScript, TypeScript, JSON, YAML, or TOML sources. The full supported formats and indexing flags remain in the LTM CLI Reference.

Always preview first. Replace each example path only with a source that exists on your machine.

Terminal window
mm ingest claude-memory --source ~/.claude/projects/PROJECT_SLUG/memory/ --dry-run
mm ingest claude-memory --source ~/.claude/projects/PROJECT_SLUG/memory/
mm search "KNOWN_PHRASE_FROM_CLAUDE_MEMORY" --namespace claude-memory:PROJECT_SLUG

The source may also be ~/.claude/projects/ to discover multiple project memory directories.

Terminal window
mm ingest codex-memory --source ~/.codex/memories/ --dry-run
mm ingest codex-memory --source ~/.codex/memories/
mm search "KNOWN_PHRASE_FROM_CODEX_MEMORY"
Terminal window
mm ingest gemini-memory --source ~/.gemini/GEMINI.md --dry-run
mm ingest gemini-memory --source ~/.gemini/GEMINI.md
mm search "KNOWN_PHRASE_FROM_GEMINI_MEMORY"

--dry-run must list files without changing chunk counts. The apply command indexes the content under the source-specific namespace. Running the apply command again skips unchanged content by hash.

For each imported source:

  1. Copy a distinctive, non-sensitive phrase from the source.
  2. Search that exact phrase.
  3. Confirm the result contains the expected namespace and absolute source path.
  4. Run the same import again and confirm unchanged files are skipped.

If search is empty, run:

Terminal window
mm status
mm search "EXACT_PHRASE_FROM_THE_FILE"

Minimal preset uses keyword search, so the first verification query should reuse words that actually appear in the source. Add semantic search later by rerunning mm init with the English or Korean-optimized preset.

  • Do not index API keys, tokens, passwords, private keys, personal data, or raw conversation archives.
  • Built-in credential exclusions remain active even if a user exclude pattern tries to negate them.
  • mm ingest is an explicit read-only snapshot. Installing a plugin, connecting MCP, or enabling STM does not run it automatically.
  • Review paths and counts in --dry-run output before applying an import.
  • Use Local-First & Privacy to check which optional providers can send content to another service.