agentjj
Agent-first version control. A porcelain for Jujutsu (jj) designed to make AI agents love source control.
Zero-install: Embeds jj-lib directly—no separate jj installation required.
Git-compatible: Auto-colocates with existing git repos. Git continues to work normally.
Installation
Homebrew (macOS/Linux)
Cargo
Binary releases
Download from GitHub Releases.
Quick Start
# In any git repo—agentjj auto-initializes jj
# Work with code
# Safe changes
Commit Graph
agentjj can visualize the DAG in multiple formats. Here's the development history:
flowchart TD
725c2f3["feat: add tag command"]
725c2f3 --> a967ed4
a967ed4["feat: use git directly for commit/push"]
a967ed4 --> 2778c62
2778c62["feat: add commit command"]
2778c62 --> 94b1ce1
94b1ce1["fix: rust-toolchain action"]
94b1ce1 --> 712bdb5
712bdb5["docs: add README and release workflow"]
712bdb5 --> e5eb91b
e5eb91b["feat: auto-create .gitignore"]
e5eb91b --> e743d9a
e743d9a["feat: embed jj-lib, auto-colocate"]
Generate your own: agentjj graph --format mermaid
Why agentjj?
Traditional VCS tools are designed for humans. Agents need:
| Human VCS | Agent VCS (agentjj) |
|---|---|
| Interactive prompts | JSON-first output |
| Visual diffs | Structured change data |
| Manual commits | Typed changes with intent |
| Hope you remember | Checkpoints + undo |
| One file at a time | Bulk operations |
| "It worked on my machine" | Preconditions + validation |
Commands
Orientation & Status
Code Intelligence
Bulk Operations
Checkpoints & Recovery
DAG Visualization
Typed Changes
Types: behavioral, refactor, schema, docs, deps, config, test
Categories: feature, fix, perf, security, breaking, deprecation, chore
Files & Structure
Diffs
Push & Apply
Self-Documentation
JSON Mode
Always use --json for programmatic access:
Errors also return JSON:
Exit codes: 0 = success, 1 = error
Agent Manifest
agentjj init creates .agent/manifest.toml:
[]
= "my-project"
= "What this repo does"
= ["rust", "python"]
= "jj"
[]
= ["src/**", "tests/**"]
= ["secrets/**", ".env"]
[[]]
= "tests-pass"
= "cargo test"
= "pre-push"
The manifest defines:
- Permissions: What files agents can modify
- Invariants: Commands that must pass (tests, lints, etc.)
Git Compatibility
agentjj auto-colocates with git repos:
my-repo/
├── .git/ # Git still works
├── .jj/ # jj state (auto-created)
├── .agent/ # agentjj config
│ ├── manifest.toml
│ ├── .gitignore # Excludes local state
│ ├── checkpoints/ # Local (gitignored)
│ └── changes/ # Local (gitignored)
└── src/
git push,git pull,git logall work- GitHub PRs, issues, actions—all work
- Full git history visible in
agentjj graph
Supported Languages
Symbol extraction works for:
- Python
- Rust
- JavaScript
- TypeScript
Philosophy
- Everything is JSON —
--jsonfor machine-parseable output - Self-documenting —
agentjj schemashows all output formats - Safe by default — Checkpoints and undo for easy recovery
- Batch-friendly — Bulk operations for efficiency
- Context-rich — Get exactly what you need without bloat
Development
# Build
# Test
# Run locally
License
MIT