Checkpoint-based version control.

Familiar, simple, effective, portable, and robust.

Every checkpoint records the full state of your project. Storage is flexible — works locally out of the box, or wire it into your product or system to give users version control. Embed it in a shared backend and it becomes a living monorepo: many users, each on their own branch of one workspace, with live co-editing per branch.

terminal
$ arc init
Initialized arc in .arc/
$ arc checkpoint "initial project structure"
cp-a7f3b2e1 "initial project structure" (14 files)
$ arc branch feature-auth
$ arc switch feature-auth
Switched to branch feature-auth
$ arc checkpoint "add login flow"
cp-d4c8e9f2 "add login flow" (3 files changed)
$ arc switch main
$ arc merge feature-auth
Merged feature-auth into main

How it works

The checkpoint model

Every checkpoint is a full snapshot of your project — a manifest mapping each file to its content hash. Identical content is stored once. Branches are just pointers. Merging finds the common ancestor and diffs every file at the line level.

checkpoint
id: cp-a7f3b2e1d4c8
name: add auth module
parent: cp-d4c8e9f2b3a1
timestamp: 1708234567890
author: Ada Lovelace <[email protected]>
manifest:
src/auth.js 9f8e7d6c5b...
src/index.js 3a2b1c0d9e...
package.json c4d5e6f7a8...

Content-addressed

Files are hashed with SHA-256. Same content across branches or checkpoints is never duplicated.

Three-way merge

Myers diff algorithm, same as Git. Conflict markers when both branches touch the same lines.

Full manifests

Every checkpoint is self-contained — a complete map of your project. File blobs are delta-compressed automatically, with hashes always based on full content.

Swappable backends

SQLite on disk by default. Implement two interfaces to run against PostgreSQL, S3, or anything else.

Programmatic API

Embed version control in your application

As well as working on your local filesystem, Arc exports pure functions that take a storage backend as their first argument — so you can embed it in a web app, a build tool, or a collaborative editor.

Your Application
calls
Arc Core
checkpointapplyExternalManifestbranchmergediffstashblameundosquashrestorevisitsynccloneprune
uses
Backend
FileAdapter
read, write, list, exists, remove, isDir
ArcStorage
blobs, checkpoints, config
hosted on
SQLite
PostgreSQL
S3
Custom

CLI reference

Commands

Core

arc init
arc checkpoint "msg" [-d desc]
arc checkpoint "msg" --author "Name <email>"
arc cp "msg"
arc checkpoint "msg" -- file1 file2
arc restore <cp-id>
arc visit <cp-id>
arc status
arc log [--all]

Branches

arc branch <name> [cp-id]
arc branch -d <name>
arc branch rename <old> <new>
arc branches
arc switch <name>

Merge

arc merge <branch>
arc merge <branch> --ours
arc merge <branch> --theirs
arc merge --continue
arc merge --abort

Diff and history

arc diff <cp-a> <cp-b>
arc blame <file> [cp-id]

Undo, squash, and discard

arc undo [N]
arc squash <N> [name] [-d desc]
arc discard

Stash

arc stash [-m "msg"]
arc stash list
arc stash show [index] [-p]
arc stash pop [index] [--ours|--theirs]
arc stash apply [index] [--ours|--theirs]
arc stash apply --continue
arc stash apply --abort
arc stash branch <name> [index]
arc stash drop [index]

Cherry-pick and tags

arc cherry-pick <cp-id>
arc cherry-pick --continue
arc cherry-pick --abort
arc tag <name> [cp-id]
arc tag -d <name>
arc tags

Remote & Sync

arc remote add <name> <url> [--token <t>]
arc remote remove <name>
arc remote list
arc sync [remote]
arc fetch [remote] [--depth N]
arc clone <url> [dir] [--depth N]

Maintenance

arc prune --keep <N>
arc prune --before <date>
arc prune --dry-run
arc update

Config

arc config user.name "Your Name"
arc config user.email "[email protected]"
arc config --global user.name "Name"
arc config user.name

Get started

Install from npm, initialize, and create your first checkpoint.

terminal
$ npm install arc-vcs
$ arc init
Initialized arc in .arc/
$ arc config user.name "Ada Lovelace"
$ arc config user.email "[email protected]"
$ arc checkpoint "first snapshot"
cp-e5f6a7b8 "first snapshot" (12 files) by Ada Lovelace <[email protected]>

Remote sync

Sync your project to a remote server with arc sync. For hosting, use arc-host — a lightweight zero-dependency server.

terminal
$ npx arc-host --port 3000
$ arc remote add origin http://localhost:3000 --token arc_...
$ arc sync
Synced with origin (3 checkpoints pushed)

Motivation

Why use Arc

Arc started from a question: what would version control look like if designed as a library first, with the full feature set built in from the start?

Refined from decades of version control

RCS, CVS, Subversion, Git — each generation kept what worked and rethought what didn't. Arc carries forward the operations that proved essential and leaves behind the complexity that accumulated along the way.

Integrity by design

Data lives in a database, not loose files on disk. Content-addressed blobs, atomic writes, and structured storage mean there's no equivalent of a broken packfile or dangling object. Your history stays intact.

Safe by default

Undo and squash refuse to cross fork points or merge boundaries. Your working tree is always on disk as a safety net. Operations that could lose work simply won't run.

Portable

SQLite on disk, PostgreSQL on a server, a custom adapter in the browser. Same API, same operations. Pure JavaScript with zero npm dependencies — runs wherever Node does.

Built for apps, not just repos

Embed version control directly in your product. Let users save, branch, and undo inside a web app, a design tool, a game editor — anywhere state changes over time.

Small and readable

The entire core is a handful of JavaScript modules. No compiled binaries, no opaque internals. You can read the whole thing.