| name | agentjj |
| description | Agent-first version control with jj. Self-contained (no jj install needed). Auto-colocates with git repos. Complete orientation, typed commits, symbol queries, checkpoints, undo, bulk operations, impact analysis. Use --json for machine output. Start with 'agentjj orient' in any repo. Use when this capability is needed. |
| metadata | {"author":"2389-research"} |
agentjj - Agent-First Version Control
An agent-oriented porcelain for Jujutsu (jj) version control. Designed to make AI agents love version control.
Zero-install: agentjj embeds jj-lib directly - no separate jj installation required.
Git-compatible: Automatically colocates with existing git repos. Git continues to work normally.
Quick Start
agentjj orient
agentjj init
Core Philosophy
- Everything is JSON - Use
--json for machine-parseable output
- Self-documenting -
agentjj schema shows 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
Essential Commands
Orient (Start Here)
agentjj orient
agentjj --json orient
Returns: current state, codebase stats, recent changes, capabilities, quick start guide.
Status & Discovery
agentjj status
agentjj suggest
agentjj validate
Reading Code
agentjj read src/main.rs
agentjj symbol src/api.py
agentjj symbol src/api.py::process
agentjj context src/api.py::process
agentjj affected src/api.py::process
Bulk Operations (10x Efficiency)
agentjj bulk read src/a.rs src/b.rs src/c.rs
agentjj bulk symbols "src/**/*.rs"
agentjj bulk symbols "src/**/*.rs" --public-only
agentjj bulk context src/a.rs::foo src/b.rs::bar
Files & Structure
agentjj files
agentjj files --pattern "src/**/*.rs"
agentjj files --pattern "*.py" --symbols
Checkpoints & Recovery
agentjj checkpoint before-refactor
agentjj checkpoint wip -d "work in progress"
agentjj undo
agentjj undo --steps 3
agentjj undo --to before-refactor
agentjj undo --dry-run
Committing Changes
agentjj commit -m "feat: add auth endpoint"
agentjj commit -m "fix: null check" --type behavioral
agentjj commit -m "refactor: extract parser" --type refactor
Types: behavioral, refactor, schema, docs, deps, config, test
Changes & Diffs
agentjj diff
agentjj diff --against @
agentjj diff --explain
agentjj diff --against @--
Typed Changes
agentjj change set -i "Add auth" -t behavioral -c feature
agentjj change list
agentjj change show <change_id>
Types: behavioral, refactor, schema, docs, deps, config, test
Categories: feature, fix, perf, security, breaking, deprecation, chore
Apply & Push
agentjj apply \
--intent "Fix null check" \
--type behavioral \
--category fix \
--patch fix.patch
agentjj push
agentjj push --pr --title "Fix bug"
Self-Documentation
agentjj schema
agentjj schema --type context
agentjj schema --type orient
agentjj skill
agentjj quickstart
JSON Mode
Always use --json for programmatic access:
agentjj --json status
agentjj --json orient
agentjj --json context src/main.rs::main
agentjj --json bulk read file1.rs file2.rs
agentjj --json affected src/api.rs::handler
Errors also return JSON:
{"error": true, "message": "Symbol path must be path/to/file::symbol_name"}
Exit codes: 0 = success, 1 = error
Workflow Example
agentjj orient
agentjj checkpoint before-auth-refactor
agentjj status
agentjj diff
agentjj commit -m "feat: add OAuth login support"
agentjj checkpoint after-auth
agentjj push --branch main
Command Reference
| Command | Description |
|---|
orient | Complete repo orientation |
status | Current state |
suggest | Recommended next actions |
validate | Check changes are ready |
read <path> | Read file content |
symbol <path> | Query symbols |
context <path>::<name> | Get symbol context |
affected <path>::<name> | Impact analysis |
bulk read <paths...> | Read multiple files |
bulk symbols <pattern> | Query symbols across files |
bulk context <symbols...> | Get multiple contexts |
files [--pattern] [--symbols] | List files |
commit -m "msg" | Commit changes (most-used command) |
checkpoint <name> | Create restore point |
undo [--steps N] | Revert operations |
diff [--explain] | Show changes |
change set/list/show | Typed change metadata |
apply | Apply intent transaction |
push [--pr] | Push and optionally create PR |
schema [--type] | Output schemas |
skill | Full skill documentation |
quickstart | Getting-started guide |
init | Initialize agentjj |
manifest show/validate | Manage manifest |
All commands support --json for structured output.
Supported Languages
Symbol extraction: Python, Rust, JavaScript, TypeScript
Pro Tips
- Start with
orient - It tells you everything about the repo
- Use
--json always - Reliable parsing, never breaks
- Checkpoint before risky changes - Easy recovery
- Use
bulk for efficiency - One call, many results
- Check
affected before changing - Know the blast radius
suggest when stuck - Let the tool guide you
validate before pushing - Catch issues early
skill for full docs - The binary is the documentation
quickstart for onboarding - 6 steps to productivity
Converted and distributed by TomeVault — claim your Tome and manage your conversions.