Skip to content
vznjsPublic

Repository files navigation

vx logo

vx

Task orchestration you own.
vx is a task orchestrator. It runs your tasks in the right order, many at once,
and never does the same work twice.

JavaScript support comes from plugins, and any other system can hook in the same way.
No cloud, no account, no paywall.

npm CI MIT license Documentation

vx run build --all, twice. First run: @demo/ui#build, then @demo/web#build, both miss and save. Second run: both up to date in milliseconds.

Above: a real run. @demo/web uses @demo/ui, so ui builds first. The second run finds nothing changed and runs nothing.

Start

bunx @vzn/vx init

init installs vx and writes .vx/workspace.ts, which marks your workspace root. In a Turborepo or Nx workspace it converts that config too.

You need Bun 1.4.4 or later for bunx. vx itself is a prebuilt binary for Linux (glibc, not Alpine's musl) and macOS.

A task is one command

Each project lists its tasks in a vx.config.ts:

// packages/web/vx.config.ts
import type { ProjectConfig } from '@vzn/vx/config'

export default {
  tasks: {
    build: {
      dependsOn: ['^build'], // build what web uses first: @demo/ui
      exec: { command: 'vite build' }, // the tool itself, never a package script
      inputs: { files: ['src/**', 'index.html', 'vite.config.ts'] }, // what it reads
      outputs: { files: ['dist/**'] }, // what it writes
      cache: true, // skip it while the inputs stay the same
    },
  },
} satisfies ProjectConfig

Save the config to the lock, then run:

vx lock              # every run reads the lock, so lock after each config change
vx run build --all   # ui, then web
vx run build --all   # nothing changed: up to date

Edit packages/ui/src/index.ts and both build again. vx why @demo/web#build names that file as the cause.

Next: the Quickstart caches your first task in five minutes.

What you get

  • A cache you can trust: TypeScript configs are evaluated before hashing, so imports and computed values are in the key. Outputs are wiped before every run and restore: no stale file survives.
  • Sandboxed tasks: opt in per task; a workspace file the task did not declare is out of its reach, so it cannot poison the cache.
  • Clean exits: Ctrl-C reaps each task's process group.
  • Distributed task execution: split one CI run across workers your own CI starts. No vendor in between.
  • A plugin at every step of a run (16 hooks, commands included): remote cache, remote execution, telemetry, CLI verbs. Core needs none.
  • Free: MIT. No paywall, no cloud, no account.

Learn vx

The docs are one story, in order:

You want to Read
cache your first task Quickstart
move from Turborepo or Nx Migrate
run a task in every package, upstream first Tasks
run only what a branch changed Running tasks
know why a task ran again Caching
check every push on CI CI
share the cache between CI jobs Remote cache
split one CI run across machines Distributed task execution
add your own behaviour Plugins
look up a command or a field CLI, config

Plugins

Each adds what core leaves out. Declare it in .vx/workspace.ts; with none, vx runs and caches on your machine.

Package What it adds
@vzn/vx-lockfile Keys each project on its own dependencies: pnpm, bun, npm, yarn
@vzn/vx-migrate Converts Turborepo or Nx config, and keeps their remote cache
@vzn/vx-cache Remote cache for CI jobs, on your cache server
@vzn/vx-cache-server The cache server you host: Bun or Docker with S3, or Workers with R2
@vzn/vx-dte Distributed task execution over workers your CI starts
@vzn/vx-dte-server The relay where a run meets its workers: Workers, Bun or Docker
@vzn/vx-history Starts first the tasks the rest wait on, learned from past runs
@vzn/vx-history-server The task timings server vxHistory() reads: Bun, Docker or Workers
@vzn/vx-ci A GitHub Actions job summary
@vzn/vx-otel OpenTelemetry traces, metrics and logs, no SDK
@vzn/vx-reapi Remote cache and remote execution over Bazel's REAPI
@vzn/vx-devtools The CI token check the servers and plugins share

Write your own: Write a plugin.

How it compares

Every test in vx, Turborepo, Nx, Vite Task, Nix and moon, turned into one suite and run sandboxed against each tool. An issue is a case a tool supports but gets wrong.

Tool Cases passed Issues
vx 1,955 of 2,024 0
Nx 24.0.2 1,344 of 2,024 416
Turborepo 2.11.10 1,321 of 2,024 401
moon 2.6.5 1,205 of 2,024 431
Nix 2.34.6 1,053 of 2,024 276
Vite Task 1.4.0 974 of 2,024 351

vx has 0 issues in every area: cache, inputs, outputs, affected, sandbox and watch. Every case, every tool: conformance. Speed, same commands on the same machine: benchmarks.

Status

Pre-alpha. This workspace lints, tests and builds itself with vx. The config may still change before 1.0.

vx takes issues, not pull requests: report a bug or ask for a feature in issues.

License

MIT. The prebuilt binaries embed Bun and a few npm packages under permissive licenses; their notices ship as THIRD_PARTY_NOTICES.txt in each platform package and GitHub release.

Releases

Packages

Used by

Contributors

Languages