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.1.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.1-py3-none-any.whl (11.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: memport-0.1.1.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.1.tar.gz
Algorithm Hash digest
SHA256 49a675cd15dbfaf6f5c1691dcd431aec4c7ead6f7566412ebc6b6faf8f9f74fe
MD5 f4aa0545824c663551076db843392345
BLAKE2b-256 f5cf544ac4fa6bd6cdf1965100f9f6e718f4acc0b5d74670931e30f212839b3e

See more details on using hashes here.

Provenance

The following attestation bundles were made for memport-0.1.1.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.1-py3-none-any.whl.

File metadata

  • Download URL: memport-0.1.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f97339d6f93c854c50c41b601c1893cbb5d7a318e9536e2986abed344af8d7cf
MD5 515de8984ef944329d3aaf64eef8adc0
BLAKE2b-256 24fdcecfae899ce57e1eef35f8635048a5ac3ae66affe9413d6939561ea45860

See more details on using hashes here.

Provenance

The following attestation bundles were made for memport-0.1.1-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