# OpenFlange for developers > openflange.dev is the developer hub for OpenFlange, an open standard for data-processing steps (pipes) that connect without glue code. It has a quickstart, the reference for the `openflange` command-line runner, an overview of the Go SDK, concept explanations and small examples with real commands and output. The normative specifications are on https://openflange.org (see https://openflange.org/llms.txt). Status: the openflange CLI is available in release v0.0.1 (experimental); the Go SDK is available in release v0.0.1 (experimental). Each example below states its own status. Install the CLI, release v0.0.1 (experimental; requires Go 1.27): `go install github.com/openflange/openflange-go/cmd/openflange@v0.0.1`. Latest development version: `@main` instead of `@v0.0.1`. Prebuilt binaries and a Homebrew formula are planned. Release notes: https://github.com/openflange/openflange-go/releases/tag/v0.0.1. Source, examples and tests: https://github.com/openflange/openflange-go. This index covers the English pages. The Russian pages are indexed at https://openflange.dev/ru/llms.txt. ## For AI agents - [Agent guide (Markdown)](https://openflange.dev/agents.md): one self-contained page for building an ad-hoc ETL: when OpenFlange fits and when not, install, a complete file set, the command loop with real output, error codes with fixes, the standard pipes, a decision table. Raw Markdown. - [Agent guide (HTML)](https://openflange.dev/agents/): the same guide as an HTML page. - [Full text of the documentation](https://openflange.dev/llms-full.txt): the quickstart, the concepts, the CLI reference, the standard-pipe table and the ETL guide of this site as one plain-text file. ## Start here - [Quickstart](https://openflange.dev/quickstart/): install v0.0.1, write a pipe manifest, validate it, run it, connect two pipes, test and lock. - [CLI reference](https://openflange.dev/cli/): run, validate, inspect, test, init, search, resolve, update, serve, version, completion; exit codes; output contract; what a pipe program sees. - [Go SDK](https://openflange.dev/sdk/go/): packages of the reference implementation; release v0.0.1. - [A platform for your ETL](https://openflange.dev/etl/): a complete ETL pipeline built step by step (CSV in, clean, validate, aggregate, CSV out) from seven standard pipes and one Starlark script, with the lockfile, portable tests, real commands and output; what OpenFlange is not (a scheduler, a warehouse, a connector catalogue). - [Developer questions](https://openflange.dev/faq/): Direct answers for developers: installing the openflange CLI, which languages a pipe can be written in, testing pipes, performance and batch mode, scheduling, platforms, licences and use by AI agents. ## Concepts - [Manifest — one Markdown file that is both the docs and the contract](https://openflange.dev/concepts/manifest/): fixes — Nobody can tell what a step expects or produces until it breaks. - [Ports — so a step says what it takes and gives](https://openflange.dev/concepts/ports/): fixes — Wiring two outputs and a reject stream needs a framework. Unix pipes stop at one stdin and one stdout. - [Streams — records flow through; nothing piles up](https://openflange.dev/concepts/streams/): fixes — A fast step floods a slow one, memory grows, and somewhere records quietly go missing. - [Pipelines — say what feeds what, and nothing else](https://openflange.dev/concepts/pipelines/): fixes — Your R script, SQL query and Python service cannot be plugged together without glue code. - [Permissions — a step gets only what you grant](https://openflange.dev/concepts/permissions/): fixes — You cannot safely run someone else’s step: it just gets your credentials. - [Lockfile — the same run tomorrow](https://openflange.dev/concepts/lockfiles/): fixes — Reusing a colleague’s step means copy-pasting code and hoping. - [Batch mode — let the runner hand your script a batch](https://openflange.dev/concepts/batch/): fixes — Calling an API once per record is slow and expensive, and so is any script that pays a round trip for every line. ## Examples - [Mask an email](https://openflange.dev/examples/email-masking/): How do I connect two steps? Two small pipes — lowercase, then mask — joined by one short pipeline file. Status: available in release v0.0.1 (experimental). - [Branch without running twice](https://openflange.dev/examples/email-branching/): Can two things read the same output? One lowercase step feeds two consumers. It runs once; both get every record. Status: available in release v0.0.1 (experimental). - [Use the tool you already have](https://openflange.dev/examples/r-summary/): Do I have to rewrite my script? An R script that reads stdin and writes stdout is already a valid pipe. Values 10, 20, 30 in; count, mean, median and sd out. Status: available in release v0.0.1 (experimental). - [A moving average in R](https://openflange.dev/examples/r-moving-window/): How do I compute window statistics without loading the whole stream? std:window cuts the stream into windows of three; an R script answers one window at a time. Memory is bounded by the window size. Status: available in release v0.0.1 (experimental). - [More than one output](https://openflange.dev/examples/multi-output/): What about the records that fail? Good orders go to one stream, orders that cannot be processed to another. Errors are data you route, not log lines you grep. Status: available in release v0.0.1 (experimental). - [Call a remote step](https://openflange.dev/examples/http-session/): Can a step run somewhere else? A remote pipe is four HTTP requests: open a session, POST the input, GET the output, read the status. Here openflange serve is the server and curl is the client. Status: available in release v0.0.1 (experimental). - [Call a pipe from a query](https://openflange.dev/examples/tugql-query/): Does my query language need a function for this? A query language shouldn’t grow a function for everything. Pipe the result through a step instead: the same lowercase and mask pipes, applied to rows from a TugQL query. The syntax is a draft and no released tool runs it yet. Status: in development, not runnable yet. - [Let an LLM decide, keep it honest](https://openflange.dev/examples/llm-routing/): Can I trust a model inside a pipeline? Feedback is routed to positive, negative or uncertain. “Uncertain” is an output, not a failure — and a rules-based pipe with the same ports can replace the model. The verified run uses a mock provider. Status: available in release v0.0.1 (experimental). - [Lock what you ran](https://openflange.dev/examples/lockfile/): Will it do the same thing tomorrow? A lockfile pins every reference to an exact version and an integrity hash. A locked run refuses anything that changed. Status: available in release v0.0.1 (experimental). - [Transform records with Starlark](https://openflange.dev/examples/starlark/): How do I write more than a one-liner without a subprocess? A Starlark script — a process(item, params) function — runs inside the runner, sandboxed, with no I/O. No subprocess, no permissions. Status: available in release v0.0.1 (experimental). - [An npm package that is a pipe](https://openflange.dev/examples/npm-package/): How do I ship a pipe as an npm package? Add a manifest and one line to package.json. The code stays an ordinary Node.js script that reads stdin and writes stdout. Status: available in release v0.0.1 (experimental). - [Wrap an npm package](https://openflange.dev/examples/npm-wrapper/): Can I reuse a package that knows nothing about OpenFlange? A short Node wrapper turns a library that is already on npm — here ms, which parses durations — into a pipe. The library itself is not modified. Status: available in release v0.0.1 (experimental). - [Aggregate with DuckDB SQL](https://openflange.dev/examples/duckdb-sql/): Can a SQL query be a step? A SQL aggregation as a pipe: order records in, one total per customer out. A .sql file plus a manifest is a pipe. Status: available in release v0.0.1 (experimental). - [Go multi-port validation](https://openflange.dev/examples/go-multiport/): How does a program get a second input or output? One compiled program, three output streams. stdout carries the main one; the others are POSTed to loopback endpoints the runner hands it. No SDK: standard library only. Status: available in release v0.0.1 (experimental). - [Python HTTP enrichment](https://openflange.dev/examples/python-http/): Can my existing web service be a step? A Python service adds a field to each record over the HTTP Pipe Protocol. Plain curl can drive it; a pipeline references it and must grant the network destination. Status: available in release v0.0.1 (experimental). - [A Python script in batch mode](https://openflange.dev/examples/batch-python/): How does a Python process get a batch per line instead of a record per line? The manifest declares batch: {maxItems: 500, maxWaitMs: 100}; the script reads one JSON array per line and prints one JSON array per line. Standard library only. Status: available in release v0.0.1 (experimental). - [Vectorised R over batches](https://openflange.dev/examples/batch-r/): How do I run vectorised R over batches? R is fast on vectors and slow when it is called once per record. In batch mode each line is a JSON array that becomes a data frame, so toupper, nchar and cut run once per batch. A second pipe does the same over batch files. Status: available in release v0.0.1 (experimental). - [A Starlark pipe in batch mode](https://openflange.dev/examples/batch-starlark/): What does a pipe in batch mode look like in Starlark? The mask-email pipe declared with batch: {maxItems: 256} and written as process_batch(items, params): the runner calls it with a list instead of once per address. Status: available in release v0.0.1 (experimental). - [DuckDB over batch files](https://openflange.dev/examples/batch-file-duckdb/): Can a file-in/file-out tool be a step with no glue code? With batch file delivery a tool that reads a file and writes a file becomes a pipe: the command contains {batch.input} and {batch.output}, and the runner starts it once per batch. The manifest is the whole pipe. Status: available in release v0.0.1 (experimental). ## Recipes Task-shaped pages. Each prints every file in full, the exact commands and the recorded output of a real run (the CLI version and commit are on the page). - [Recipes](https://openflange.dev/recipes/): All recipes on one page, with what each one needs. - [CSV to cleaned NDJSON](https://openflange.dev/recipes/csv-to-ndjson/): How do I turn a messy CSV file into clean, typed NDJSON? A pipeline of four standard pipes: decode the CSV, trim and normalise every row, validate it, convert strings to numbers and booleans. Bad rows go to a second file with the reason. Parquet is not produced here; the page says what is. - [Join a database query with a CSV](https://openflange.dev/recipes/join-database-csv/): How do I join the result of a SQL query with rows from a CSV file? The CSV is streamed row by row; a small Python pipe runs the SQL query once against a SQLite database and adds the matching row to every record. Orders without a customer go to a second output. Run with SQLite because DuckDB is not installed where these pages are verified. - [Deduplicate and validate records](https://openflange.dev/recipes/deduplicate-validate/): How do I remove duplicate records and reject the invalid ones? Three standard pipes: normalise the key, keep the first record per key with std:distinct, route every record by a JSON Schema with std:validate-schema. Invalid records come out on their own output with the reasons. - [Call an API for every row, in batches](https://openflange.dev/recipes/api-per-row-batch/): How do I call an API for every row without making one request per row? A Python pipe in batch mode: the runner hands it up to 100 records at a time and it makes one HTTP request per batch. The API here is a local stand-in script, so the recipe runs offline; eight rows cost one request, or three with a batch size of three. - [Summarise rows with an LLM](https://openflange.dev/recipes/summarise-with-llm/): How do I summarise rows of text with an LLM in a pipeline? A model call is a pipe like any other: records in, text out, permissions, tests. The transcript on this page uses the deterministic mock provider from the openflange-go repository: no network, no key, no cost. The real-provider variant is quoted and marked as not run. - [Moving averages and windows](https://openflange.dev/recipes/moving-average/): How do I compute a moving average over a stream of records? std:window groups the readings of each sensor into sliding windows of three records, and a short Starlark pipe turns every window into its mean. Runs inside the runner with no extra runtime; the R version is linked. - [Mask personal data before export](https://openflange.dev/recipes/mask-personal-data/): How do I mask e-mail addresses before I export or share data? Read a customers CSV and export only the addresses, lower-cased and with the middle of the name masked. Uses the lowercase and mask-email pipes of the openflange-go repository unchanged. Values that are not addresses are routed to a second output, never masked and never dropped. ## Standard pipes One page per pipe of the standard library: ports, parameters, use cases and a tested example. Machine-readable list: https://openflange.dev/std/index.json - [Catalogue of standard pipes](https://openflange.dev/std/): Most pipelines need the same ten steps. They are already written. - [std:map](https://openflange.dev/std/map/): Emits the value of a Starlark expression for every item. - [std:select](https://openflange.dev/std/select/): Keeps only the listed members of each record. - [std:rename](https://openflange.dev/std/rename/): Renames members of each record. - [std:cast](https://openflange.dev/std/cast/): Converts members of each record to a JSON type, exactly or not at all. - [std:filter](https://openflange.dev/std/filter/): Keeps the items for which a Starlark expression is truthy. - [std:limit](https://openflange.dev/std/limit/): Emits at most the first count items. - [std:skip](https://openflange.dev/std/skip/): Discards the first count items. - [std:distinct](https://openflange.dev/std/distinct/): Keeps the first item for every distinct key; bounded by maxKeys. - [std:split](https://openflange.dev/std/split/): Routes each item to matched or unmatched by a boolean expression. - [std:partition](https://openflange.dev/std/partition/): Routes items to one of up to eight outputs by key. - [std:merge](https://openflange.dev/std/merge/): Merges several streams into one, interleaved or concatenated. - [std:batch](https://openflange.dev/std/batch/): Groups consecutive items into JSON arrays of size items. - [std:unbatch](https://openflange.dev/std/unbatch/): Flattens array items into their elements. - [std:window](https://openflange.dev/std/window/): Record-count tumbling, sliding and partitioned windows. - [std:window-processing-time](https://openflange.dev/std/window-processing-time/): Draft. Groups items by arrival time. Non-deterministic. - [std:json-parse](https://openflange.dev/std/json-parse/): Parses NDJSON text into items. - [std:json-format](https://openflange.dev/std/json-format/): Serialises items as NDJSON text. - [std:csv-decode](https://openflange.dev/std/csv-decode/): Parses CSV text into records of strings. - [std:csv-encode](https://openflange.dev/std/csv-encode/): Serialises records as CSV text. - [std:ndjson-to-arrow](https://openflange.dev/std/ndjson-to-arrow/): Converts records to Arrow record batches, refusing lossy values. - [std:arrow-to-ndjson](https://openflange.dev/std/arrow-to-ndjson/): Converts Arrow record batches to records, refusing lossy values. - [std:validate-schema](https://openflange.dev/std/validate-schema/): Routes items by validity against a JSON Schema. - [std:stdin](https://openflange.dev/std/stdin/): Source: the runner's standard input as NDJSON. - [std:stdout](https://openflange.dev/std/stdout/): Sink: the runner's standard output as NDJSON. - [std:file-source](https://openflange.dev/std/file-source/): Source: an NDJSON file. Needs a filesystem.read grant covering path. - [std:file-sink](https://openflange.dev/std/file-sink/): Sink: an NDJSON file. Needs a filesystem.write grant covering path. - [std:http-source](https://openflange.dev/std/http-source/): Source: NDJSON fetched with one HTTP GET. Needs a network grant for the URL's host:port. - [std:discard](https://openflange.dev/std/discard/): Sink: consumes and discards its input. ## Specifications (normative, English, Markdown on openflange.org) - [Pipe specification v0.1](https://openflange.org/pipe/v0.1.md): `openflange.org/pipe/v0.1` - [Pipeline specification v0.1](https://openflange.org/pipeline/v0.1.md): `openflange.org/pipeline/v0.1` - [CLI protocol v0.1](https://openflange.org/cli/v0.1.md): `openflange.org/cli/v0.1` - [HTTP Pipe Protocol v0.1](https://openflange.org/http/v0.1.md): `openflange.org/http/v0.1` - [Lockfile v0.1](https://openflange.org/lock/v0.1.md): `openflange.org/lock/v0.1` - [Registry format v0.1](https://openflange.org/registry/v0.1.md): `openflange.org/registry/v0.1` - [Standard library v0.1](https://openflange.org/std/v0.1.md): `openflange.org/std/v0.1` - [Portable tests v0.1](https://openflange.org/test/v0.1.md): `openflange.org/test/v0.1` ## Optional - [Playground](https://openflange.dev/playground/): planned; does not exist yet. - [Index of the specifications as Markdown](https://openflange.org/llms.txt)