batty-251/cbx

Open-source version control for projects of any size: snapshots, content-defined chunking, real merges, offline first. Format and sync protocol specified. Apache 2.0. Mirror: github.com/AlexC1991/cbx

By Batty 251 (@batty-251) · Licence: Apache-2.0 · 1 published version · 155 files · 2.0 MB of source · Last published 2026-09-27

A public project on CodeRook. Browse it at https://coderook.com/batty-251/cbx.

Versions

Files in the latest version

README

CBX

CBX is version control for projects of any size: game projects, asset
libraries, datasets and model weights, as well as ordinary code. It keeps a
full history in your project folder and works entirely offline.
CodeRook is one place you can push that history, and
the protocol for doing so is published here too.

npm install -g @coderook/cli

cbx init
cbx save -m "First playable build"
cbx switch -c new-movement
cbx save -m "Try a double jump"
cbx switch main
cbx merge new-movement
cbx log

What it does

Commands

cbx initStart a history in this folder (.cbx/)
cbx save -m "…"Record the folder as it is
cbx status, cbx diffWhat changed since the last save
cbx logThe saves on this line
cbx switch [-c] <line>Move to another line, or start one
cbx merge <line>Bring another line's work into this one
cbx restore [paths] --from <save>Put files back the way a save had them
cbx push, cbx pullSync with CodeRook

cbx help <command> explains each one. The same binary also carries the
CodeRook account commands (submit, get, clone, projects, …); a folder
without a .cbx/ history behaves exactly as it always has.

Specifications

The format's test vectors are read out of the document by
cbx/test/spec_vectors.test.ts and checked against the code, so the two
cannot drift apart unnoticed.

In this repository

FolderWhat it is
[cbx/](cbx)The engine: storage, chunking, the local history, merging, push and pull. Node's standard library only.
[cli/](cli)The cbx command line, published as @coderook/cli.

Build and test

Node 20.11 or later.

cd cbx && npm ci && npm test
cd ../cli && npm ci && npm test

Licence

Copyright 2026 ACCA Gaming Productions. Licensed under the Apache License,
Version 2.0; see [LICENSE](LICENSE) and [NOTICE](NOTICE).

"CodeRook" is a name of ACCA Gaming Productions. The licence covers this code,
not the name, and not the CodeRook service.

PUBLIC REPOSITORY

Opening batty-251/cbx…

Loading the public version history and verified file tree.