Skip to content
GitHubBlueskydev.toRSS

12Compare

vx vs Turborepo

Coming from Turborepo? One command turns your turbo.json into vx config.

Terminal window
bunx @vzn/vx init --native
Read

Here is the same build task, before and after:

turbo.json

"build": {
"dependsOn": ["^build"],
"inputs": [
"src/**",
"vite.config.ts"
],
"outputs": ["dist/**"]
}

packages/web/vx.config.ts

build: {
exec: { command: 'vite build' },
dependsOn: ['^build'],
inputs: {
files: [
'src/**',
'vite.config.ts',
'package.json',
],
},
outputs: { files: ['dist/**'] },
cache: true,
},

Look at exec.command: vx runs vite build itself. No package.json script sits in between.

Why package.json in inputs? Turborepo always hashes a package’s own package.json, so init adds it. An edit to its exports still re-runs the build.

Both tools ran the same graph, the same commands, at the same concurrency. Shorter bars mean less waiting on the tool.

Nothing changed
vx530 ms
Turborepo1.79 s
Nothing changed, outputs restored
vx1.07 s
Turborepo2.31 s
Cold build
vx6.66 s
Turborepo12.68 s
Cold build: CPU the runner burns
vx42.65 s
Turborepo1 min 26 s
The table
Time added over the ideal run, 1,601 projects, 9,603 tasks vx Turborepo
Nothing changed 530 ms 1.79 s
Nothing changed, outputs restored 1.07 s 2.31 s
Cold build 6.66 s 12.68 s
Cold build: CPU the runner burns 42.65 s 1 min 26 s

Measured: vx 0.0.0 @ 31607fb13 on 2026-11-23, Turbo 2.11.13 on 2026-11-23, Nx 24.0.6 on 2026-11-23, Vite Task 1.7.0 on 2026-11-23; linux x64, 4 cores (AMD EPYC 7763 64-Core Processor), 16 GB.

You can now read each bar as the time the tool itself costs you on 9,603 tasks.

DetailsHow it is measured

Workload. A synthetic monorepo of 1,601 projects and 9,603 tasks in 30 dependency levels. Five core libraries are used by a quarter of the projects.

Task times. Build 300 ms, test and typecheck 150 ms, lint 75 ms, publish 30 ms. Real repos with uneven task times differ: see On real workspaces.

Config. Each tool runs its own native config. Turborepo runs with the futureFlags its Conformance score is measured on.

Those flags make Turborepo slower here, by about 0.1 to 0.2 s of a nothing-changed run. The full method is on Benchmarks.

You want Turborepo vx
A task to re-run on change Hashes every tracked file in the package Hashes the files you list in inputs.files
Clean outputs after a hit Adds the cached files; old files stay Puts back exactly the cached files
Config changes to count Static JSON Your TypeScript is evaluated, then hashed
Proof a task reads only its inputs No file sandbox Opt-in sandbox, free and local

Watch the second row when you switch: a file left in dist/ by an older build is gone after a vx hit.

Check yourself Last week's build wrote dist/old.js. Today's build no longer does. After a cache hit, is dist/old.js still there?

With Turborepo, yes: a restore adds files and never removes them. With vx, no: it wipes the declared outputs first, then puts back exactly what the cache holds.

You can now spot the four places where moving to vx changes what you write or what you get.

PatternsShare a cache your pull requests cannot poison

A pull request that can write the cache main reads can plant bytes that main later replays.

With turboCache(), a read names the branches it may see (x-artifact-read-scopes). The server’s CI OIDC trust policy decides where a write lands.

So a pull request reads main’s entries and never writes them. The security model has the full rules.

DetailsFeature by feature
Feature vx Turborepo
Config TypeScript, evaluated into the cache key JSON (turbo.json), static
Default inputs None: you declare inputs.files Every tracked file in the package
Outputs on run and restore Exactly the cached files: no stale file survives a hit Additive: stale files survive
Task sandbox Free and local, opt-in per task (Linux, macOS) Its docs describe no file sandbox
Clean-tree hashing No source reads: git index OIDs git OIDs
Daemon None None for turbo run (2.8.11 and later)
Remote cache Your own server (vxCache()), Turbo’s wire (turboCache()), Nx’s, or Bazel REAPI Vercel’s /v8/artifacts, hosted or your own
Tasks on other machines Distributed task execution over workers your CI starts None built in
Plugins Every stage of a run, 16 hooks; core applies none Its docs describe no plugin surface
Why a task missed vx why names the file, env var or upstream that moved --summarize shows hashes, not the diff
Watch mode vx watch <task> turbo watch
Prune for Docker No equivalent turbo prune
Import boundaries Tag rules on package dependencies (run.rules.dependencies); imports are a lint’s job boundaries
Terminal output Streamed blocks you can scroll, copy and pipe Terminal UI
Install One binary with Bun inside; Node optional npm and Node

