Built for the agent at the keyboard
Built for the agent at the keyboard
vx gives coding agents JSON with a schema for every answer, keeps a failure's log and files, and stores run history in a SQLite file.
Why did this task run? What did the run do? Where did the time go? One command answers each, in text or JSON.
Four questions, four commands. Each prints text you can read, or JSON a script or agent can use.
| Question | Command |
|---|---|
| Why does this task run? | vx run --affected=HEAD --dry |
| What did the run do? | vx last --format json |
| What depends on what? | vx run --dry --format json |
| Where did vx spend time? | VX_DEBUG_TIMING=1 vx run |
Edit one file in packages/a and ask what a pull request would run:
$ vx run build --all --affected=HEAD --drywould run: ▶ packages/a#build cache miss — would exec 2feaa870 ~15ms affected: packages/a/src/index.ts changed (an input) ▶ packages/c#build cache miss — would exec 7ed8a143 ~7ms affected: packages/a/src/index.ts changed (an input), via packages/a#build
2 task(s) planned, 2 would run.predicted: ~22ms wall · ~22ms total executionEach task names the changed file, or the dependency path that reached it.
$ vx last --format json | jq -c '.invocation | {command, taskCount, failedCount, hitCount, totalDurationMs}'{"command":"vx run build --all","taskCount":4,"failedCount":0,"hitCount":4,"totalDurationMs":9}$ vx last --format json | jq -c '.tasks[0] | {project, task, status, durationMs, hash}'{"project":"packages/d","task":"build","status":"cache-hit","durationMs":0,"hash":"9f1cef08a2fd4006"}vx last --list --format json lists recent runs, newest first.
$ vx run build --all --dry --format json \ | jq -r '"digraph G {", (.tasks[] | .id as $t | .deps[] | " \"\(.)\" -> \"\($t)\""), "}"'digraph G { "packages/a#build" -> "packages/c#build"}Pipe it into dot -Tsvg.
xychart-beta horizontal title "A fully cached run of 4 tasks, 90 ms (ms per stage)" x-axis ["startup", "workspace config", "classify + probe", "record history", "open cache", "run graph", "build graph", "close", "discover projects", "git enumeration", "other"] y-axis "ms" 0 --> 50 bar [46.4, 10.2, 8.8, 5.2, 5.0, 4.2, 2.3, 2.3, 1.9, 1.3, 2.0]
VX_DEBUG_TIMING=1 vx run build --all, fastest of 7 · demo workspace · vx 22f6eb7 · 2026-10-23
VX_DEBUG_TIMING=1 prints this table for any run. A slow config or a
slow cache lookup stands out at once.
Every flag: CLI reference. The run JSON’s fields: Built for agents. More at vznjs.github.io/vx.