engram-sync
Shared memory for AI coding agents across all your machines. Facts live as markdown in a private git repo you own. Claude Code, Codex, OpenCode, Antigravity and Muse all read the same memory, and every machine pulls and pushes it automatically.
pip install engram-sync
engram init yourname/agent-memory
init takes a GitHub owner/name or any git URL. Create the repo first as an empty private repo. On the first machine init seeds it. On every other machine init clones it. Then init:
- connects every agent it finds on this machine (details below);
- schedules a background push every 30 minutes (Windows Task Scheduler, or cron on Linux/macOS);
- runs the first sync.
Run engram doctor to check everything is wired up.
What lands in each agent
| Agent | Skills copied to | Instructions added to | Session hooks |
|---|---|---|---|
| Claude Code | ~/.claude/skills |
~/.claude/CLAUDE.md (with an @import of index.md) |
pull on start, push on end |
| Codex | $CODEX_HOME/skills (~/.codex/skills) |
~/.codex/AGENTS.md |
background sync |
| OpenCode | ~/.config/opencode/skills |
~/.config/opencode/AGENTS.md, only if you already have one (otherwise OpenCode reads ~/.claude/CLAUDE.md) |
background sync |
| Antigravity | ~/.gemini/config/skills |
~/.gemini/rules/engram.md |
background sync |
| Muse | ~/.config/muse/skills |
reads ~/.claude/CLAUDE.md |
background sync |
Three skills ship with the package: engram (operate sync), engram-remember (save a fact to the right file) and engram-consolidate (weekly cleanup, conflict repair). Put your own skills in skills/<name>/SKILL.md (or .claude/skills/<name>/SKILL.md) inside the memory repo and every connected agent on every machine gets them on the next pull.
Instructions go between <!-- engram-sync:begin --> and <!-- engram-sync:end --> markers. Your own text around the markers is never touched. A skill folder you created yourself is never overwritten, even if it has the same name as one of engram's, unless you run engram connect --adopt. engram disconnect removes exactly what connect added.
Commands
| Command | Does |
|---|---|
engram init <repo> |
clone or seed the memory repo, connect agents, schedule sync |
engram sync pull / push |
sync now; always exits 0 so it can never break an agent session |
engram connect [agent …] |
connect all detected agents, or the named ones (claude codex opencode antigravity muse). --adopt takes over existing skill folders of the same name; --skills-only leaves instruction files and hooks to another tool such as a dotfiles manager |
engram disconnect [agent …] |
undo connect |
engram schedule on / off |
the 30-minute background push |
engram doctor |
health check: repo, remote, last sync, schedule, agents |
The memory repo defaults to ~/engram. Use --repo <path> or $ENGRAM_HOME to put it elsewhere.
Memory repo layout
index.md routing table, loaded into every session (keep under 100 lines)
projects/<x>.md one file per project, read on demand
global/ preferences and machine facts
inbox/YYYY-MM.md quick captures, merged out by engram-consolidate
archive/ dormant projects and the consolidate log
skills/ optional: your own skills, shared to every agent
.engram/sync-paths.conf what syncs automatically
Safety
- Sync commits only the paths in
.engram/sync-paths.conf. Anything else in the repo needs a manual commit. - Each push scans added lines for AWS, GitHub, Slack, OpenAI, Anthropic and Google keys, private keys, JWTs and
password=-style strings. On a match nothing is committed andALERT.mdexplains the fix. Mark a known false positive with<!-- engram:not-a-secret -->on that line. - When two machines can't merge (one deleted a file the other edited), the losing machine force-pushes its commits to
conflict/<host>on your remote and writesALERT.md. The next session sees the alert. Saying "consolidate memory" merges the branch back. No commit is ever left only on one machine. - Git never prompts. Every remote call runs with prompts and credential dialogs disabled and with stall timeouts, so a session never hangs on a password box.
Full rules: docs/sync-contract.md.
Requirements
Python 3.9+ and git on PATH. No other dependencies. Authenticate git to your remote the usual way (GitHub CLI, credential manager or SSH key) before init.
Development
pip install -e .
python -m unittest discover -s tests -t .
License
MIT
Metadata
Release files for engram-sync 3.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| engram_sync-3.1.0.tar.gz | 25.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| engram_sync-3.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 49.5 kB
Release files / engram_sync-3.1.0.tar.gz
| Download URL | engram_sync-3.1.0.tar.gz |
|---|---|
| Size | 25.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
46757a84316e2eae5c8d6bf317640413f662b1ca03161a5e557e0bfbc6e210d4
|
|
BLAKE2b-256 checksum How to use checksums |
29d2bbfe077059f72e55f34c1fd1799e4c47cd63413f1a8a7a474f46f0353102
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 2, 2026.
Transparency logRelease files / engram_sync-3.1.0-py3-none-any.whl
| Download URL | engram_sync-3.1.0-py3-none-any.whl |
|---|---|
| Size | 23.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2dd4e4059a1cd85024a24048f2a5347e601ebdd84a89231c103c8fc68d6293b5
|
|
BLAKE2b-256 checksum How to use checksums |
274d8a58ccdcf9301f2bc9ea5fc048061844809f27244363c2863f9c9a67f7ec
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 2, 2026.
Transparency log