memman
v0.2.0
Published
Local web UI to visualize, edit, create and delete Claude Code memory files.
Maintainers
Readme
memman
A tiny local web UI to visualize, edit, create, and delete the memory files
that Claude Code keeps under ~/.claude/projects/<project>/memory/.
Each memory is a markdown file (--- frontmatter + body). This tool renders them
as structured cards grouped by type (feedback / project / reference / user),
lets you edit the fields in place, and keeps the hand-curated MEMORY.md index in
sync when you delete a memory.
Run
cd memory-manager
npm install
npm start
# → http://localhost:4785The memory directory is auto-detected from your current working directory using Claude Code's project-slug scheme. Override it explicitly when needed:
node server.js --dir ~/.claude/projects/-home-me-myproject/memory
node server.js --dir <path> --port 5000
# env vars also work: MEMORY_DIR=... PORT=... npm startIf several project memory dirs exist and none matches the cwd, the tool prints the
candidates and asks you to pass --dir.
Run on the fly (no install)
Published with a bin, so you can run it straight from npm:
npx memman --dir <path>
# pin a version to dodge npx's cache: npx [email protected] --dir <path>What it does
Edit — change name / description / type / body per card. Hidden frontmatter (
node_type,originSessionId) is preserved untouched, and flat vs. nested frontmatter files round-trip in their original format.Create — "+ New memory" writes a properly-formatted file (nested format). Note: it does not auto-add a
MEMORY.mdindex line — that index is curated by hand, so add the pointer yourself if you want the memory recalled.Delete — moves the file to
memory-manager/.trash/(soft delete) and removes its reference fromMEMORY.md: a bullet whose only link is that file is dropped; a bullet that bundles several links keeps the others.Export — the "export" button (or
GET /api/export) downloads a.zipwith every memory file plusMEMORY.md, copied byte-for-byte. To move your memory to another machine, unzip it into that machine's memory dir:# Claude Code's project slug = the project's absolute path with / and . turned into - mkdir -p ~/.claude/projects/-home-me-myproject/memory unzip memman-<project>-<date>.zip -d ~/.claude/projects/-home-me-myproject/memoryThe slug depends on the project path on the target machine, so it may differ from the source one. A plain
unzipoverwrites files on name clash — use Import below for a merge instead.Import — the "import" button (or
POST /api/importwith the zip as the raw body,Content-Type: application/zip; other content types are rejected so a cross-site form can't post one) merges an exported.zipinto the current memory dir. It first shows a dry-run summary, then:- new files are added; byte-identical ones are left alone;
- files that differ from the local copy are conflicts — you choose to keep
the local version or overwrite it (the local copy goes to
.trash/first); MEMORY.mdis never replaced: index lines from the zip that link to at least one file not yet referenced locally are appended (the previous index is saved to.trash/). If there's no local index, the imported one is used as-is.
Entries are matched by basename, so a zip of the folder itself also works; anything not matching the memory filename rule is skipped. Query flags:
dryRun=1(report only) andoverwrite=1.
Safety
- All file access is confined to the resolved memory dir; filenames are validated
(
^[A-Za-z0-9_-]+\.md$) and path traversal is rejected. - Deletes are soft (recoverable from
.trash/). MEMORY.mdis only ever touched on delete (link removal) and import (lines appended), never on edit/create.
