---
title: "Fork a box for a test matrix"
description: "Fork one box fifty times from a snapshot and run the same command in each, with one receipt for the lot."
order: 2
verified:
  cli: "0.0.0-mock"
  date: "2026-10-20"
---

Fork with `vakna fork <box> --count <n> -- <command>`: Vakna takes a snapshot, starts the boxes from it, runs the command in each and groups the failures.

## How do I run a command in fifty copies of a box?

```sh
$ vakna fork api --count 50 -- go test -run TestRetry ./retry/...
```

```prints
snapshot snp_eu1a_z7a8b9c0 taken 0.19s
forked api ×50 from snapshot · 0.34s each
task prove-flaky-retry tsk_eu1a_0k1m2n3p
ran go test -run TestRetry ./retry/... in 50 boxes · 42 exit 0, 8 failed 2m 11s
errors: 2 signatures
  assertion in retry_test.go:88 ×6
  timeout after 30s ×2
receipt: prove-flaky-retry · 50 boxes · 8 failed · 2m 11s · $0.46 · mocked
```

The exit code is 1 when any box's command failed, so a script can branch on it.

## How do I see the whole receipt?

```sh
$ vakna fork api --count 50 -- go test -run TestRetry ./retry/...
$ vakna receipt prove-flaky-retry
```

```prints
snapshot snp_eu1a_z7a8b9c0 taken 0.19s
forked api ×50 from snapshot · 0.34s each
task prove-flaky-retry tsk_eu1a_0k1m2n3p
ran go test -run TestRetry ./retry/... in 50 boxes · 42 exit 0, 8 failed 2m 11s
errors: 2 signatures
  assertion in retry_test.go:88 ×6
  timeout after 30s ×2
receipt: prove-flaky-retry · 50 boxes · 8 failed · 2m 11s · $0.46 · mocked
receipt · task prove-flaky-retry
tsk_eu1a_0k1m2n3p                                                         mocked
────────────────────────────────────────────────────────────────────────────────
boxes       50                                                       took 2m 11s
started     forked ×50 from snapshot                                  0.34s each
passed      42 of 50
errors      2 signatures
            assertion in retry_test.go:88 ×6
            timeout after 30s ×2
wall clock                                                                1h 18m
cost                                                                       $0.46
────────────────────────────────────────────────────────────────────────────────
without the snapshot: +6m 45s of setup (8.45s per box, measured)
```
