senro

senro (線路, “railway track”) defines pipelines in Go, executes them, and exposes a live attach protocol so a second process can watch and debug a run in progress. Reach for it when you want a pipeline as real, typed, testable Go code instead of YAML.

It is a pipeline engine first, and nothing in the API is CI-specific. CI/CD is the most familiar thing to build on it, but a data pipeline, a batch job, an infrastructure rollout or a release script is built the same way: steps with dependencies, retries and failure handlers, one event stream you can attach to.

The railway metaphor lives in prose and error messages, never in identifiers. A step is a station, a workflow is a line, the resolved execution graph is a timetable; the Go API says Pipeline, Workflow, Step and Plan.

Start

PageWhat it gives you
Installgo get, requirements, platform support
QuickstartA pipeline, a run, and a terminal attached to it
ConceptsPipeline, workflow, step, plan, event stream

Steps: the building blocks

PageWhat it covers
StepsWhat a step is, exec.Command, the two step kinds
OrderingNeeds on a step, senro.Needs on a workflow
SettingsEnv, WorkDir, Timeout, ContinueOnError
RetriesRetry, RetryPolicy, the predicates, backoff
HandlersOnFailure, Always, and what a handler inherits
End statesThe ten end states, and how they propagate
ConditionsWhen, Branch, ParamIs, EnvIs
Func stepsRegisterFunc, senro.Func, senro.Ctx

Executors: where steps run

PageWhat it covers
ExecutorsThe four targets, senro.On, read-only enforcement
Containerscontainer.Image, its five properties, container.User
KubernetesA workflow on a pod: setup, behavior, refusals
SSHA workflow on a remote host: setup, behavior, refusals
Func off the coordinatorA Func step over SSH or in a container

Data: workspaces and caching

PageWhat it covers
Workspacessenro.Workspace, Mount, ScopeRun, snapshots
Persistent workspacesScopePersistent and its four rules
Scratch cacheScratchCache, Key, RestoreKeys
Caching a stepPure(), Inputs, Outputs, CacheEnv
Cache keysWhat enters a key, and cache explain
Shared cacheThe S3 and OCI tier, config, degradation
ArchivingArchiving a run, and logs fetch

Monorepos

PageWhat it covers
MonoreposThe problem, and which tool solves which part
Fan-outExpand, Template, MaxParallel, MaxNodes
Per-unit orderingPer-unit edges versus the workflow barrier
PartitioningPartition, TemplateShard, the duration history
AffectedRunning only what a change affects

Unit graphs

PageWhat it covers
Choosing a graphThe eight graphs, and which support Affected
globOne unit per directory matching a pattern
goworkGo modules and packages, via go list
cargoRust crates, from the manifests
jsworknpm, pnpm, Yarn and Bun workspace packages
mavenMaven reactor projects
gradleGradle projects, from the declarative subset
pyprojectPython distributions, and why Affected is refused
bazelBazel packages, with and without running bazel
Write your ownUnitGraph and UnitAffector

Secrets

PageWhat it covers
SecretsDeclaring and using a secret; the file-path rule
ChannelsSafe, redacted, refused; per-executor delivery

Watch and control a run

PageWhat it covers
AttachWhat attach is; one client, two sources; attach.Listen
The TUIThe terminal UI and its keys
The browser UIsenro ui
Control operationsThe eleven operations, and the refusal codes
The shellsenro shell on a live step, --tty
SecurityThe boundary, tokens, TLS, platform support

Triggers

PageWhat it covers
Running on an eventWiring WithTrigger, the matchers, the three outcomes
Run it as a serverYour binary as the webhook endpoint, verified per source
The event fileThe envelope every source is delivered through
GitHubpush, pull_request, and tags arriving as pushes
GitLabPush, tag push, merge request, and GitLab’s own action words
Bitbucketrepo:push, pullrequest:*, and the missing file lists
Giteapush, pull_request, create, and the double tag
Schedule & manualThe neutral shape, for cron and for a button
Write your owntrigger.Provider and trigger.Matcher

Notifications

PageWhat it covers
Sending a result outThe destinations, every option, delivery and retries
SlackA line in a channel, and what widening it costs
WebhookRaw events as JSON, and verifying a signature
GitHub ChecksA check run on the commit, with annotations
Write your ownnotify.Renderer and notify.Requester

Failure analyzers

PageWhat it covers
What an analyzer doesExplaining a failed step, and the approval gate
The AI analyzercontrib/genkitanalyzer, with the model of your choice
Write your ownAnalyzer, api.Failure and api.Proposal

Extend

PageWhat it covers
Extension pointsEvery extension point, one line each
A trace exporterA trace exporter as a Sink
A unit graphImplement UnitGraph / UnitAffector
A trigger sourceImplement trigger.Provider
A notifierImplement a Renderer / Requester
A failure analyzerImplement Analyzer, and the proposal gate

Reference

PageWhat it covers
CLIEvery command in one table, plus exit codes
Running and watchingsenro run, attach, shell, ui
Cache commandscache gc, cache explain, verify
Workspace commandsws ls/pull/diff, logs fetch, func check
The event streamThe event envelope, and turning it into live state
apiThe api package as a wire contract
Run options and outcomesEvery senro.Run option, and reading RunError
Reading a failed runThe run directory, file by file
Agent skillThe skill that teaches an AI agent senro