TUBELESS v0.2.3

Tubeless

Typed pipelines for Node.js. Define dependencies, preview execution, and inspect step results.

$ npm install tubeless
plan workbench
    $ bunx tubeless plan ./examples/typed-import.ts --target normalize-rows --explain
    Pipeline import: plan (ok=true, dryRun=false, steps=2)  - load-rows: run (required by normalize-rows for target normalize-rows)  - Normalize Rows [normalize-rows]: run (target normalize-rows)
  
Version
0.2.3
License
MIT
Module
ESM
Node
≥22
Deps
0

Runtime

Build a pipeline with createSteps and definePipeline. Preview the selected steps with plan(), then execute with run() or runOrThrow(). The CLI uses the same pipeline definitions.

Library

ESM-only, dependency-free compiled JavaScript. Node.js 22+ on Linux and macOS.

CLI

inspect, plan, graph, run, and ui. Bun 1.3.14+. npx tubeless relaunches through Bun.

Execution

Pipelines run in your Node.js process. No separate server is required.

Define

Connect steps through their inputs and outputs. TypeScript checks the values passed between them, and Tubeless checks for missing dependencies, cycles, and duplicate IDs before execution.

import.ts library
import { createSteps, definePipeline, requireOutputs } from "tubeless";

interface ImportOptions {
  lines: readonly string[];
}

const step = createSteps<ImportOptions>();

const load = step("load", {
  run: (_inputs, context) => context.options.lines,
});

const normalize = step("normalize", {
  dependsOn: [load],
  run: ({ load: rows }) =>
    rows.map((row) => row.trim().toLowerCase()).filter(Boolean),
});

export const ImportPipeline = definePipeline({
  id: "import",
  steps: [load, normalize],
  targets: [normalize],
  finalize: requireOutputs([normalize], ({ normalize }) => normalize),
});

Plan

plan() lists the steps selected for a target without executing them. Export the dependency graph as Mermaid with toMermaid().

tubeless graph workbench

flowchart LR

optional input + failure gate build-artifact validate-artifact publish-artifact

required optional input + failure gate

View Mermaid source
flowchart LR
  step0["build-artifact"]
  step1["validate-artifact"]
  step2["publish-artifact"]

  step0 --> step1
  step0 --> step2
  step1 -. optional input + failure gate .-> step2

Run

run() returns step results, failures, and timings. The terminal reporter displays progress during execution. Run history can be stored in SQLite or exported as NDJSON.

live-tui workbench
$ bunx tubeless run ./live-tui.ts
Discover Sources catalogs 4/4
Fetch Records sources 4/4
Transform Rows rows ready
Publish Artifacts files 3/3

Studio

Open recorded runs in your browser to inspect step timelines, logs, errors, and child pipelines. Register commands to preview and launch new runs.

tubeless ui studio
Local studio listing completed import and publish runs, with the import step timeline and a nested normalize run selected.

Documentation