Documentation
Version control for AI memory. Branch context, checkpoint state, and persist knowledge across sessions.
Installation
Requires Rust (cargo). Install Rust first if needed.
From GitHub (recommended):
curl -fsSL https://raw.githubusercontent.com/0xkoda/gitnu/main/install.sh | sh
From your domain (if you host install.sh on gitnu.com):
curl -fsSL https://gitnu.com/install.sh | sh
From source:
git clone https://github.com/0xkoda/gitnu
cd gitnu
cargo install --path .
Verify: gnu --version. Ensure ~/.cargo/bin is in your PATH.
Quick Start
$ gnu init --name my-project
Initialized gitnu vault
Created: .gitnu/
Created: domains/_global/agent.md
Created: .claude/skills/gitnu/SKILL.md
✓ Ready. Run 'gnu status' to see current state.
$ gnu status
Branch: main
Last commit: (none)
$ gnu commit "Initial setup"
[main 7a3b91f] Initial setup
Author: human
1 file changed
$ gnu branch explore-alt --describe "Testing alternative"
Created branch: explore-alt
Switched to branch: explore-alt
Commands
| Command | Description |
|---|---|
gnu init [--name NAME] | Initialize a new vault |
gnu status | Show current branch, last commit, active context |
gnu commit MESSAGE [--author human|agent] | Checkpoint current state |
gnu log [--oneline] | Show commit history |
gnu branch | List branches |
gnu branch NAME [--describe DESC] | Create and switch to branch |
gnu checkout TARGET | Switch branch or restore commit |
gnu rewind COMMIT | Roll back to previous commit |
gnu diff [SOURCE] [TARGET] | Show changes between commits/branches |
gnu merge SOURCE | Merge branch into current |
gnu load PATH | Load file/domain into active context |
gnu unload PATH | Remove from active context |
gnu pin PATH | Always include in context |
gnu resolve "[[wikilink]]" | Resolve wikilink to path |
gnu context | Output full context as single document |
gnu summary | Generate state summary |
Vault Structure
vault/
├── .gitnu/ # Version control metadata
│ ├── config.toml
│ ├── HEAD
│ ├── refs/heads/
│ ├── objects/
│ ├── commits/
│ └── index.json
├── .claude/skills/gitnu/
│ └── SKILL.md # Auto-generated for Claude Code
└── domains/
├── _global/
│ ├── agent.md # Agent config
│ └── conventions.md
└── <project>/
├── spec.md
├── prd.md
├── decisions.md
├── learnings.md
└── todos.md
Claude Code Integration
gnu init creates .claude/skills/gitnu/SKILL.md, which teaches Claude to:
- Load relevant context when starting a session
- Checkpoint progress after milestones
- Use branches for exploration
- Record learnings and decisions
- Roll back when needed