Every row is held in vx vs Turborepo vs Nx, which links each row to its source. How both tools do on one suite of cases is on Conformance.

Pick Turborepo if one of these decides it for you:

  • Caching before anyone writes an input list. Turborepo hashes every tracked file by default (inputs). With vx, keeping inputs right is your job.
  • A stable release with a support policy. vx is pre-alpha: 0.0.x on npm.
  • A terminal UI and import checks. Both ship in Turborepo. vx streams plain blocks and leaves source imports to your linter.
  • turbo prune for Docker images. vx has no equivalent.
  • Go, Cargo or uv in the graph. Turborepo has experimental support. vx runs JavaScript workspaces.

You can now tell whether your workspace is better served by Turborepo, before you switch.

A Turborepo workspace moves to vx

1. Run init: it reads turbo.json

bunx @vzn/vx init --native
$ bunx @vzn/vx init --native
vx-migrate 0.0.0
from turbo.json
ran bun add -d @vzn/vx @vzn/vx-lockfile @vzn/vx-history
tasks 6 clean
files packages/ui/vx.config.ts
packages/web/vx.config.ts
.vx/workspace.ts
.vx/.gitignore
lock 2 project configs → .vx/projects.lock, .vx/dependencies.lock
note Turbo passes its builtin env (HOME, CI, PATH, VERCEL_* and the rest) to each task; vx passes the names a task lists — add the ones a task reads to exec.env.passThrough
no package has a file the outputs of build ("dist/**") match yet, so they were not checked: a vx run fails when it misses an output path or writes none of its outputs; a wildcard may match nothing beside one that matched (Turbo cached what was present) — keep only the outputs each command always writes
next vx run build --all

Read the tasks line: 6 clean. Every task mapped. Each note line names one difference to check.

2. Each package gets its own config

packages/web/vx.config.ts
import type { ProjectConfig } from '@vzn/vx/config'
export default {
tasks: {
build: {
exec: { command: 'vite build' },
dependsOn: ['^build'],
inputs: { files: ['src/**', 'vite.config.ts', 'package.json'] },
outputs: { files: ['dist/**'] },
cache: true,
},
test: {
exec: { command: 'vitest run' },
dependsOn: ['^build'],
inputs: { files: ['src/**', 'package.json'] },
outputs: { files: [] },
cache: true,
},
lint: {
exec: { command: 'oxlint' },
inputs: { files: ['src/**', 'package.json'] },
outputs: { files: [] },
cache: true,
},
},
} satisfies ProjectConfig

The script vite build became the task’s command. Your package.json scripts are never edited.

3. Run the build with vx

Terminal window
vx run build --all

Run it twice. The second run is all cache hits, as on Caching.

You can now move a Turborepo workspace to vx and run its build.

PatternsKeep your remote cache and your flags

Declare turboCache() in .vx/workspace.ts and set TURBO_TOKEN and TURBO_TEAM. On a laptop, type the token once when asked: it stays in the OS keychain.

vx stores its own entries there. Turborepo cannot read them, and vx does not read Turborepo’s.

vx run takes each Turbo flag as it is (--filter, --affected, --concurrency), rewrites it to vx’s spelling, or refuses it and names the vx way. None is dropped in silence.

DetailsWhat init cannot map

Anything turbo.json says that vx cannot becomes a TODO(vx-migrate) comment in the config, never a silent wrong value.

The note lines in init’s report name each gap. Above, it says Turborepo passes its builtin env (HOME, CI, VERCEL_*) to every task. vx passes only the names a task lists in exec.env.passThrough.

The whole mapping is on Migrate. vx is MIT, with no cloud and no account.

NextQuickstart →Set up a workspace from scratch and run its first cached build.
Turborepo, Nx and other product names are trademarks of their owners. vx is not affiliated with or endorsed by them.