Skip to main content

Make your AI coding tool's local auto-memory travel with the repo, via git.

Project description

memport

Your AI coding tool learns your project across sessions — then traps that knowledge on one developer's disk. memport sets it free, so it travels with the repo via git.

Claude Code accumulates auto-memory as it works: verified build commands, architecture notes, known issues, conventions. It lives at ~/.claude/projects/<encoded-git-root>/memory/ as clean markdown — machine-local, never synced. Clone a colleague's repo and you inherit CLAUDE.md and git history, but none of the tacit knowledge their Claude built up. memport closes that gap. It's a git subcommand.

Status: proof-of-concept, Claude Code only. Output is tool-agnostic; Cursor/Codex readers can be added later. Name is a placeholder (rename via the APP_NAME constant in config.py).

What it does (and doesn't)

Claude Code's memory files are already excellent structured markdown, so memport preserves them faithfully rather than distilling them into a lossy schema. The pipeline is:

~/.claude/.../memory/*.md   (per dev, per machine, never synced)
      │  git memport pull
      ▼
   strip frontmatter (drops local session ids)
   scrub (redacts secrets / real home paths; relative paths untouched)
      ▼
 .memport/memory/*.md   ← clean, committed, faithful
 .memport/review/*.md   ← anything scrub flagged, awaiting human sign-off
      │  git memport build
      ▼
   MEMPORT.md   ← @-imported by CLAUDE.md / AGENTS.md via marker block

Everything committed rides git's normal review/merge flow. Git is the sync layer — no server, no infra.

Install & use

pip install memport            # puts `git-memport` on PATH → `git memport`
# no-packaging path: chmod +x bin/git-memport && add bin/ to PATH
# or run directly: PYTHONPATH=src python3 -m memport <cmd>

git memport init               # scaffold .memport/, hook, wire adapters
git memport pull               # preserve + scrub local auto-memory
git memport status             # list anything flagged for review
git memport build              # regenerate MEMPORT.md (idempotent)
git add .memport MEMPORT.md CLAUDE.md && git commit

A post-merge hook re-runs build so teammates get updated memory on pull.

Design decisions

  • Preserve, don't distill — real memory files are already well-formed.
  • Derived index, never committed — no merge-conflict magnet.
  • Own file (MEMPORT.md), imported via markers — never clobbers CLAUDE.md.
  • Scrub is mandatory; findings route to review/ for a human gate.
  • Frontmatter stripped — drops machine-local session ids.

Related

Anthropic issue #28276 requests native in-repo memory storage. If shipped it gives memport a clean redirect target; the scrub / cross-tool / curation value is unaffected.

License

Apache-2.0

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

memport-0.1.0.tar.gz (10.9 kB view details)

Uploaded Source

Built Distribution

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

memport-0.1.0-py3-none-any.whl (11.8 kB view details)

Uploaded Python 3

File details

Details for the file memport-0.1.0.tar.gz.

File metadata

  • Download URL: memport-0.1.0.tar.gz
  • Upload date:
  • Size: 10.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for memport-0.1.0.tar.gz
Algorithm Hash digest
SHA256 964a204bfb1a4f1e9ab6675d2121ca545735b022935f14782fce8f5c7e3e2f2d
MD5 4e7c0a310a743467ffcaeb741bf8a352
BLAKE2b-256 79a60a8447ccdbdbbfc50bef9c1c154c731b4633ed05ab15a8d8f36f795db4e3

See more details on using hashes here.

Provenance

The following attestation bundles were made for memport-0.1.0.tar.gz:

Publisher: publish.yml on bry1ni/git-memport

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file memport-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: memport-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 11.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for memport-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9ef5e95803bbd0014c7f7fb10206962958abd7974583da93451b742ed7eebff2
MD5 0bcea2cc5d51cee4fd94b140694fc41b
BLAKE2b-256 f452df734f8c3c962788f590ebc9e1623f51042f0e669f8920a5982baa5fe2ba

See more details on using hashes here.

Provenance

The following attestation bundles were made for memport-0.1.0-py3-none-any.whl:

Publisher: publish.yml on bry1ni/git-memport

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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