caesium

command module
v0.0.0-...-19d8ef3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 9, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

README

Caesium logo

caesium

The zero-dependency, self-hosted DAG scheduler — one Go binary, no Postgres, no Redis, no broker. Runs where Airflow, Dagster, and Flyte can't.

CI Go Reference Go Report Card Coverage Release Docker Pulls

Caesium runs your data pipelines as declarative YAML DAGs on Docker, Podman, or Kubernetes — and ships as a single self-contained binary with an embedded database. No PostgreSQL, no Redis, no message broker, no control plane to babysit. scp one binary to a laptop, an edge node, an air-gapped cluster, or a regulated on-prem environment, and it just runs. Everything the managed orchestrators paywall — HA, RBAC, SSO, audit logging, Kubernetes execution — is free and self-hosted, forever.

You still operate it through a REST API, Prometheus metrics, and an embedded React UI (plus an optional GraphQL endpoint when API-key auth is disabled).

Why Caesium

Most orchestrators force a trade-off Caesium refuses:

  • vs. Airflow / Dagster / Flyte — they're data-aware, but they make you stand up and operate Postgres, Redis, Kafka, or a Kubernetes control plane, and they paywall the parts that matter (HA, RBAC, SSO, lineage). Caesium is one binary on embedded distributed SQLite (dqlite/Raft): HA out of the box, nothing external to run, none of it gated behind a paid tier.
  • vs. raw Kubernetes + Kueue + Argo — they schedule containers but understand nothing about your data. Caesium adds content-addressed caching, typed data contracts between steps, lineage, backfills, and a local-to-prod dev loop on top of any container image — no SDK, no language lock-in.

If you've searched for a lightweight Airflow alternative with no database, a self-hosted orchestrator that doesn't need Postgres, or an air-gapped pipeline scheduler, that's the gap Caesium fills. See docs/differentiation-strategy.md for the full positioning.

Local Developer Experience

Caesium is designed so job authors can validate, visualize, and execute pipelines locally before pushing them to a server.

Validate definitions

caesium test --path jobs/ --verbose

Use --check-images to verify local image availability.

Run executable harness scenarios

caesium test --scenario ./harness

Harness scenario files use the Harness kind and let you assert run status, task status, output fragments, schema-violation counts, cache hits, log content, Prometheus metric values, and emitted OpenLineage events against a real local execution.

Visualize a DAG

caesium job preview --path jobs/fanout-join.job.yaml

Run locally

caesium dev --once --path jobs/nightly-etl.job.yaml

caesium dev without --once watches YAML files and re-runs the DAG on save. The local runner uses an in-memory SQLite database and the same execution engine as the server path.

Quick Start

1. Write a job definition

apiVersion: v1
kind: Job
metadata:
  alias: nightly-etl
trigger:
  type: cron
  configuration:
    cron: "0 2 * * *"
    timezone: "UTC"
steps:
  - name: extract
    image: alpine:3.20
    command: ["sh", "-c", "echo extracting"]
  - name: transform
    image: alpine:3.20
    command: ["sh", "-c", "echo transforming"]
  - name: load
    image: alpine:3.20
    command: ["sh", "-c", "echo loading"]

2. Validate and preview it

caesium test --path jobs/ --verbose
caesium test --scenario ./harness
caesium job preview --path jobs/nightly-etl.job.yaml
caesium job lint --path jobs/

3. Run it locally

caesium dev --once --path jobs/nightly-etl.job.yaml

4. Start the server and apply definitions

# Start the server
just run

# Apply definitions
caesium job apply --path jobs/ --server http://localhost:8080

Features

  • Declarative YAML job definitions with validation, diffing, schema reporting, and Git sync.
  • DAG execution with fan-out, fan-in, retry controls, trigger rules, and run parameters.
  • Docker, Podman, and Kubernetes task runtimes.
  • Cron and HTTP triggers.
  • Distributed execution backed by dqlite, including mixed amd64 and arm64 clusters.
  • Embedded operator UI with live run updates, DAG inspection, backfill controls, and log streaming.
  • Smart incremental execution: cache task results and skip re-execution when inputs are unchanged.
  • OpenLineage event emission.
  • Prometheus metrics plus optional in-browser operator tools for server logs and database inspection.

Server Workflow

Prerequisites

Run the server

just run

The API and embedded UI are served from http://localhost:8080.

Using Podman

Set the following environment variables to use Podman instead of Docker:

export CAESIUM_PODMAN=true
just run

When CAESIUM_PODMAN=true, Caesium defaults to the rootless Podman socket at $XDG_RUNTIME_DIR/podman/podman.sock (or /run/user/$UID/podman/podman.sock when XDG_RUNTIME_DIR is unset) and uses the podman CLI. Override either if your setup differs:

export CAESIUM_SOCK=/custom/path/podman.sock
export CAESIUM_CONTAINER_CLI=podman
just run
Variable Default Description
CAESIUM_PODMAN false Prefix image references with localhost/ for Podman's local image store
CAESIUM_CONTAINER_CLI docker or podman when CAESIUM_PODMAN=true Container CLI used by just recipes
CAESIUM_SOCK /var/run/docker.sock or $XDG_RUNTIME_DIR/podman/podman.sock when CAESIUM_PODMAN=true Host-side container socket to mount into the container
CAESIUM_PORT 8080 Host port to expose the server on

Load example jobs

just hydrate

Trigger a run manually

curl -X POST http://localhost:8080/v1/jobs/<job-id>/run

Backfill a cron job

caesium backfill create \
  --job-id <job-id> \
  --start 2026-03-01T00:00:00Z \
  --end 2026-03-03T00:00:00Z \
  --server http://localhost:8080

Job Definitions

Jobs use the apiVersion / kind / metadata / trigger / steps schema. For full authoring guidance see docs/job-definitions.md and the generated reference in docs/job-schema-reference.md.

Useful CLI commands:

caesium job lint --path ./jobs
caesium job diff --path ./jobs
caesium job apply --path ./jobs --server http://localhost:8080
caesium job schema --doc
caesium run retry-callbacks --job-id <job-id> --run-id <run-id>

Building and Testing

Runtime images are published as multi-arch Docker manifests. docker pull caesiumcloud/caesium:<tag> resolves to the native architecture automatically.

Command Description
just build Build a release image for the host platform
CAESIUM_PLATFORM=linux/arm64 just build Cross-build for a specific architecture
just build-cross linux/arm64 Cross-build a single platform with buildx
just build-multiarch tag=<tag> Build and push a multi-arch manifest
just unit-test Run Go unit tests with race detector and coverage
just ui-test Run UI unit tests and bundle budget checks
just ui-e2e Run Playwright against the embedded UI and a real Caesium server
just integration-test Run integration tests
just helm-lint Validate the Helm chart

Supported runtime image targets:

  • linux/amd64
  • linux/arm64

Operator Tools

The embedded UI exposes a few optional power-user surfaces:

  • Server log console: enabled by CAESIUM_LOG_CONSOLE_ENABLED=true and backed by GET /v1/logs/stream, GET /v1/logs/level, and PUT /v1/logs/level.
  • Database console: enabled by CAESIUM_DATABASE_CONSOLE_ENABLED=true and backed by GET /v1/database/schema and POST /v1/database/query.
  • Worker inspection: GET /v1/nodes/:address/workers.
  • Fleet-level stats: GET /v1/stats.

API Reference

The server exposes REST on port 8080. GraphQL is available at GET /gql only when CAESIUM_AUTH_MODE=none; when API-key auth is enabled, authentication in this release applies to the REST API, /metrics, and embedded UI only, and webhook delivery continues to use per-trigger webhook signature configuration rather than bearer tokens. The UI determines whether login is required through the explicit GET /auth/status endpoint rather than probing protected resources. Native OIDC, SAML, and LDAP SSO can be enabled alongside API keys; see docs/sso-authentication.md.

