TUBELESS v0.2.2

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.2
License
MIT
Module
ESM
Node
≥22
Deps
0

Runtime

Import createSteps and definePipeline. Invalid graphs fail at definition. plan() previews selection. run / runOrThrow execute. The CLI is a Bun workbench around the same exports.

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

Steps declare typed inputs and outputs. Pipeline definitions reject missing dependencies, cycles, and duplicate IDs. Plans, reports, hooks, and CLI selection use the declared step IDs.

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

The local studio displays recorded runs, step timelines, and nested pipelines from SQLite or NDJSON history.

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

Documentation