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

CommandDescription
gnu init [--name NAME]Initialize a new vault
gnu statusShow current branch, last commit, active context
gnu commit MESSAGE [--author human|agent]Checkpoint current state
gnu log [--oneline]Show commit history
gnu branchList branches
gnu branch NAME [--describe DESC]Create and switch to branch
gnu checkout TARGETSwitch branch or restore commit
gnu rewind COMMITRoll back to previous commit
gnu diff [SOURCE] [TARGET]Show changes between commits/branches
gnu merge SOURCEMerge branch into current
gnu load PATHLoad file/domain into active context
gnu unload PATHRemove from active context
gnu pin PATHAlways include in context
gnu resolve "[[wikilink]]"Resolve wikilink to path
gnu contextOutput full context as single document
gnu summaryGenerate 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: