| Crates.io | agit |
| lib.rs | agit |
| version | 1.3.0 |
| created_at | 2026-01-09 20:19:28.595727+00 |
| updated_at | 2026-01-10 15:31:18.292745+00 |
| description | AI-native Git wrapper for capturing context alongside code |
| homepage | |
| repository | https://github.com/agit-stuff/agit |
| max_upload_size | |
| id | 2032774 |
| size | 579,076 |
agit captures the reasoning context (Why/How) alongside your code changes (What). It creates a "Neural Graph" parallel to Git's commit graph, giving you and your team a complete history of not just what changed, but why it changed and how the decision was made.
agit init and MCP is auto-configured.mcp.json and .cursor/mcp.json automaticallybrew tap agit-stuff/agit
brew install agit
scoop bucket add agit https://github.com/agit-stuff/agit
scoop install agit
curl -fsSL https://raw.githubusercontent.com/agit-stuff/agit/main/install.sh | bash
cargo install agit
# Initialize in your git repository
cd your-project
agit init
# Your AI assistant will now automatically log thoughts via MCP
# Or manually record thoughts:
agit record "Planning to refactor the auth module"
# After making changes, stage and commit with context:
agit add .
agit commit -m "Refactor auth module" # Creates both git + neural commit
# View history with context:
agit log
agit inverts the traditional approach. Instead of the CLI calling LLMs, your AI editor (Cursor, Claude, etc.) pushes context to agit via MCP:
agit_log_step(role="user", content="Fix auth bug")agit_log_step(role="ai", content="Plan: Add try/catch")agit commit -m "Fix auth bug"When you run agit init, these files are generated:
your-project/
├── .agit/ # Neural graph storage (like .git)
│ ├── objects/ # Content-addressable store
│ ├── refs/heads/ # Branch pointers
│ └── index # Staging area
├── .mcp.json # MCP config for Claude Code (auto-detected)
├── .cursor/
│ └── mcp.json # MCP config for Cursor (auto-detected)
├── CLAUDE.md # AI instructions (appended if exists)
└── .cursorrules # AI instructions (appended if exists)
Note: If you already have CLAUDE.md or .cursorrules files, agit appends its policy rather than overwriting your content.
| Command | Description |
|---|---|
agit init |
Initialize agit in a git repository |
agit record <msg> |
Manually record a thought |
agit add [path] |
Stage files and freeze context for commit |
agit status |
Show current status and pending thoughts |
agit commit -m <msg> |
Create git commit + neural commit with context |
agit log |
View commit history with summaries |
agit show [hash] |
Show full context for a commit |
agit search <query> |
Search past reasoning |
agit server |
Start the MCP server |
Traditional version control captures the what (code changes) but loses the why (reasoning). agit fills this gap by:
This creates a "dual graph" where:
┌─────────────────────────────────────────────────────────┐
│ AI Editor (Cursor/Claude) │
│ ┌─────────────────────────────────────────────────┐ │
│ │ User: "Fix the auth bug" │ │
│ │ AI: [Logs intent via MCP] │ │
│ │ AI: "I'll add a try/catch block" │ │
│ │ AI: [Logs reasoning via MCP] │ │
│ │ AI: [Writes code] │ │
│ └─────────────────────────────────────────────────┘ │
└─────────────────────┬───────────────────────────────────┘
│ MCP (agit_log_step)
▼
┌─────────────────────────────────────────────────────────┐
│ agit MCP Server │
│ ┌─────────────────────────────────────────────────┐ │
│ │ Receives: role, category, content │ │
│ │ Appends to: .agit/index │ │
│ └─────────────────────────────────────────────────┘ │
└─────────────────────┬───────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────┐
│ agit commit │
│ ┌─────────────────────────────────────────────────┐ │
│ │ 1. Read .agit/index │ │
│ │ 2. Synthesize summary (Intent + Plan) │ │
│ │ 3. Create trace blob │ │
│ │ 4. Create git commit (from staged changes) │ │
│ │ 5. Create NeuralCommit (linked to git commit) │ │
│ │ 6. Update refs │ │
│ └─────────────────────────────────────────────────┘ │
└─────────────────────────────────────────────────────────┘
See CONTRIBUTING.md for development setup and guidelines.
Licensed under either of:
at your option.