Endpoint Purpose
GET /health Health check
GET /auth/status Report available API-key and SSO auth methods for the UI
GET /auth/whoami Return the current authenticated API-key or session principal
POST /auth/logout Revoke the current browser session
GET /metrics Prometheus metrics (viewer auth required when CAESIUM_AUTH_MODE=api-key)
GET /gql GraphQL endpoint when CAESIUM_AUTH_MODE=none
GET /v1/jobs List jobs
GET /v1/jobs/:id Get one job
GET /v1/jobs/:id/tasks List persisted task definitions for a job
GET /v1/jobs/:id/dag Retrieve DAG nodes and edges
POST /v1/jobs/:id/run Trigger a new run
PUT /v1/jobs/:id/pause Pause a job
PUT /v1/jobs/:id/unpause Unpause a job
GET /v1/jobs/:id/runs List runs for a job
GET /v1/jobs/:id/runs/:run_id Get one run
GET /v1/jobs/:id/runs/:run_id/logs?task_id=<task-id> Stream or retrieve task logs
POST /v1/jobs/:id/runs/:run_id/callbacks/retry Retry failed callbacks
POST /v1/jobs/:id/backfill Start a backfill
GET /v1/jobs/:id/backfills List backfills
PUT /v1/jobs/:id/backfills/:backfill_id/cancel Cancel a backfill
POST /v1/jobdefs/apply Apply one or more job definitions
GET /v1/triggers List triggers
GET /v1/atoms List atoms
GET /v1/events Subscribe to lifecycle events over SSE
GET /v1/stats Get aggregated job/run statistics
GET /v1/nodes/:address/workers Inspect worker state for one node

The log and database console endpoints are intentionally gated by environment variables because they are operator-facing debugging features rather than default public APIs.

For the auth management CLI, prefer supplying credentials through CAESIUM_API_KEY; the --api-key flag remains available but is visible in process listings.

When CAESIUM_AUTH_MODE=api-key, you must also set CAESIUM_AUTH_KEY_HASH_SECRET to a long random server-side secret. New and rotated API keys are stored as HMAC-SHA256 hashes derived from that secret. Existing legacy SHA-256 key hashes continue to validate after upgrade so you can roll the change out safely, but you should rotate those keys so the database no longer contains legacy unkeyed hashes.

Documentation

Guide Description
docs/README.md Documentation index
docs/job-definitions.md Authoring, linting, diffing, and applying manifests
docs/job-schema-reference.md Generated schema reference
docs/backfill.md Backfill API, CLI, and UI behavior
docs/parallel-execution-operations.md Distributed execution configuration and troubleshooting
docs/open_lineage.md OpenLineage transport and configuration
docs/kubernetes-deployment.md Helm-based Kubernetes deployment
docs/load-testing-history.md Distributed-execution scaling load-test history (Phase 0 → 2B)

Contributing

See CONTRIBUTING.md for setup, development workflow, and PR guidance.

License

See LICENSE for details.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
api
gql
rest/controller/agent
Package agent implements the scoped /v1/agent/* tool surface controllers: the triage bundle, read-only context passthroughs, typed-action proposals, and timeline notes.
Package agent implements the scoped /v1/agent/* tool surface controllers: the triage bundle, read-only context passthroughs, typed-action proposals, and timeline notes.
rest/controller/agentprofile
Package agentprofile is the REST surface for the AgentProfile resource (docs/design-agent-in-the-loop.md, agent-in-the-loop-remediation Stream E2).
Package agentprofile is the REST surface for the AgentProfile resource (docs/design-agent-in-the-loop.md, agent-in-the-loop-remediation Stream E2).
rest/controller/blame
Package blame implements the DAG blame endpoint:
Package blame implements the DAG blame endpoint:
rest/controller/dataset
Package dataset implements the freshness dataset REST surface.
Package dataset implements the freshness dataset REST surface.
rest/controller/incident
Package incident implements the operator-facing incident REST surface (agent-in-the-loop D1/D2): the read API (GET /v1/incidents, GET /:id) and the tier-3 approval decisions (POST /:id/approvals/:approval_id/{approve,reject}).
Package incident implements the operator-facing incident REST surface (agent-in-the-loop D1/D2): the read API (GET /v1/incidents, GET /:id) and the tier-3 approval decisions (POST /:id/approvals/:approval_id/{approve,reject}).
rest/controller/receipt
Package receipt exposes the reproducibility-receipt REST endpoints: emit a content-addressed receipt for a run, and verify a committed receipt against a run's current persisted state (drift detection).
Package receipt exposes the reproducibility-receipt REST endpoints: emit a content-addressed receipt for a run, and verify a committed receipt against a run's current persisted state (drift detection).
rest/controller/replay
Package replay implements the quarantined replay REST endpoint.
Package replay implements the quarantined replay REST endpoint.
rest/controller/reproduce
Package reproduce exposes the read-only task execution descriptor endpoint.
Package reproduce exposes the read-only task execution descriptor endpoint.
rest/controller/rundiff
Package rundiff implements the run-diff endpoint:
Package rundiff implements the run-diff endpoint:
rest/controller/topology
Package topology implements the historical DAG topology endpoints (data-plane-memory B2).
Package topology implements the historical DAG topology endpoints (data-plane-memory B2).
rest/controller/why
Package why implements the causal-explainer endpoint (data-plane-memory A3):
Package why implements the causal-explainer endpoint (data-plane-memory A3):
rest/service/agent
Package agent implements the service layer behind the scoped /v1/agent/* tool surface: the triage bundle, the read-only context passthroughs, timeline notes, and the typed-action proposal path that delegates to Stream B's action executor.
Package agent implements the service layer behind the scoped /v1/agent/* tool surface: the triage bundle, the read-only context passthroughs, timeline notes, and the typed-action proposal path that delegates to Stream B's action executor.
rest/service/agentprofile
Package agentprofile implements the AgentProfile server-side resource: the declarative image/engine/limits, secret:// model-credential references, session budgets, and default playbook a job's metadata.remediation.profile field references (docs/design-agent-in-the-loop.md "Declarative policy", Stream E2).
Package agentprofile implements the AgentProfile server-side resource: the declarative image/engine/limits, secret:// model-credential references, session budgets, and default playbook a job's metadata.remediation.profile field references (docs/design-agent-in-the-loop.md "Declarative policy", Stream E2).
rest/service/blame
Package blame wraps the internal blame query for REST controllers.
Package blame wraps the internal blame query for REST controllers.
rest/service/dataset
Package dataset exposes the freshness dataset read model and manual advance operation used by the REST controller and operator CLI.
Package dataset exposes the freshness dataset read model and manual advance operation used by the REST controller and operator CLI.
rest/service/incident
Package incident wraps read-side incident queries and the tier-3 approval decision flow for REST controllers (agent-in-the-loop D1/D2).
Package incident wraps read-side incident queries and the tier-3 approval decision flow for REST controllers (agent-in-the-loop D1/D2).
rest/service/receipt
Package receipt is the REST service wrapper around internal/receipt: it builds a reproducibility receipt for a run and verifies a committed receipt against a run's current persisted state.
Package receipt is the REST service wrapper around internal/receipt: it builds a reproducibility receipt for a run and verifies a committed receipt against a run's current persisted state.
rest/service/replay
Package replay implements the REST replay service around the internal replay constructor, including B4's scoped idempotency reservation.
Package replay implements the REST replay service around the internal replay constructor, including B4's scoped idempotency reservation.
rest/service/reproduce
Package reproduce exposes the read-only execution descriptor surface used by the reproduce client feature.
Package reproduce exposes the read-only execution descriptor surface used by the reproduce client feature.
rest/service/rundiff
Package rundiff wraps the internal run-diff query for REST controllers.
Package rundiff wraps the internal run-diff query for REST controllers.
rest/service/topology
Package topology provides the service layer for the historical DAG topology API (data-plane-memory B2).
Package topology provides the service layer for the historical DAG topology API (data-plane-memory B2).
rest/service/why
Package why wraps the internal run-level causal explainer (data-plane-memory A3) for use by the REST controller.
Package why wraps the internal run-level causal explainer (data-plane-memory A3) for use by the REST controller.
cmd
blame
Package blame implements `caesium blame <job>`: a read-side attribution view over dag_snapshot history.
Package blame implements `caesium blame <job>`: a read-side attribution view over dag_snapshot history.
dev
Package dev implements the caesium dev command for local DAG development.
Package dev implements the caesium dev command for local DAG development.
job
receipt
Package receipt is the `caesium receipt` CLI command group: produce a content-addressed, git-committable reproducibility receipt for a run.
Package receipt is the `caesium receipt` CLI command group: produce a content-addressed, git-committable reproducibility receipt for a run.
reproduce
Package reproduce implements the caesium reproduce CLI.
Package reproduce implements the caesium reproduce CLI.
run
test
Package test implements the caesium test command for dry-run DAG validation.
Package test implements the caesium test command for dry-run DAG validation.
verify
Package verify is the `caesium verify <receipt>` CLI command: re-derive a committed reproducibility receipt against a run's current persisted state and flag drift.
Package verify is the `caesium verify <receipt>` CLI command: re-derive a committed reproducibility receipt against a run's current persisted state and flag drift.
why
Package why implements `caesium why <run> --task <t>` (data-plane-memory A3): the causal explainer for why a task in a run executed, hit the cache, or re-ran.
Package why implements `caesium why <run> --task <t>` (data-plane-memory A3): the causal explainer for why a task in a run executed, hit the cache, or re-ran.
internal
blame
Package blame attributes current DAG elements to the snapshot that introduced their persisted topology descriptor.
Package blame attributes current DAG elements to the snapshot that introduced their persisted topology descriptor.
contract
Package contract derives the cross-job contract graph from authoritative job, trigger, and lineage sources.
Package contract derives the cross-job contract graph from authoritative job, trigger, and lineage sources.
dag
Package dag computes topology metrics for job DAGs.
Package dag computes topology metrics for job DAGs.
dagrender
Package dagrender renders DAG visualizations in ASCII.
Package dagrender renders DAG visualizations in ASCII.
dispatch
Package dispatch implements the Phase 2 run-owner push-dispatch machinery.
Package dispatch implements the Phase 2 run-owner push-dispatch machinery.
eventmatch
Package eventmatch provides the shared event-pattern matcher and JSONPath extraction used by both the event-trigger router (internal/trigger/event) and freshness arrival bindings (internal/freshness).
Package eventmatch provides the shared event-pattern matcher and JSONPath extraction used by both the event-trigger router (internal/trigger/event) and freshness arrival bindings (internal/freshness).
freshness
Package freshness holds the data-freshness scheduling substrate: the declared dataset registry (this file) and — in later streams — the dataset state store and the leader-gated evaluator.
Package freshness holds the data-freshness scheduling substrate: the declared dataset registry (this file) and — in later streams — the dataset state store and the leader-gated evaluator.
imagecheck
Package imagecheck verifies container image availability locally.
Package imagecheck verifies container image availability locally.
incident
Package incident implements the Phase-0 incident substrate for agent-in-the-loop remediation: a deterministic failure classifier, a leader-gated dedupe subscriber, the incident store and status machine, a free-text log scrubber, and a durable-timer supervisor.
Package incident implements the Phase-0 incident substrate for agent-in-the-loop remediation: a deterministic failure classifier, a leader-gated dedupe subscriber, the incident store and status machine, a free-text log scrubber, and a durable-timer supervisor.
job
jobdef
Package jobdef provides job definition utilities including collection and import of YAML manifests.
Package jobdef provides job definition utilities including collection and import of YAML manifests.
localrun
Package localrun executes job DAGs locally without a running server.
Package localrun executes job DAGs locally without a running server.
mcp
outputdiff
Package outputdiff compares recorded and reproduced task output maps.
Package outputdiff compares recorded and reproduced task output maps.
receipt
Package receipt builds and verifies content-addressed, git-committable reproducibility receipts for a job run.
Package receipt builds and verifies content-addressed, git-committable reproducibility receipts for a job run.
reproduce
Package reproduce reconstructs and executes historical task descriptors for the caesium reproduce CLI.
Package reproduce reconstructs and executes historical task descriptors for the caesium reproduce CLI.
run
pkg
db
env
jobdef/schemacompat
Package schemacompat compares the pragmatic JSON Schema subset Caesium uses for cross-job contract enforcement.
Package schemacompat compares the pragmatic JSON Schema subset Caesium uses for cross-job contract enforcement.
log
test
load command
Package load provides a synthetic load harness for measuring Caesium's per-shard write throughput and per-write-category distribution.
Package load provides a synthetic load harness for measuring Caesium's per-shard write throughput and per-write-category distribution.
tools
client command

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL