sovereign version control

graf

Version control + package distribution in one protocol.
BLAKE3 content-addressing. Ed25519 identity. Built in Janus.

One protocol. One identity. One manifest.
Ship code, distribute packages, prove integrity – without ever touching GitHub again.

~26K Lines Janus + Zig
106/106 Tests Passing
35+ Commands
v0.3.0 Release
Get Started View Source →

First Principles. Zero Baggage.

What happens when you build a VCS from the physics up, without 30 years of accidental complexity.

Content-Addressed

BLAKE3 CIDs. The hash is the name. Every object is immutable, every reference is a proof. Physics, not policy.

Format: graf1 + hex(BLAKE3(type_byte ++ content)). 69 characters. Deterministic.

Three-Clock Causality

Wall clock + Lamport counter + local sequence. Every event has a total causal order. CRDT-safe. Merge without coordination.

Distributed-first timestamps. No clock skew ambiguity.

Cryptographic Identity

Ed25519 keypairs. Your public key is your identity. No usernames, no passwords, no OAuth, no KYC. SoulKeyID – 20 characters, zero PII, permanent. Works the same for humans and autonomous agents.

Format: grf1 + hex(BLAKE3(pubkey)[0:8]). Challenge-response auth. No secrets on the wire.

No Accidental Complexity

~26,000 lines. Full VCS + package manager + native transport: checkpoint, diff, merge, cherry-pick, blame, release, stash, sync, publish. 35+ commands. Clarity is the architecture.

Fewer lines means fewer bugs, faster audits, easier contribution.

Git Redistribution

Graf doesn't lock you out of the old ecosystem. graf sync push redistributes your repository to any legacy git remote – GitHub, GitLab, Gitea, bare SSH. Sovereign at the core, compatible at the edge.

Move at your own pace. Keep your mirrors. Leave when you're ready – or don't.

One Protocol. Everything Ships.

Git has one protocol for code and npm/pip/cargo for packages. Graf unifies both. GTP – the Graf Transfer Protocol – handles version control, package distribution, and identity in a single wire protocol. Push code and publish packages through the same endpoint, with the same key.

Challenge-Response Auth

Ed25519 challenge → sign → session nonce. No passwords stored. No tokens to rotate. BLAKE3(challenge ++ sig ++ secret) derives the session.

Content-Addressed Storage

R2-backed CAS. Push objects by CID, pull by CID. HEAD to check existence. Batch existence queries. Every write is idempotent.

Atomic Ref Updates

Compare-and-swap on every ref write. Race-safe. old_cid must match or the update is rejected. Tags are immutable once created.

GPAK Bulk Transfer

Pack multiple objects into a single framed stream. Length-prefixed frames, BLAKE3 footer checksum. Efficient clone and fetch.

Package Distribution

Same protocol, same identity. graf publish seals a package with your SoulKey, pushes to the registry. graf resolve pulls deps by CID.

106/106 Tests Passing

68 integration tests against the live forge + 38 wire protocol tests from the Janus port. Auth, repos, CAS, refs, GPAK, SBI encode/decode, CBOR, MessagePack. Zero regressions.

Complete Ecosystem. No Third Parties.

Everything you need to version, build, publish, and collaborate – sovereign from edge to forge.

Graf CLI

Local Tooling

24 commands. Single binary built with janus build. Checkpoint, diff, merge, blame, stash, release, sync. Sub-100ms status via stat cache.

Graf Forge

Cloud Infrastructure

GTP v1.1 server on Cloudflare Workers. R2 for objects, D1 for refs, KV for sessions. BLAKE3 WASM for all crypto. Ed25519 verification at the edge. Cloudflare-independent local backends coming soon – self-host your own forge.

📦

Hinge

Package Manager

SemVer 2.0 resolution, BFS dependency solver, KDL manifests, RFC 8785 lockfiles. Seal, sign, publish, verify. Transparency log with BLAKE3 chain.

🌐

Web Interface

Coming Soon

Repository browsing, ref explorer, package registry UI, SoulKey management. The GitHub/GitLab replacement – without the surveillance.

Agent-Native. Not Agent-Bolted.

Git was designed for humans typing at terminals in 2005. Twenty years later, AI agents generate more commits than people in some repositories. Graf was designed for this world. Agent collaboration isn't a plugin or a wrapper – it's why the architecture exists.

Per-Agent Branches

Each agent operates on its own branch. No lock contention. No index.lock. Parallel work by design, merge when ready.

WorkFn Interface

Agents implement a typed WorkFn callback. The nursery schedules, supervises, and collects results. Structured concurrency for version control.

Nursery Supervision

Three-level nested nurseries: supervisor → agent → scanner. Budget fairness. Structured cancellation. If an agent panics, its siblings survive.

Policy Hooks

Every merge can be gated: approve, reject, hold. Human-in-the-loop or fully autonomous – the policy is configurable, not hardcoded.

Conflict Reporting

Three-way conflict entries carry base_cid, ours_cid, theirs_cid. Agents can resolve programmatically. No interactive prompts needed.

SoulKey Identity

Every agent gets an Ed25519 keypair. SoulKeyID identifies the agent permanently. No shared credentials. Audit trail is cryptographic, not string-based.

Git asks "who typed this?" – Graf asks "what caused this, and can you prove it?"

The Record. No Adjectives.

Four version control systems. Three decades of evolution. One table.

CVS (1990) · Git (2005) · Mercurial (2005) · Graf (2026)
Feature CVS Git Mercurial Graf
Storage model RCS deltas per file Snapshot DAG, packfiles Revlog delta chains Merkle DAG, BLAKE3 CIDs, CBOR
Content addressing None (sequential revnums) SHA-1 (SHA-256 transition) SHA-1 nodeid BLAKE3, prefix-sharded CAS
Branching Directory copies Lightweight refs Named branches / bookmarks Named refs + per-agent branches
Merge strategy Manual Recursive 3-way + rename detect 3-way with bdiff LCA via alternating BFS + 3-way tree+line merge
Timestamps Wall clock Wall clock + timezone Wall clock + timezone Three-clock: wall + Lamport + sequence (CRDT-safe)
Wire protocol pserver / SSH git:// / SSH / HTTP smart SSH / HTTP GTP v1.1 – unified VCS + package distribution
Package distribution None None (npm/pip/cargo separate) None Native: Janus Hinge & Nexus OS Nip packages & your sources over same protocol, same identity
Identity / auth Unix user Author string, GPG optional Author string Ed25519 SoulKeyID + challenge-response. Zero PII.
Agent awareness None None None Native: per-agent branches, WorkFn, nursery supervision, policy hooks, three-way conflict CIDs
Concurrency Single-threaded, lock files Single-threaded + index.lock Single-threaded M:N fiber scheduler, nursery-structured concurrency
Codebase ~80K lines C ~400K lines C ~200K lines Python/C ~26K lines Janus + Zig
Crypto None SHA-1 (migrating SHA-256) SHA-1 BLAKE3 everywhere. Ed25519 signatures. Zero SHA.

CVS counted files. Git counted snapshots. Graf counts meaning. And it does it in ~26,000 lines – including native push to its own forge – because it doesn't carry 30 years of accidental complexity.

Build. Init. Ship.

Single static binary. GTP-native push. No build step required.

terminal
# download prebuilt binary (Linux, macOS, soon: Brew)
curl -fsSL https://graf.tools/install.sh | sh
# or: wget -qO- https://graf.tools/install.sh | sh

# initialize repository
graf init myproject

# content-addressed snapshot
graf checkpoint "first snapshot"

# stat-cached, sub-100ms
graf status

# Merkle DAG history
graf log

# signed release with test proof
graf release create v1.0.0 --run-tests

# verify the signature
graf release verify v1.0.0
# → VALID: Ed25519 signature verified

# generate your SoulKey identity (once, global)
graf key generate
# → SoulKey: grf1a8b7c9d2 + Ed25519 keypair

# add remote & push natively via GTP
graf remote add origin https://grafhub.org grf1a8b7c9/myproject
graf push
# → Push complete: 4 objects, 176 bytes, 1 ref updated

35+ Commands. One Binary.

Version control, native push, package distribution, git interop. Everything. One binary.

Core

init Initialize repository
status Stat-cached change detection
checkpoint Content-addressed snapshot
log DAG history with three-clock timestamps
diff Myers O(ND) line-level diff
cat Inspect any CAS object by CID

Branch & Merge

branch Create, switch, list, delete
merge LCA + 3-way tree+line merge
cherry-pick Apply checkpoint to current branch
revert Undo checkpoint's changes
stash Snapshot/restore dirty state

History & Integrity

blame Line-level attribution
fsck Full DAG integrity verification
checkout Materialize tree by CID

Release & Package

release create Ed25519-signed certificate
release verify Cryptographic signature check
tag create Lightweight named ref to CID
publish Seal and push Hinge package

Native Transport (GTP v1.1)

push Push objects + refs to GrafHub
pull Pull from remote registry
clone Clone a remote repository
remote Add, list, remove remotes
key generate Create global Ed25519 identity

Git Interop & Infrastructure

sync push Redistribute to git remotes
sync pull Import from git remotes
import Import git history
daemon Unix socket server + MCP
cas push Bulk CAS object sync

Architecture

Five subsystems. Auditable in an afternoon. No magic.

Content-Addressed Store

BLAKE3 CIDs with graf1 prefix. Prefix-sharded object directory, transparent deflate compression. CIDs hash raw content – compression is invisible. graf fsck verifies the entire graph.

Object Model

Five types: BlobTreeChangeCheckpointRelease. All CBOR-serialized. Checkpoints form the DAG. Tags and releases are cryptographic – not faith.

🔑

SoulKey Identity

Ed25519 keypair = identity. SoulKeyID = grf1 + BLAKE3(pubkey)[0:8]. 20 characters, zero PII, permanent. No KYC – for humans and agents alike. Challenge-response auth – no passwords on the wire, no tokens to rotate.

Merge Engine

LCA via alternating BFS (depth limit 10K). Three-way tree + line-level merge. Conflict entries carry base_cid, ours_cid, theirs_cid for programmatic resolution.

📜

Release Certificates

Ed25519-signed release objects binding version + checkpoint + tree CID. --run-tests embeds verified test counts. Git tags are faith. Graf releases are receipts.

GTP Wire Protocol

17 endpoints over HTTPS. CAS per-object, refs with atomic CAS, GPAK bulk transfer, challenge-response auth. BLAKE3 WASM at the edge. Cloudflare Workers + R2 + D1.

Forge is Live. Native Push Works. Protocol is Proven.

Forge
Operational
Native Push
Live
Protocol
GTP v1.1
Tests
106/106 Passing
Crypto
BLAKE3 + Ed25519
CLI Language
Janus (:core)
Package Manager
Hinge (Beta)
SHA-256
Purged. Zero.
License
LCL-1.0
"Git tags are faith. Graf releases are receipts."

Ed25519-signed release certificates with embedded test proof. The version, the checkpoint, the tree, the signature – all in one CAS object, verified by BLAKE3.

Open Source Licenses

Graf and the Libertaria Stack are published under four licenses covering the full spectrum from fully open to commercial-safe.

LSL-1.0

Libertaria Sovereign License

File-level copyleft. Use freely; modifications to core files must be shared back. Linking and applications remain proprietary.

Read full text →
LCL-1.0

Libertaria Commonwealth License

Strong copyleft. Network deployments must publish source. Ensures SaaS cannot hide source behind a paywall.

Read full text →
LUL-1.0

Libertaria Unbound License

Permissive. Use, modify, close the source, sell the result. Attribution only. For specs, docs, and protocols.

Read full text →
LVL-1.0

Libertaria Venture License

Glass Box. Binary distribution allowed if build provenance is published. For commercial deployments with verifiability.

Read full text →

Libertaria Sovereign License (LSL) v1.0

File-Level Copyleft
Preamble: This License fosters a sovereign, decentralized ecosystem. It creates a balance between proprietary commercial use and communal innovation. It guarantees that improvements to the Core technology remain open, while allowing flexibility for the applications built upon it.

1. Grant of Rights: Each Contributor grants a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable license to reproduce, prepare Derivative Works of, publicly display, sublicense, and distribute the Contribution.

2. The Reciprocity Rule: If You distribute the Contribution in Executable Form, you must make the Source Code Form of any Modifications available under the terms of this License. This requirement applies only to the files of the Contribution itself that You have modified.

3. Larger Works: You may create and distribute a Larger Work under terms of Your choice. The Reciprocity requirement does not extend to Your independent code that links to or consumes the Contribution, provided that independent code is kept in separate files.

Disclaimer: THIS SOFTWARE IS PROVIDED "AS IS," WITHOUT WARRANTY OF ANY KIND.

Governing Law: The Netherlands (Amsterdam courts).

Libertaria Commonwealth License (LCL) v1.0

Strong Copyleft + Service Rule
Preamble: This License ensures software remains a common good, regardless of how it is distributed or accessed. It closes the "Service Loophole," guaranteeing that users of networked services have the same rights to the code as users of binary files.

1. Grant of Rights: Each Contributor grants a perpetual, worldwide, non-exclusive, no-charge, royalty-free license to reproduce, prepare Derivative Works of, publicly display, sublicense, and distribute the Work.

2. The Service Rule (SaaS Loophole Closed): If You perform a Network Deployment of the Work or a Derivative Work, you must make the complete Source Code available to all users interacting with it. You must provide a prominent download link within the user interface or API documentation.

3. Copyleft Scope: If You create a Derivative Work, the entirety of that Derivative Work must be licensed under this License. You cannot mix this Work with proprietary code and keep the result closed.

Disclaimer: THE WORK IS PROVIDED "AS IS," WITHOUT WARRANTY OF ANY KIND.

Governing Law: The Netherlands (Amsterdam courts).

Libertaria Unbound License (LUL) v1.0

Permissive — Attribution Only
Preamble: This License is designed for maximum velocity and adoption. It applies to software, protocols, specifications, documentation, and artistic works. It grants absolute freedom to use, modify, and distribute the Work, ensuring that ideas and standards can flourish without friction.

1. The "Do Anything" Clause: Each Contributor grants a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in any form.

2. Freedom of Modification: You are not required to share the source code of Your modifications. You may create proprietary Derivative Works, close the source, and sell the result without restriction.

3. Attribution: The only condition is that You must include the original copyright notice and a copy of this License (or a link to it) in any significant distribution of the Work or Derivative Works.

Disclaimer: THE WORK IS PROVIDED "AS IS," WITHOUT WARRANTY OF ANY KIND.

Governing Law: The Netherlands (Amsterdam courts).

Libertaria Venture License (LVL) v1.0

Glass Box — Verified Binary Distribution
Preamble: This License is a compact of trust for commercial entities. You may distribute the Work in binary-only form, provided that the provenance of the binary is cryptographically verifiable by the Community. The "Glass Box" model: You may hide the source code, but you cannot hide the build process.

1. Commercial Distribution: You may distribute the Work in Executable Form without releasing the Source Code, subject to: (a) the binary is signed with a key corresponding to a valid Registered Entity on the Trust Registry, and (b) a Build Manifest is included proving the Binary matches declared version specifications.

2. End User Rights: The End User receives a non-exclusive, perpetual license to run, install, and use the Work. The End User may not reverse engineer or decompile the Work, except as permitted by applicable law.

3. The Glass Box Rule: If a compliance audit reveals the distributed Binary contains malicious code not accounted for in declared dependencies, the Registered Entity status and this License are immediately revoked.

Disclaimer: THE WORK IS PROVIDED "AS IS," WITHOUT WARRANTY OF ANY KIND.

Governing Law: The Netherlands (Amsterdam courts).