arcave

module
v0.1.0-alpha.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 18, 2026 License: Apache-2.0

README

arcave

arcave

Ephemeral environments and branching for your Docker Compose project

arcave saves the whole live state of a running Compose project — every volume, every container filesystem, and the compose spec itself — and puts it back in one command. Get your environment to the state you want, save it, and come back to it in seconds.

It works on any Compose project, on the Docker you already have.

Alpha. arcave is at v0.1.0-alpha.6. Commands, output and the storage format may change between alphas, with no migration path for savepoints taken by an earlier one. It is not ready for production use yet.

Discord

Documentation License GitHub Release GitHub Downloads (all assets, all releases)

Key Features

  • Whole-project savepoints: One savepoint holds every stateful volume, every container's writable layer, and the compose spec the project was running under.
  • Consistent by construction: By default the services are stopped before a byte is read, so nothing is captured mid-write and a database comes back without a crash-recovery pass on start.
  • No restart when you don't want one: arcave.capture.mode: pause freezes a service for the capture instead of stopping it — clients keep their connections, the copy is crash-consistent — and arcave.hook.pre-capture / post-capture run a checkpoint, a maintenance switch or a lock in the container around it.
  • Reversible rollback: A rollback takes a safety snapshot of what it is about to overwrite and replays it automatically if anything fails. A failed rollback leaves you where you started.
  • End it, bring it back: arcave down takes the environment off the daemon, volumes and restored layers included, and arcave up builds it again from any savepoint — never over a running one unless you say --force.
  • Sessions and branching: Independent lines of savepoints inside one project. A fork copies a whole session into a new one, and the two lines never mix.
  • Incremental capture: The cdc backend writes only the chunks that changed since the last savepoint. Container filesystems and images are deduplicated by default, whichever volume backend you pick — the base layer every savepoint shares is stored once.
  • Encrypted storage: Turn on encryption.enabled and everything arcave stores is encrypted to your age key before it leaves the host, so whoever reads the bucket sees names and sizes, not your data.
  • Built for agents: arcave mcp serves savepoint create, list, remove and rollback, up and down, the session commands, status and gc as MCP tools, so an agent checkpoints before it acts, rolls back when validation fails, and can fork a session of its own.
  • Space back on demand: arcave gc deletes what no remaining savepoint uses — stored data, cdc snapshots, the image tags rollbacks left in Docker — and all but the newest safety snapshot of each compose project. --dry-run shows it first.
  • What is running: arcave status shows which savepoint a rollback deployed, from which session and when, every replica's health and ports, and the containers recreated outside arcave since.
  • See what it is doing: A live tree of every step on a terminal, a log line per step in CI, a JSON stream for a program. Results are text for you and JSON for a pipe.
  • Plain Docker: No ZFS, no copy-on-write filesystem, no storage appliance, no Docker daemon to reconfigure — the daemon you already run, and the arcave binary.
  • Any compose project: Postgres, MySQL, Kafka, Redis, MinIO, your own services. No allowlist — arcave reads what your Docker daemon is running.

Use Cases

  • Testing destructive migrations: Run the migration against real data, again and again, until it is right. The reset is one command.
  • Agent iteration loops: Give an autonomous agent a checkpoint per attempt, and a failed iteration costs a rollback instead of a rebuild.
  • Environment branching: A session per feature branch, forked off a shared baseline and switched by name.
  • Resetting fixtures and demos: Seed the environment once, save it, and return to that exact state for the rest of the project's life — object storage and cache included.

Quick Start

# 1. Install the binary
curl -fsSL https://greenmask.io/arcave/install.sh | bash

# 2. Bring your compose project up and initialise arcave in it
docker compose up -d
arcave init
export ARCAVE_COMPOSE_PROJECT_NAME=myapp     # as `docker compose ls` names it

# 3. Save the state you want to come back to
arcave savepoint create before-migration

# 4. ...run the migration, the experiment, the agent...

# 5. Go back to it
arcave rollback before-migration

For more details, visit the Documentation — start with Getting started, and read the Limitations before you build a workflow on arcave.

Requirements

  • Docker 25 or newer, or Podman, with the daemon reachable by the user running arcave.
  • Linux or macOS. There is no Windows build.

The full list is in Requirements.

Powered by

