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
  • Maintains itself. An opt-out autopilot runs between sessions: it heals broken rule provenance, retunes retrieval scoring against your own hit/miss log, calibrates how often a rule is injected, and files a weekly health digest — all on-device, no LLM calls for the mechanical parts.

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 autopilot status    self-maintenance state, schedule, and budget
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 (`--all` for advanced)

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

Autopilot

Between sessions, mnemo keeps its own brain in shape so you don't have to. Work is scheduled in tiers and rate-limited by a budget — nothing runs on the hot prompt path:

  • Self-fix — repairs rule integrity: relativizes machine-absolute source paths, relocates sources whose briefing moved, repopulates provenance from extraction state, and refuses edits that would orphan a rule from project scoping.
  • Self-tune — grid-searches BM25F retrieval weights against your recall hit/miss log, and calibrates the per-project reflex emit-rate into a healthy band over eligible prompts.
  • Insights — collects recall misses into rule candidates and surfaces cross-project near-duplicate rules as promotion candidates in doctor.
  • Digest — a weekly health report under briefings/autopilot/.

It is on by default and fully local for the mechanical work. Control it with mnemo autopilot {status,pause,off,on}.

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.16.0.tar.gz (194.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.16.0-py3-none-any.whl (258.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: mnemo_claude-0.16.0.tar.gz
  • Upload date:
  • Size: 194.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for mnemo_claude-0.16.0.tar.gz
Algorithm Hash digest
SHA256 1fcc83837f07ecdd78bece71a71c4db12ce945f4278998907e47bfe2325c1698
MD5 49a95db232b27f1dacacf76208a1c1a4
BLAKE2b-256 7cb4ccc0cec3e96455626f81a9dcae788daa20c6840701b3bfd8e445c18f918b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mnemo_claude-0.16.0-py3-none-any.whl
  • Upload date:
  • Size: 258.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for mnemo_claude-0.16.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1f03d42f1ef249bee848cd8ee80c949eeee7207402f6a54bb015caf4d2a0aa95
MD5 8b2233f893711f94d4fe0008ef5d97e4
BLAKE2b-256 8fcbab0b62630016ae2ea36284b68cdf875548751999e5d386e1f16e6ce9c4bb

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