tubeless
v0.1.3
Published
Typed pipeline primitives for composable data-processing workflows.
Downloads
659
Maintainers
Readme
Tubeless
Typed, observable data pipelines you import from TypeScript or run from a Bun CLI. It is a library, not a hosted workflow engine or a Make/npm-scripts replacement.
The first public version is 0.1.0. The API is still being proven; expect
change before 1.0.
npm install tubelessAlso: pnpm add tubeless, yarn add tubeless, bun add tubeless. Library
imports are ESM-only on Node.js 22+. The tubeless CLI requires Bun 1.3.14+;
npx tubeless works anywhere with Bun installed and otherwise prints Bun
install instructions. Linux and macOS are supported; Windows is
untested. See install and runtime.
Quick start
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),
});
const rows = await ImportPipeline.runOrThrow({ lines: [" Alpha ", "", "Beta"] });
// ["alpha", "beta"]createSteps types domain options only. Runs accept built-in controls beside
them. Use runOrThrow when failure should throw, run for the structured
report, plan when nothing should execute, and toMermaid for the static
graph.
Inspect, plan, or run
bunx tubeless inspect ./pipelines/my-pipeline.ts
bunx tubeless plan ./pipelines/my-pipeline.ts --target publish --explain
bunx tubeless graph ./pipelines/my-pipeline.ts --markdown
bunx tubeless run ./pipelines/my-command.ts -- --source input.json --target publishThe CLI loads TypeScript modules with Bun. inspect, plan, and graph
accept a pipeline or a definePipelineCommand export. run executes only a
command export; application flags go after --. history lists recorded
--store runs without opening the studio. See
the CLI and the local studio.
Choose the right pattern
| You need to… | Start with | | -------------------------------------------- | ------------------------------------------------------------------------- | | Run typed steps in dependency order | Sequential pipeline | | Validate external boundary values | Validated boundaries | | Preview writes safely | Dry runs and write gates | | Skip work intentionally at runtime | Conditional step | | Continue independent work after a failure | Best-effort execution | | Reuse a pipeline inside another | Child pipeline | | Run a step on another engine | Remote steps | | Run one child pipeline for many items | Fan-out and progress | | Resume long API work safely | Retry, rate limit, and checkpoint | | Watch the live TTY reporter | Live TUI | | Watch many primitives on a road-race weekend | Peloton pipeline | | Turn a pipeline into a typed script | Pipeline CLI | | Render plans and errors consistently | Human and JSON rendering | | Test deterministic execution | Cancellation and test injection | | Export lifecycle telemetry | Structured tracing | | Persist and inspect local runs | Local observability |
The recipe index explains when to use each pattern.
Next
- Website
- Getting started
- CLI
- Local studio
- Core concepts
- Comparison
- Documentation map
- Generated API inventory
- Agent guide
Contributing
Pull requests are accepted for now; the maintainer set stays small. See CONTRIBUTING.md. Report vulnerabilities privately through SECURITY.md.
License
MIT
