Metadata-Version: 2.4
Name: memport
Version: 0.1.0
Summary: Make your AI coding tool's local auto-memory travel with the repo, via git.
Author: bry1ni
License: Apache-2.0
Project-URL: Homepage, https://github.com/bry1ni/git-memport
Project-URL: Issues, https://github.com/bry1ni/git-memport/issues
Keywords: claude-code,ai,memory,git,developer-tools
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: PyYAML>=6.0
Dynamic: license-file

# 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

```sh
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](https://github.com/anthropics/claude-code/issues/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
