gitnu (binary: gnu) is a Rust CLI tool that provides git-like version control for knowledge and context, not code. It's designed to work alongside AI coding agents (like Claude Code), enabling persistent memory across AI sessions.
- Persistent Memory: Checkpoint context states with commits
- Branching/Exploration: Safely explore alternative approaches without polluting main context
- Structured Knowledge: Organize knowledge in a domain/topic hierarchy
- Dual Authorship: Track whether changes came from humans or AI agents
- Claude Code Integration: Seamless integration via the Skills system
cargo install --path .The binary will be installed as gnu.
Initialize a new vault:
gnu init --name my-projectCheck current status:
gnu statusCreate a checkpoint:
gnu commit "Completed authentication design"Create and switch branches:
gnu branch explore-graphql --describe "Exploring GraphQL approach"
gnu checkout explore-graphqlView commit history:
gnu log --onelineMerge learnings back:
gnu checkout main
gnu merge explore-graphqlgnu init- Initialize a new gitnu vaultgnu status- Show current context stategnu commit <message>- Create a checkpointgnu log- Show commit historygnu branch- List, create, or delete branchesgnu checkout <target>- Switch branches or restore commitsgnu rewind <commit>- Roll back to a previous commitgnu diff [source] [target]- Show changes between commits/branchesgnu merge <source>- Merge learnings from one branch into anothergnu load <path>- Load domains/files into active contextgnu unload <path>- Remove from active contextgnu pin <path>- Mark files to always includegnu resolve <wikilink>- Resolve wikilinks to full pathsgnu context- Output current context as single documentgnu summary- Generate summary of current state
vault/
├── .gitnu/ # Version control metadata
│ ├── config.toml # Configuration
│ ├── HEAD # Current branch reference
│ ├── refs/heads/ # Branch pointers
│ ├── objects/ # Compressed snapshots
│ ├── commits/ # Commit logs
│ └── index.json # Staging/relevance queue
├── .claude/ # Claude Code integration
│ └── skills/gitnu/
│ └── SKILL.md # Auto-generated skill
└── domains/ # Knowledge organized by domain
├── _global/
│ ├── agent.md # Agent configuration
│ └── conventions.md
└── <project>/
├── spec.md # Project specification
├── prd.md # Product requirements
├── decisions.md # Architecture decisions
├── learnings.md # Agent discoveries
└── todos.md # Task tracking
When you run gnu init, it automatically creates a .claude/skills/gitnu/SKILL.md file that teaches Claude Code how to use gitnu for context management.
The skill enables Claude to:
- Load relevant context when starting a session
- Checkpoint progress after completing milestones
- Explore alternative approaches via branches
- Record important learnings and decisions
- Roll back when going down wrong paths
Git tracks what changed in code. gitnu tracks what the AI knows and has learned, allowing rollback to previous cognitive states.
This enables:
- Checkpointing: Save context state before major decisions
- Safe Exploration: Try alternatives without losing main context
- Knowledge Persistence: Remember learnings across sessions
- Behavioral Reset: Roll back when agent behavior degrades
- Context Management: Control what's in active memory
MIT
Built for AI agents and the humans who work with them.