Build System · Go

Build 100 packages in one second.

Content-addressable cache, parallel execution, and affected package detection. kb-devkit runs only what actually changed.

Terminal
$_
Configuration

One file. Any monorepo.

Drop devkit.yaml in the repo root. kb-devkit finds all packages automatically and runs tasks in the right order, respecting inter-package dependencies.

Supports pnpm, npm, yarn workspaces. Inside KB Labs it manages the build of 125+ packages.

yaml
schemaVersion: 2

workspace:
  discovery:
    - "packages/**"

tasks:
  build:
    command: tsup
    inputs: ["src/**", "tsup.config.ts", "tsconfig*.json"]
    outputs: ["dist/**"]
    deps: ["^build"]

  lint:
    command: eslint src/
    inputs: ["src/**", "eslint.config.*"]
    outputs: []

  test:
    command: vitest run --passWithNoTests
    inputs: ["src/**", "test/**"]
    deps: ["build"]

affected:
  strategy: git
Commands

Everything is scriptable.

kb-devkit run buildRun build across all packages in dependency order. Cached results restore in ~1ms.
kb-devkit run build --affectedRun only on packages changed relative to HEAD, plus all their downstream dependents.
kb-devkit run build lint testChain multiple tasks. Each respects its own inputs, outputs, and dep ordering.
kb-devkit run build --packages @scope/pkg-a,@scope/pkg-bTarget specific packages by name. Useful for focused rebuilds during development.
kb-devkit checkValidate all packages against devkit.yaml rules: naming, tsconfig, eslint, deps, structure.
kb-devkit statsWorkspace health score (A–F), issue counts by category, coverage metrics.

All commands support --json for scripts and CI

How it works

The details that matter.

Identical inputs, zero work

SHA256 hash of all input files. Cache hit restores outputs in ~1ms. No rebuild, no rerun, no wait.

Runs in the right order

DAG across all (package × task) pairs. Packages with no interdependencies run in parallel. deps: ["^build"] means what it says.

Knows what actually changed

git diff inside each submodule, BFS through the reverse dependency graph. --affected targets only what needs to run.

Install

One binary. Any TypeScript/Node.js monorepo.

curl -fsSL https://kblabs.ru/kb-devkit/install.sh | sh
kb-devkit — KB Labs