One command per task; the shell is the API
exec.command is a string. It runs under sh -c with the project's and the workspace root's node_modules/.bin on PATH , in the project's directory, with the environment you declared. That is the entire execution model, and it is a constraint chosen on purpose. What it rules out JavaScript-function tasks. A task that is a function in the config file is convenient right up to the moment you want to…
vx is a task runner and build cache designed for JavaScript monorepos. Its core principle is that every task should be a single command with declared inputs and outputs. This approach eliminates the need for JavaScript-function tasks and executor plugins. Instead, vx wraps tools behind plugins with options objects, allowing tasks to be shipped and sandboxed at the OS level.
A task is essentially a command string, the declared input tree, and the declared output paths. This model enables remote execution, replaying captured output, and isolation of the environment for each task. When a task is composed of multiple steps, they should either be chained with && if they are one unit or split into separate tasks wired by dependsOn so each caches independently.
This design allows every capability in vx to be a transformation of the same triple: the command string, the declared input tree, and the declared output paths. Migration from Turborepo or Nx is simplified because vx writes the command in a way that is human-readable, just like the original command.
Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.