JetBrains logo.

Directories

Path Synopsis
cmd
arcave command
internal
cli
Package cli adapts arcave's services to Cobra commands: each handler invokes a service method and renders the result through a printer — the model types go out as JSON (Savepoint for single-savepoint payloads, the response envelopes for multi-part responses).
Package cli adapts arcave's services to Cobra commands: each handler invokes a service method and renders the result through a printer — the model types go out as JSON (Savepoint for single-savepoint payloads, the response envelopes for multi-part responses).
config
Package config defines arcave's per-project configuration value type, the pure helpers that seed and validate it, and Unmarshal — the single home of the config policy (unknown-key rejection, defaults, validation).
Package config defines arcave's per-project configuration value type, the pure helpers that seed and validate it, and Unmarshal — the single home of the config policy (unknown-key rejection, defaults, validation).
model
Package model holds arcave's shared domain types, passed between the repository, client, service, and adapter layers.
Package model holds arcave's shared domain types, passed between the repository, client, service, and adapter layers.
provider
Package provider is the stages a workload is run through, one handle per stage; a provider implements them, core, gc and status call them.
Package provider is the stages a workload is run through, one handle per stage; a provider implements them, core, gc and status call them.
provider/compose
Package compose is the compose provider: it plans a savepoint's capture off the live compose project and carries it out, and builds a compose project back from a savepoint: prepare, down, create, restore, start.
Package compose is the compose provider: it plans a savepoint's capture off the live compose project and carries it out, and builds a compose project back from a savepoint: prepare, down, create, restore, start.
provider/compose/config
Package config is the compose provider's sections of arcave's config: their schema, defaults and validation.
Package config is the compose provider's sections of arcave's config: their schema, defaults and validation.
provider/compose/internal/client/compose
Package compose runs the compose project's lifecycle (down, create, start) through the compose library.
Package compose runs the compose project's lifecycle (down, create, start) through the compose library.
provider/compose/internal/client/docker
Package docker acts on the compose project's containers, volumes and images through the Docker API.
Package docker acts on the compose project's containers, volumes and images through the Docker API.
provider/compose/internal/client/dockerdesktop
Package dockerdesktop reaches a Docker Desktop daemon where its Docker API falls short: an inspect naming every bind on the host alike, whatever order its mounts were asked for in.
Package dockerdesktop reaches a Docker Desktop daemon where its Docker API falls short: an inspect naming every bind on the host alike, whatever order its mounts were asked for in.
provider/compose/internal/client/podman
Package podman reaches a Podman daemon where its Docker API falls short: an API answering as Docker's, over libpod's own, and the engine of package docker with a volume export of its own.
Package podman reaches a Podman daemon where its Docker API falls short: an API answering as Docker's, over libpod's own, and the engine of package docker with a volume export of its own.
provider/compose/internal/client/podman/libpod
Package libpod is a typed client of Podman's own API, as the Docker SDK is of Docker's: the transport and the wire format only.
Package libpod is a typed client of Podman's own API, as the Docker SDK is of Docker's: the transport and the wire format only.
provider/compose/internal/model
Package model is the compose provider's own vocabulary: what its stages hand each other and arcave never reads.
Package model is the compose provider's own vocabulary: what its stages hand each other and arcave never reads.
provider/compose/internal/repository/savepoint
Package savepoint reads and writes savepoint records — one JSON object per savepoint, stored at the root of that savepoint's own namespace — and deletes a savepoint whole, record first.
Package savepoint reads and writes savepoint records — one JSON object per savepoint, stored at the root of that savepoint's own namespace — and deletes a savepoint whole, record first.
provider/compose/internal/runtimeprofile
Package runtimeprofile chooses everything that differs by the engine behind the daemon: the one switch on composemodel.ContainerRuntimeKind below model.
Package runtimeprofile chooses everything that differs by the engine behind the daemon: the one switch on composemodel.ContainerRuntimeKind below model.
provider/compose/internal/service/capture
Package capture stores a savepoint of a compose project already held still: its volumes, the images its services run on, their writable layers and the spec, short of the record a commit writes last.
Package capture stores a savepoint of a compose project already held still: its volumes, the images its services run on, their writable layers and the spec, short of the record a commit writes last.
provider/compose/internal/service/captureplan
Package captureplan decides one capture of a compose project before anything is touched: what it takes, by which backends, and what it leaves out.
Package captureplan decides one capture of a compose project before anything is touched: what it takes, by which backends, and what it leaves out.
provider/compose/internal/service/capturepolicy
Package capturepolicy reads a compose project's arcave.* labels and the config's defaults into the capture decision for every resource, and spells the decisions back out as labels for the spec a savepoint records.
Package capturepolicy reads a compose project's arcave.* labels and the config's defaults into the capture decision for every resource, and spells the decisions back out as labels for the spec a savepoint records.
provider/compose/internal/service/composespec
Package composespec builds the compose spec of a live compose project from composemodel.IntrospectionResult, complete enough to create it anew.
Package composespec builds the compose spec of a live compose project from composemodel.IntrospectionResult, complete enough to create it anew.
provider/compose/internal/service/deploy
Package deploy builds a compose project back from a prepared savepoint and runs it: down, create, the replicas compose cannot name rebuilt, the volumes restored, start, and what a failure or a teardown leaves behind removed.
Package deploy builds a compose project back from a prepared savepoint and runs it: down, create, the replicas compose cannot name rebuilt, the volumes restored, start, and what a failure or a teardown leaves behind removed.
provider/compose/internal/service/garbage
Package garbage finds a session's garbage and deletes it: Finder runs the collectors over each compose project's scope, and the GarbageEraser of each op's action deletes what they found.
Package garbage finds a session's garbage and deletes it: Finder runs the collectors over each compose project's scope, and the GarbageEraser of each op's action deletes what they found.
provider/compose/internal/service/garbage/collector/layertag
Package layertag is the docker-layer-tags collector: restored layer tags no container uses.
Package layertag is the docker-layer-tags collector: restored layer tags no container uses.
provider/compose/internal/service/garbage/collector/ociblob
Package ociblob is the oci-blobs collector: deduplicated blobs no manifest lists.
Package ociblob is the oci-blobs collector: deduplicated blobs no manifest lists.
provider/compose/internal/service/garbage/collector/ociimage
Package ociimage is the oci-images collector: stored upstream images no record names.
Package ociimage is the oci-images collector: stored upstream images no record names.
provider/compose/internal/service/garbage/collector/resticrepo
Package resticrepo is the restic-repositories collector: cdc snapshots whose savepoint is dead.
Package resticrepo is the restic-repositories collector: cdc snapshots whose savepoint is dead.
provider/compose/internal/service/garbage/collector/savepointdir
Package savepointdir is the savepoint-directory collector: the trees of dead captures.
Package savepointdir is the savepoint-directory collector: the trees of dead captures.
provider/compose/internal/service/garbage/eraser
Package eraser carries out the gc's actions, one GarbageEraser per action.
Package eraser carries out the gc's actions, one GarbageEraser per action.
provider/compose/internal/service/garbage/gctest
Package gctest holds the fixtures the collectors' and erasers' tests share: a directory store, the objects planted in it and the scope gc would build over it.
Package gctest holds the fixtures the collectors' and erasers' tests share: a directory store, the objects planted in it and the scope gc would build over it.
provider/compose/internal/service/gcfinder
Package gcfinder wires the compose provider's gc: one collector per kind, one eraser per action.
Package gcfinder wires the compose provider's gc: one collector per kind, one eraser per action.
provider/compose/internal/service/hold
Package hold holds a compose project still for a capture, each service by its capture mode, and brings it back after.
Package hold holds a compose project still for a capture, each service by its capture mode, and brings it back after.
provider/compose/internal/service/imagebackend
Package imagebackend is the vocabulary two image backends stand on: where a capture lives, what it reaches the daemon through, and how it describes itself.
Package imagebackend is the vocabulary two image backends stand on: where a capture lives, what it reaches the daemon through, and how it describes itself.
provider/compose/internal/service/imagebackend/dedupcopy
Package dedupcopy splits a container's committed image between a content-addressed blob store shared by every capture and that capture's own metadata, so a base layer every savepoint carries is written once.
Package dedupcopy splits a container's committed image between a content-addressed blob store shared by every capture and that capture's own metadata, so a base layer every savepoint carries is written once.
provider/compose/internal/service/imagebackend/fullcopy
Package fullcopy keeps a container's committed image as the archive the daemon handed over: one object per capture, nothing shared, nothing addressable.
Package fullcopy keeps a container's committed image as the archive the daemon handed over: one object per capture, nothing shared, nothing addressable.
provider/compose/internal/service/inspection
Package inspection reads the live compose project off the daemon, under its own step, and refuses a daemon the provider cannot work on.
Package inspection reads the live compose project off the daemon, under its own step, and refuses a daemon the provider cannot work on.
provider/compose/internal/service/introspect
Package introspect reports a compose project as the daemon holds it, in one pass: services, their mounts, the project's volumes and networks, the images its containers run on, and `docker info`.
Package introspect reports a compose project as the daemon holds it, in one pass: services, their mounts, the project's volumes and networks, the images its containers run on, and `docker info`.
provider/compose/internal/service/prepare
Package prepare makes a savepoint ready to build before anything of the compose project is stopped: its backends, its spec checked against its record, its layers loaded into the daemon.
Package prepare makes a savepoint ready to build before anything of the compose project is stopped: its backends, its spec checked against its record, its layers loaded into the daemon.
provider/compose/internal/service/sessionstore
Package sessionstore is what the compose provider keeps of a session, reached with no daemon: its compose projects and their savepoints.
Package sessionstore is what the compose provider keeps of a session, reached with no daemon: its compose projects and their savepoints.
provider/compose/internal/service/volumebackend
Package volumebackend resolves a volume's backend to the factory that builds it; the backends live beneath it, one package per kind.
Package volumebackend resolves a volume's backend to the factory that builds it; the backends live beneath it, one package per kind.
provider/compose/internal/service/volumebackend/cdc
Package cdc captures a volume into a restic repository that outlives any one snapshot, writing only the chunks that changed.
Package cdc captures a volume into a restic repository that outlives any one snapshot, writing only the chunks that changed.
provider/compose/internal/service/volumebackend/cdc/rest
Package rest assembles the restic REST backend: the generated routes over the handler, the middleware they run behind, and the OpenAPI document they were generated from.
Package rest assembles the restic REST backend: the generated routes over the handler, the middleware they run behind, and the OpenAPI document they were generated from.
provider/compose/internal/service/volumebackend/cdc/rest/api
Package api provides primitives to interact with the openapi HTTP API.
Package api provides primitives to interact with the openapi HTTP API.
provider/compose/internal/service/volumebackend/cdc/rest/docs/api
Package docs carries the OpenAPI document the api package is generated from, embedded in the binary so that what a reader is served is the contract the routes were built from, with no file to keep beside the executable.
Package docs carries the OpenAPI document the api package is generated from, embedded in the binary so that what a reader is served is the contract the routes were built from, with no file to keep beside the executable.
provider/compose/internal/service/volumebackend/cdc/rest/model
Package model holds the vocabulary of one restic repository: how an object is addressed and which failures the protocol has a status for.
Package model holds the vocabulary of one restic repository: how an object is addressed and which failures the protocol has a status for.
provider/compose/internal/service/volumebackend/cdc/rest/repo
Package repo holds the objects of one restic repository: which key each lands under, and which store failure is one of the two conditions the protocol has a status for.
Package repo holds the objects of one restic repository: which key each lands under, and which store failure is one of the two conditions the protocol has a status for.
provider/compose/internal/service/volumebackend/fullcopy
Package fullcopy captures a volume wholesale: one tar archive per volume per snapshot, under <snapshotID>/<objectID>/, streamed through the Docker engine and stored zstd-compressed (data.tar.zst) or as is (data.tar), so ownership and permissions survive a restore.
Package fullcopy captures a volume wholesale: one tar archive per volume per snapshot, under <snapshotID>/<objectID>/, streamed through the Docker engine and stored zstd-compressed (data.tar.zst) or as is (data.tar), so ownership and permissions survive a restore.
provider/compose/internal/utils/composetest
Package composetest holds the doubles and fixtures the compose provider's packages share in their tests.
Package composetest holds the doubles and fixtures the compose provider's packages share in their tests.
provider/compose/internal/utils/fanout
Package fanout turns a configured concurrency into an errgroup limit.
Package fanout turns a configured concurrency into an errgroup limit.
provider/compose/internal/workload
Package workload is the provider's stages (prepare, deploy, capture, hold) over one compose project.
Package workload is the provider's stages (prepare, deploy, capture, hold) over one compose project.
repository/config
Package config persists arcave's per-project configuration to .arcave/config.yaml.
Package config persists arcave's per-project configuration to .arcave/config.yaml.
repository/currentsession
Package currentsession persists the host-local current-session pointer, .arcave/current_session.
Package currentsession persists the host-local current-session pointer, .arcave/current_session.
repository/encryptionmarker
Package encryptionmarker persists an encrypted arcave project's marker, encryption.json at the root of its plain store: the one object an encrypted arcave project keeps in plaintext.
Package encryptionmarker persists an encrypted arcave project's marker, encryption.json at the root of its plain store: the one object an encrypted arcave project keeps in plaintext.
repository/inflight
Package inflight persists the rollback intent marker, .arcave/inflight.json.
Package inflight persists the rollback intent marker, .arcave/inflight.json.
repository/session
Package session reads and writes session records at sessions/<id>/session.json.
Package session reads and writes session records at sessions/<id>/session.json.
service/core/gc
Package gc runs arcave gc over one session under its locks: the provider finds and deletes the garbage, gc retires the safety snapshots beyond the retention.
Package gc runs arcave gc over one session under its locks: the provider finds and deletes the garbage, gc retires the safety snapshots beyond the retention.
service/core/internal/workflow
Package workflow is what every workflow of core's tree runs under: the project lock, the write's admission, the session's lock, and what an interrupt tells the user.
Package workflow is what every workflow of core's tree runs under: the project lock, the write's admission, the session's lock, and what an interrupt tells the user.
service/core/session
Package session runs the session commands of an arcave project: create, fork, list, show, set, unset and remove.
Package session runs the session commands of an arcave project: create, fork, list, show, set, unset and remove.
service/heartbeat
Package heartbeat keeps a running operation's heartbeat fresh, and reads one back.
Package heartbeat keeps a running operation's heartbeat fresh, and reads one back.
service/lock
Package lock serialises the arcave workflows that mutate a project.
Package lock serialises the arcave workflows that mutate a project.
service/printer/text
Package text renders a command's result for a person: a summary, a table, the next command.
Package text renders a command's result for a person: a summary, a table, the next command.
service/projectinit
Package projectinit writes an arcave project's config, the one workflow of `arcave init`.
Package projectinit writes an arcave project's config, the one workflow of `arcave init`.
service/sessionlock
Package sessionlock holds a session's lock in the store, where every host sharing it sees it.
Package sessionlock holds a session's lock in the store, where every host sharing it sees it.
service/sessionref
Package sessionref resolves the session a command works in, the one rule every command shares.
Package sessionref resolves the session a command works in, the one rule every command shares.
service/storekey
Package storekey parses the store key encryption.key names and admits an arcave project's store for it.
Package storekey parses the store key encryption.key names and admits an arcave project's store for it.
storefactory
Package storefactory turns a config.Storage union into the storages.Storager the backends write through.
Package storefactory turns a config.Storage union into the storages.Storager the backends write through.
utils/testutils/daemontest
Package daemontest is what every suite run against a live daemon shares: the client, the suffix that names a test's resources, their removal, and a leak check over the whole run.
Package daemontest is what every suite run against a live daemon shares: the client, the suffix that names a test's resources, their removal, and a leak check over the whole run.
pkg
progress
Package progress reports a workflow's progress as a stream of events over a tree of workflows, batches and activities, carried through the context; see README.md.
Package progress reports a workflow's progress as a stream of events over a tree of workflows, batches and activities, carried through the context; see README.md.
progress/examples command
Command examples runs a photo album's workflows through a progress renderer:
Command examples runs a photo album's workflows through a progress renderer:
progress/renderer
Package renderer holds progress.Renderers that render a stream as JSON lines or log records.
Package renderer holds progress.Renderers that render a stream as JSON lines or log records.
progress/renderer/internal/format
Package format renders what the renderers print alike.
Package format renders what the renderers print alike.
progress/renderer/tty
Package tty renders a progress stream as a live tree on a terminal, through Bubble Tea.
Package tty renders a progress stream as a live tree on a terminal, through Bubble Tea.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL