What is vx?
vx is a task runner and cache for JavaScript monorepos. Each project
declares its tasks in a vx.config.ts; vx run runs them in dependency
order, in parallel, and skips any task whose inputs did not change.
bunx @vzn/vx initvx run build --allimport { defineProject } from '@vzn/vx/config'
export default defineProject({ tasks: { build: { dependsOn: ['^build'], exec: { command: 'tsc -b' }, inputs: { files: ['src/**', 'tsconfig.json'] }, cache: { outputs: { files: ['dist/**'] } }, }, },})vx runs on Bun, on macOS and Linux (glibc). On Windows, use WSL2.
What it does
Section titled “What it does”| You want to | vx |
|---|---|
| run a task in every package | vx run build --all, upstream first (Tasks) |
| skip work that is already done | restores dist/ when the inputs match (Caching) |
| know why a task re-ran | vx why app#build names the file or variable that changed |
| run only what a branch touched | vx run test --affected (Running tasks) |
| prove a task’s inputs are complete | exec.sandbox fails a read outside them (Sandboxing) |
| share the cache with CI | a remote cache plugin (Remote cache) |
| spread a run over CI machines | dte() hands tasks to workers your CI starts (Distributed runs) |
| keep a Turborepo or Nx config | @vzn/vx-migrate runs it unchanged (Migrate) |
Nothing is inferred. A task is cached only when it says what it reads
(inputs) and what it writes (cache.outputs).
QuickstartCache your first task in two minutes.
GuidesOne task per page: run what changed, find a miss.
CLIEvery command and flag.
vx.config.tsEvery config field.