Appearance
vix replay
vix replay replays a previously recorded Vix execution.
It helps you reproduce a run that failed, crashed, or behaved unexpectedly. Use it when you want to rerun the same command without guessing what happened.
vix rundoes not record replay data by default. To create a replay record, run your command with--replay.
Usage
bash
vix replay [id|last|failed] [options] [-- app-args...]What it does
vix replay loads a recorded execution from .vix/runs/ and runs it again with the stored context.
It can:
- replay the latest recorded run
- replay the latest failed run
- replay a specific run by id
- show recorded run details
- list previous runs
- clean recorded replay data
- append extra runtime arguments
- add temporary environment variables during replay
Recording a run
Replay records are created only when vix run is executed with --replay.
bash
# Record a project run
vix run api --replay
# Record a built executable run
vix run ./build-ninja/api --replay
# Record a manifest run
vix run app.vix --replay
# Record a single-file C++ run
vix run main.cpp --replayWithout --replay, vix run runs normally and does not create .vix/runs/.
bash
vix run api
vix run main.cppThese commands do not create replay data.
Basic usage
bash
# Replay the latest recorded run
vix replay
# Replay the latest run explicitly
vix replay last
# Replay the latest failed run
vix replay failed
# Replay a specific run
vix replay 2026-05-05-18-42-11-a91fWhen to use it
Use vix replay when an execution fails and you want to reproduce it quickly.
Typical workflow:
bash
vix run api --replay
# something fails
vix replay failedOr:
bash
vix run server.cpp --replay
# unexpected result
vix replay lastWhy it matters
Without replay, you often need to remember: which command was used, which directory it ran from, which arguments were passed, which environment variables were active, which output was produced, and whether the run failed, crashed, or was interrupted.
vix replay keeps that context in a recorded run.
Difference between vix run, vix dev, and vix replay
| Command | Best for | Records/replays context |
|---|---|---|
vix run | manual run | records only with --replay |
vix dev | active development | records development executions when enabled |
vix replay | reproducing a previous run | replays recorded execution |
vix replay does not replace vix run or vix dev. It uses recorded executions created by replay-enabled runs.
Replay the latest run
bash
vix replayEquivalent to:
bash
vix replay lastYou can also use:
bash
vix replay latestReplay the latest failed run
bash
vix replay failedYou can also use:
bash
vix replay failThis is useful when several successful runs happened before or after a failure.
Replay a specific run
Each recorded run has an id:
bash
vix replay 2026-05-05-18-42-11-a91fRun ids are stored under .vix/runs/.
List recorded runs
bash
vix replay list
# Show only failed runs
vix replay list --failed
# Show only successful runs
vix replay list --success
# Show only interrupted runs
vix replay list --interrupted
# Limit the number of results
vix replay list --limit 10Show a recorded run
bash
# Show the latest run
vix replay show last
# Show the latest failed run
vix replay show failed
# Show a specific run
vix replay show 2026-05-05-18-42-11-a91fThis prints the recorded metadata, command, status, duration, logs, and replay hint.
Dry run
Use --dry-run to print the replay command without executing it:
bash
vix replay last --dry-runUseful when you want to inspect what will be replayed before running it.
Pass extra app arguments
Arguments after -- are appended to the replay command:
bash
vix replay last -- --port 8080Add environment variables
bash
vix replay last --env VIX_LOG_LEVEL=debugMultiple variables:
bash
vix replay last --env VIX_LOG_LEVEL=debug --env APP_ENV=localUse another replay directory
By default, vix replay reads from .vix/runs/ in the current directory.
Use --dir or --cwd to read from another location:
bash
vix replay last --dir ./api
vix replay list --cwd ./apiClean replay data
bash
vix replay cleanRemoves recorded replay runs from .vix/runs/.
Recorded files
A recorded run is stored as:
.vix/runs/<id>/
run.json
stdout.log
stderr.log
combined.logThe latest marker stores the most recent run id:
.vix/runs/latestOptions
| Option | Description |
|---|---|
--dry-run | Print the replay command without executing it |
--summary | Print the record summary before replaying |
--no-summary | Do not print the record summary |
--dir, --cwd | Use another directory containing .vix/runs |
--env KEY=VALUE | Add an environment variable during replay |
-- | Append remaining arguments to the replay command |
-h, --help | Show command help |
Recording option on vix run
| Option | Description |
|---|---|
--replay | Record this vix run execution under .vix/runs/ |
Example:
bash
vix run api --replay
vix run ./build-ninja/api --replay
vix run app.vix --replay
vix run main.cpp --replayList options
| Option | Description |
|---|---|
--all | Show all replay runs |
--failed, --fail | Show failed replay runs |
--success, --ok | Show successful replay runs |
--interrupted, --interrupt | Show interrupted replay runs |
--limit <n> | Limit number of rows |
--dir, --cwd <path> | Use another directory containing .vix/runs |
Common workflows
bash
# Record and replay a project run
vix run api --replay
vix replay last
# Record and replay a single-file C++ run
vix run main.cpp --replay
vix replay last
# Replay the latest failed run
vix replay failed
# Inspect the latest run before replaying
vix replay show last
vix replay last
# List failures
vix replay list --failed
# Replay with debug logs
vix replay failed --env VIX_LOG_LEVEL=debug
# Print the replay command only
vix replay last --dry-run
# Clean old replay data
vix replay cleanCommon mistakes
Expecting vix run to record automatically
Wrong:
bash
vix run api
vix replay lastCorrect:
bash
vix run api --replay
vix replay lastvix run does not create replay records by default. Use --replay when you want the execution to be recorded.
Running replay from the wrong directory
Wrong:
bash
cd ..
vix replay lastCorrect:
bash
cd api
vix replay lastOr:
bash
vix replay last --dir ./apivix replay reads .vix/runs/ from the current directory unless --dir or --cwd is provided.
Forgetting that failed means the latest failed run
bash
vix replay failedThis does not replay every failed run. It replays only the latest failed run.
To list all failures:
bash
vix replay list --failedPassing extra arguments without --
Wrong:
bash
vix replay last --port 8080Correct:
bash
vix replay last -- --port 8080The -- separates replay options from arguments appended to the replayed command.
Related commands
| Command | Purpose |
|---|---|
vix run | Build and run manually |
vix dev | Start dev server with auto-reload |
vix build | Configure and compile |
vix check | Validate build, tests, runtime, and sanitizers |
vix tests | Run tests |