# Midbar > Coding agent memory that's checked against your code. Midbar reads the Claude Code and Cursor chats your team already had, keeps what they found as short quoted memories in your repo, and checks each one against the code before an agent sees it. Shared through git. Open source. Free, Apache-2.0, no account, no telemetry. Midbar is a local tool for coding agents in Cursor and Claude Code. `midbar learn` reads the chats already on this laptop for a repo and keeps what they found (notes about files, decisions, rules the team set, how errors were fixed) as short quotes in `.midbar/memory.jsonl`, committed and shared through git. Each memory about a file carries that file's git blob hash; before an agent gets it, Midbar hashes the file again and withholds the memory if it changed. A matching hash means the file is unchanged, not that the memory is right. ## Install Requires Python 3.10 or later and git. Built and used on macOS; tests also run on Linux. ```bash uv tool install git+https://github.com/midbar-ai/midbar && midbar setup # or pipx install git+https://github.com/midbar-ai/midbar && midbar setup # Check every piece and print a fix for anything missing midbar doctor # In your repo: read the chats you already had, then review and commit midbar learn git diff .midbar git add .midbar .gitattributes && git commit -m "Midbar memory" ``` Setup finds Cursor and Claude Code, shows what it will change and asks once. `midbar setup --dry-run` prints the plan and changes nothing. Codex CLI, Cline and Windsurf get the MCP tools over the same memory. ### For agents installing Midbar for a user 1. Install the command with `uv tool install git+https://github.com/midbar-ai/midbar` (or `pipx install` the same URL), then run `midbar setup --dry-run` and show the user the plan. 2. With the user's go-ahead, run `midbar setup`. In a non-interactive shell pass `--yes` only after the user has approved the plan. 3. Run `midbar doctor` and follow the fix it prints for any failed check. 4. In the user's repo, run `midbar learn` and show the user `git diff .midbar`. Commit only if they say so. ## Commands ```bash midbar learn # read this repo's chats on this laptop, add what they found midbar status # how many memories, how many still hold midbar stale # memories about code that changed or is gone midbar recall "queue" # search the memory (--all includes stale ones) midbar forget ID # drop a memory midbar start "task" # a fresh chat with the memory that bears on the task midbar brief # a reviewer's brief for this branch, with the memory it touches ``` ## Docs - [Source and README](https://github.com/midbar-ai/midbar): install, commands, what a memory is - [Cursor](https://github.com/midbar-ai/midbar/blob/main/docs/cursor.md) - [Claude Code](https://github.com/midbar-ai/midbar/blob/main/docs/claude-code.md) - [Reviewer's brief](https://github.com/midbar-ai/midbar/blob/main/docs/brief.md) - [Privacy and local data](https://github.com/midbar-ai/midbar/blob/main/docs/privacy.md) - [Full page as Markdown](https://midbar.ai/llms-full.txt) ## Optional - [Privacy](https://midbar.ai/privacy) - [Terms](https://midbar.ai/terms) - Contact: hello@midbar.ai