Skip to content

hushrun and Turborepo

Updated

Turborepo runs and caches tasks across the packages of a JavaScript or TypeScript monorepo, and its remote cache shares results between machines. hushrun wraps any command, in any repository, and skips it when the same files already passed. Turborepo is more precise in a monorepo. hushrun asks less of a repository, and also promotes artifacts.

Turborepohushrun
Setupturbo.json and package.json scripts, in one package or a monoreponpx hushrun init wraps your scripts
KeyTask definition, lockfile, global dependencies, declared environment variables, flags, arguments, package configuration and tracked filesThe repository's files or a scope's, the check's name, the exact command and the directory
A one-package changeRuns affected packagesRuns every check, unless you set scopes
On a hitReplays logs and restores outputsSkips the command and restores nothing
Remote storageVercel, or a server implementing its APIhushrun's hosted service, or a server implementing its protocol
Promotion to productionNoYes

How Turborepo caches

Turborepo hashes each task from its definition, the lockfile, globalDependencies, globalEnv, flags, arguments, package configuration and tracked files. The remote cache runs on Vercel, where it's free on all plans, or on any server that implements its API.

turbo run --affected runs only what changed against the base branch. It needs enough git history: with too shallow a clone, everything counts as changed.

Test tasks cache per package. Vitest Projects, which run a whole monorepo's tests from the root, don't fit that model.

How hushrun differs

  • No package.json needed. hushrun run wraps any command, so it works in a repository that isn't JavaScript at all.
  • It compares the files. So the key doesn't depend on declaring every input of each task, and you narrow it with scopes when you want to.
  • It restores nothing. A skip means the command didn't run, which suits checks but not a build whose output the next step needs. Keep Turborepo for builds.
  • Results say who ran them, and reach coding agents' sandboxes through an agent token.
  • It goes on to deploy. Promotion deploys the artifact staging validated, by digest.

Using both

Wrap the Turborepo command, so that code that already passed runs nothing at all:

package.json
"scripts": {
  "test": "hushrun run -- turbo run test"
}

Which to choose

  • Choose Turborepo for a JavaScript monorepo where you want tasks ordered and cached, builds included.
  • Choose hushrun when you don't want to add a task runner, when your repository isn't JavaScript, or when you need to know who ran each result.
  • Use both when you want Turborepo's precision and hushrun's promotion.
Markdown