Docs

The whole test stack baked into one binary — mock, fixtures, load, logs. Start here.

Welcome to the Crust documentation. Crust is the whole test stack baked into one Bun binary — a spec-driven mock server, fixture suites generated from your OpenAPI spec, load gates CI can fail on, and log tooling. Bash commands, TypeScript lambdas, HTTP verbs, globs, and parallel workers all compose under one | / .pipe() abstraction, driven from a REPL, a crust -c one-liner, or a .crust script.

Install

curl -fsSL https://raw.githubusercontent.com/lariocpt/crust/main/install.sh | bash

The installer puts the crust binary on your PATH and copies a starter config to ~/.config/crust/init.ts.

Where to next

  • Intro — why bash and TypeScript live on the same pipeline, and what that actually buys you.
  • Quickstart — every command crust ships, with the shell-line form and the TS-API form side by side.
  • npm packages — turn any globally-installed npm package into a pipeline stage, plus crust.fn for the harder cases.
  • DB drivers — point the sql builtin at Postgres, MySQL, SQLite, or anything you can wire up via init.ts.
  • Recipes — workflows you can lift directly: stress runs, OpenAPI mocks, smoke tests, generated negative fixtures, log mining.

At a glance

Sourcesshell commands, range(a,b), globs (**/*.ts), GET <url>, read <glob> (whole-file items), {…} JSON literals, tail, procs({…})
Transformsshell stages, (x => …) TS lambdas, filter (x => …) truthy-keeps, GET / POST / PUT / PATCH / DELETE with -H headers and $VAR env expansion, parallel N
Assertionsexpect NNN (status), assert (x => expr) (predicate; empty upstream fails), stats / stats --every N
Sinksstdout (default), write(path), dest(dir), stats()
Builtinscd, export, alias, source, history, dotenv, test-fixture, test-pipes, gen-fixtures, mock-server, verify-web-links, time, exit, help
Configuration~/.config/crust/init.ts — register aliases, crust.fn(...) stages, lifecycle hooks
One-liner modecrust -c '<pipeline>' from any shell — multi-line strings are fail-fast
Script modecrust file.crust, #!/usr/bin/env crust shebang, or lines piped on stdin — comments skipped, fail-fast exit codes