# Tubeless use cases

Bring structure to the scripts that build, train, generate, and move your data. Tubeless connects typed steps so you can preview the work and see what happened at each stage.

## CI/CD: Make every release step explicit.

Turn build, validation, and publication scripts into one pipeline. Pass artifacts between typed steps and make successful checks a prerequisite for publishing.

A workflow you could build: Build artifact → Validate → Publish.

### Check the plan before a release

Preview a target and its prerequisites without executing steps. Mark publication steps to skip during dry runs.

### Find the failed step

Record step results, timings, and logs. Export an NDJSON trace as a CI artifact to inspect after the job ends.

Your CI platform supplies runners, secrets, triggers, and approvals. Tubeless coordinates the steps inside the job.

### Start with a recipe

- [Publication with failure gates](https://github.com/chetmancini/tubeless/blob/main/examples/publish-with-gates.ts)

- [Pipeline-backed CLI](https://github.com/chetmancini/tubeless/blob/main/examples/cli-job.ts)

[Explore CLI execution](https://tubeless.io/docs/cli.md)

## ML flows: Connect the work around your model.

Keep the path from a dataset to a model artifact in one typed workflow. Use your own functions for preparation and evaluation, and call a training service when the heavy compute belongs elsewhere.

A workflow you could build: Prepare dataset → Train remotely → Evaluate → Register model.

### Reuse an evaluation workflow

Compose evaluation as a child pipeline, then fan out across datasets or model candidates with bounded concurrency and per-item progress.

### Check results at the boundary

Validate remote outputs with a schema and make model registration depend on an evaluation step that rejects unacceptable results.

Your training stack owns GPU execution and model tracking. Tubeless coordinates calls to it; a durable host can own job delivery and retries.

### Start with a recipe

- [Validated remote calls](https://github.com/chetmancini/tubeless/blob/main/examples/remote-steps.ts)

- [Fan-out with progress](https://github.com/chetmancini/tubeless/blob/main/examples/fan-out-progress.ts)

[Explore remote steps](https://tubeless.io/docs/remote-step-composition.md)

## LLM workflows: Give each model call a place in the flow.

Build a document enrichment job, a retrieval-augmented answer flow, or a batch evaluation. Keep prompts and provider calls in your own code while Tubeless tracks the steps around them.

A workflow you could build: Retrieve context → Generate → Validate output → Save result.

### Control API traffic

Use retry and rate-limit helpers around provider calls. Fan out over documents with bounded concurrency and forward cancellation to requests.

### Validate before saving

Check structured model output with a schema before downstream steps consume it. Use a custom dry-run handler for a preview that avoids a paid model call.

You choose the model SDK, retrieval system, and validation rules. Tubeless adds workflow structure without a built-in model provider or agent loop.

### Start with a recipe

- [Retry and rate-limit calls](https://github.com/chetmancini/tubeless/blob/main/examples/resumable-enrichment.ts)

- [Validate output boundaries](https://github.com/chetmancini/tubeless/blob/main/examples/validated-boundaries.ts)

[Explore child pipelines](https://tubeless.io/docs/child-pipeline-composition.md)

## Data pipelines: Follow your data from source to destination.

Read from your source, normalize records, enrich them through an API, and write the result. Each step declares the data it needs, with TypeScript checking the values passed between steps.

A workflow you could build: Extract → Normalize → Enrich → Write.

### See progress through a batch

Report completed items and inspect keyed failures in child pipelines. Use checkpointed batch helpers when your application needs to track completed work for a later run.

### Preview writes deliberately

Mark database and filesystem writes to skip during dry runs, or supply a side-effect-free preview handler. Inspect recorded logs and timings in the local Studio.

Your code owns source connectors, destination writes, and checkpoint policy. Tubeless runs in your process; use an external host when you need distributed scheduling or crash recovery.

### Start with a recipe

- [Typed import pipeline](https://github.com/chetmancini/tubeless/blob/main/examples/typed-import.ts)

- [Checkpointed enrichment](https://github.com/chetmancini/tubeless/blob/main/examples/resumable-enrichment.ts)

[Browse the recipe index](https://tubeless.io/docs/recipes.md)

## Operational workflows: Turn repeat tasks into inspectable runbooks.

Wrap a tenant setup task, a migration, or a maintenance script in a named command. Declare its inputs and prerequisites so teammates can preview the work and follow its progress.

A workflow you could build: Check inputs → Plan changes → Apply changes → Verify.

### Offer one command catalog

Register commands explicitly in a project manifest. Use the same definitions from the terminal or launch them through the local Studio.

### Make side effects visible

Provide dry-run previews for mutations and record real runs for troubleshooting. Pass cancellation into long-running work and inspect the steps that completed.

Your application owns permissions, credentials, and compensation for partial changes. Dry runs and cancellation do not roll back external side effects.

### Start with a recipe

- [Shared project catalog](https://github.com/chetmancini/tubeless/blob/main/examples/catalog/tubeless.project.ts)

- [Cancellation and testing](https://github.com/chetmancini/tubeless/blob/main/examples/cancellation-and-testing.ts)

[Explore the local Studio](https://tubeless.io/docs/studio.md)

## Start with a script you already run.

Choose its inputs, give each stage a name, and connect the outputs. Keep the domain logic in your own functions.

[Build your first pipeline](https://tubeless.io/docs/getting-started.md) or [build with your agent](https://tubeless.io/docs/agent-skills.md).