Skip to main content
Installing a repo’s dependencies is usually the slowest part of starting a box. A snapshot file holds the setup that every box of the repo shares, such as the workspace install. Tesser captures a box’s disk right after that setup runs, and new boxes start from the capture, so their installs only catch up on what changed since.

Write a snapshot file

Put the shared setup in default.snapshot.toml beside the manifests:
Every manifest in the repo and every workbench of the repo takes default.snapshot.toml. A manifest’s own setup then holds only what its service needs on top, and you can leave it out when there is nothing more:
Every start runs the snapshot file’s setup, then the manifest’s setup, then dev. On a box that started from a snapshot, the install finds almost everything in place and finishes quickly. The disk this setup leaves behind is shared with every box that starts from it, including teammates’ boxes. Keep anything specific to one box, such as its address or a per-box secret, in the manifest’s setup or dev.

Give a service its own snapshot

A service that needs a different base names another snapshot file with from_snapshot:

How snapshots are made

You don’t build snapshots by hand. The first box that starts blank at a commit runs the snapshot file’s setup and captures its disk the moment that setup finishes, before the manifest’s setup, dev, or anyone else touches the box. The run carries on while the capture finishes in the background. Boxes that start from a snapshot never make one. A new box starts from the snapshot nearest its commit, so a box a few commits ahead of the snapshot still starts warm. To make the snapshots a commit is missing now, and wait for them:
Running tesser snapshot create from CI on every push to your default branch keeps a fresh snapshot waiting for everyone. Agents and CI covers how CI signs in.

Look at and manage snapshots

Tesser keeps the newest snapshot of each name on each branch and deletes old ones on its own. Snapshot files lists every field of the file, and Snapshots has the exact rules for which snapshot a box picks, when a box captures one, and how long snapshots are kept.