Status: ✅ Feature complete (June 19, 2026) — folder-based design
Federated memory search across multiple git-memory repositories — search your primary memories plus shared team/base knowledge without merging repos.
Each agent gets its own store; link others as read-only:
export GIT_MEMORY_DIR=~/hermes-memory
git-mem init
git-mem source add personal ~/memory-store # symlink (local) or clone (URL)Hermes writes to ~/hermes-memory, searches both. Your personal store is never written to.
git-mem source add team /mnt/shared/team-memories
git-mem source add daniel ~/external/daniel-devops-notes
git-mem search "kubernetes deployment"Searches your repo + team repo + Daniel's repo, shows which source each hit came from.
export GIT_MEMORY_DIR=~/work-memories
git-mem source add personal ~/personal-memories
git-mem search "docker networking"git-mem source add <name> <path-or-url> # symlink local path or clone URL
git-mem source list # show all sources (enabled/disabled)
git-mem source disable <name> # exclude from search (renames dir)
git-mem source enable <name> # re-include in search
git-mem source remove <name> # unlink symlink or delete clone
git-mem source sync [name] # git pull for one or all sourcesSources are git repos living under ${GIT_MEMORY_DIR}-sources/:
~/memory-store-sources/
├── team/ ← symlink to /mnt/shared/team-memories
├── hermes-base/ ← cloned from URL
└── daniel.disabled/ ← disabled (excluded from search)
No config file, no JSON. The filesystem IS the source of truth:
- Each child dir containing
.gitis a source - Source name = folder basename
.disabledsuffix = excluded from search- Local paths are symlinked; URLs are cloned
- Primary repo (
$GIT_MEMORY_DIR) is always searched first - Enabled sources are searched in folder-name order
- Results from sources are prefixed with
[source-name] - Disabled sources (
.disabledsuffix) are skipped
$ git-mem search redis
Found:
a1b2c3d Redis timeout config
[team] e6f0c08 [team][gotcha] Redis needs 30s minimum timeout
✅ No config files — filesystem is the source of truth
✅ No jq dependency — pure bash + awk
✅ No history rewriting — sources are read-only views
✅ No merge conflicts — each repo stays independent
✅ Explicit enable/disable — rename suffix, visible in ls
✅ Source attribution — every result shows which repo it came from
| Variable | Default | Purpose |
|---|---|---|
GIT_MEMORY_DIR |
~/memory-store |
Primary store (read-write) |
GIT_MEMORY_SOURCES_DIR |
${GIT_MEMORY_DIR}-sources |
Folder of source repos (read-only search) |
-
source add/list/enable/disable/remove/sync - Multi-source search with attribution
- Folder-based storage (no JSON, no config files)
- URL cloning + local symlink support
-
--jsonoutput with source field - 34 dedicated tests (test-source.sh)
-
promote <hash> --to <source>— copy entry between stores
Implementation: ~80 LOC (iter_sources, source_dir_for, cmd_source), pure bash, no external deps beyond git. Tested: June 19, 2026 — 127/127 tests passing across 7 suites.