Skip to main content

The Obsidian that populates itself so your Claude never forgets.

Project description

mnemo

The Obsidian that populates itself so your Claude never forgets.

mnemo turns every Claude Code session into a self-organizing knowledge base, then feeds that knowledge back into Claude so it stops forgetting what you taught it last week.

It runs locally as a hooks-only Python plugin — zero third-party dependencies, zero network calls, identical on Linux, macOS, and Windows.

What it does

  • Captures every session's lifecycle into a Markdown vault at ~/mnemo/ (logs, memory mirrors, end-of-session briefings).
  • Extracts that raw trail into curated rules under shared/{feedback,user,reference,project}/ — your project's brain.
  • Surfaces the brain back into Claude:
    • a HOME dashboard that regenerates after every extraction
    • an MCP server Claude can query for topics and rules
    • a status line showing the brain's heartbeat
    • automatic injection of the most relevant rule on every prompt
    • hard guardrails on Bash and contextual hints on Edit/Write

The result: Claude consumes in real time the rules you taught it weeks earlier in a different session, without you having to copy them in.

Install

One command:

npx @xyrlan/mnemo install

That installs the Python package (via uv / pipx / pip --user, whichever is available), prompts you to choose global (every Claude Code session) or project (this directory only), and wires the hooks, MCP server, and slash commands.

Non-interactive:

npx @xyrlan/mnemo install --yes              # global
npx @xyrlan/mnemo install --project --yes    # this directory only

To remove:

npx @xyrlan/mnemo uninstall

The vault is always preserved on uninstall.

Prerequisite: Python 3.8+ on PATH. Node is already there if you can run npx.

Via Claude Code (just ask)

If you already have Claude Code open in the repo you want mnemo on, paste this prompt — Claude will pick pipx / uv / pip --user based on what you have, install mnemo-claude, and run mnemo init --project:

Install mnemo for this project. Use pipx install mnemo-claude if pipx is available, otherwise uv tool install mnemo-claude, otherwise python3 -m pip install --user mnemo-claude. Then run mnemo init --project --yes. If mnemo isn't on PATH after install, tell me which directory to add to my shell profile.

For a global install (every Claude Code session, not just this repo), swap --project for nothing and drop the directive.

Without npm

pipx install mnemo-claude        # or: uv tool install mnemo-claude
mnemo init                        # global, or:
mnemo init --project              # current directory only

Use it

Once installed, just use Claude Code normally. mnemo runs in the background:

  • session start/end markers, memory mirroring, and briefings happen automatically
  • extraction runs after sessions end (when there's enough new material)
  • on every prompt, mnemo retrieves the single most relevant rule and injects it before Claude responds
  • when Claude is about to edit a file or run a command that matches one of your rules, the rule body is surfaced as context (or hard-blocked, if you marked it as a guardrail)

Open the vault any time:

mnemo open

Edit HOME.md's notes section freely — mnemo only manages the dashboard block at the top.

Commands

mnemo init [--project]    first-run setup (global or scoped to <cwd>)
mnemo status              vault state + hook health
mnemo doctor              full diagnostic with actionable fixes
mnemo extract             run the extraction pipeline manually
mnemo regen-graph-edges   refresh wikilinks for graph viewers (idempotent)
mnemo open                open the vault
mnemo uninstall           remove hooks, MCP server, status line
mnemo help                list commands

The same commands are available as slash commands inside Claude Code (/init, /status, /doctor, /open, …).

Optional: browse the vault in Obsidian

The vault is plain Markdown — any editor with graph support reads it as is. If you point Obsidian at ~/mnemo/:

  • rules link to the briefings they were extracted from,
  • briefings link back to the rules they spawned,
  • the Graph view renders the rule↔briefing network out of the box.

Run mnemo regen-graph-edges once to refresh the wikilink sections on existing rules and briefings (the extractor emits them automatically for new ones). The section is bookended by an HTML comment marker so it stays invisible to mnemo's retrieval — zero impact on Claude's context, zero impact on BM25F scoring.

For a more readable graph, open Graph view → settings → Groups and add (in order — first match wins):

Query Suggested color
path:shared/feedback green
path:shared/user yellow
path:shared/reference purple
path:shared/_inbox orange
path:briefings/sessions blue (hubs)
path:memory cyan
file:HOME red (dashboards)
path:bots light gray

These groups stay in your local .obsidian/ folder — Obsidian is not a mnemo dependency, and the vault works identically without it.

Where things live

~/mnemo/                  your vault
├── HOME.md               dashboard at the top, your notes below
├── bots/<repo>/          per-project capture (logs, memory, briefings)
├── shared/               curated rules — the project brain
│   ├── feedback/         preferences and corrections
│   ├── user/             user-profile facts
│   ├── reference/        pointers to external systems
│   └── project/          per-repo project context
└── .mnemo/               internal state (indices, telemetry)

~/.claude/settings.json   hooks + status line composer
~/.claude.json            MCP server registration
~/.claude/commands/       slash commands

In --project mode, everything lives under <cwd>/.claude/, <cwd>/.mcp.json, and <cwd>/.mnemo/ instead.

Privacy

100% local. Zero network. No third-party Python dependencies. Every piece of telemetry (.mnemo/*.jsonl) stays on disk — nothing leaves your machine. Read the source.

License

MIT — see LICENSE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mnemo_claude-0.14.0.tar.gz (178.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mnemo_claude-0.14.0-py3-none-any.whl (239.5 kB view details)

Uploaded Python 3

File details

Details for the file mnemo_claude-0.14.0.tar.gz.

File metadata

  • Download URL: mnemo_claude-0.14.0.tar.gz
  • Upload date:
  • Size: 178.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for mnemo_claude-0.14.0.tar.gz
Algorithm Hash digest
SHA256 cbf584b3542ca55b21c5e99026e865e12c69f7de9988e1dace20986739c20b56
MD5 183f3c5fb5c15642d56bb37169ff4b4e
BLAKE2b-256 3621bd18e396c306fd070e6d8efea994c33d2ce86b928506a96da70b01fa1c43

See more details on using hashes here.

File details

Details for the file mnemo_claude-0.14.0-py3-none-any.whl.

File metadata

  • Download URL: mnemo_claude-0.14.0-py3-none-any.whl
  • Upload date:
  • Size: 239.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for mnemo_claude-0.14.0-py3-none-any.whl
Algorithm Hash digest
SHA256 88427b2d7eba7b240873970ed3ac8ff5704f2a566a139e57207be4d954559e85
MD5 ee00053a9e406b110c9689b9d73e5a59
BLAKE2b-256 99ade015169264fc06f3e2e37b07989848be73009cf0b72d3106db7c3ca66ed5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page