build & release daemon

Describe the build.
Drive it from MCP.

bldr is a generic, config-driven, multi-project build and release daemon. Stages live in a bldr.toml; capabilities are plugins; builds run as cancellable async tasks an AI assistant or the CLI can drive over the Model Context Protocol.

View the source$ bldr --project ./bldr.toml
git_commit->git_push->build_web->artifact_publish->demo_deploy

What it does

Config-driven stages

Describe a project's build as named stages in a bldr.toml: each stage is a shell command with a timeout and an interruptible flag. Flutter, npm, cargo, make: all the same to the engine.

Capability plugins

The stateful parts (serving artifacts, web output, headless screenshots, demo deploys) are plugins a project opts into. Stages stay config; capabilities stay code.

Multi-project daemondynamic

One daemon manages many projects, routed by name over a single MCP endpoint. Projects are added and removed at runtime: add_project, remove_project.

Git worktrees

Spin up a worktree as its own build context with ephemeral ports, build a feature branch, and tear it down: create_worktree, build_worktree, remove_worktree.

Screenshot + pixel diff

A headless browser captures a running web build and diffs it against a named baseline, so visual regressions surface before they ship.

Async, non-blocking

Everything is asyncio. Subprocesses stream, builds are cancellable tasks with smart interruption, and one project's build never blocks another's status.

Config plus plugins

# bldr.toml
[project]
name = "kairos"

[flows]
release = ["git_commit", "build_web", "artifact_publish"]

[stages.build_web]
cmd = "flutter build web --wasm"
interruptible = true

# a project opts into capabilities
[plugins.artifact_http]
dir = "build/app/outputs"
[plugins.screenshot]
viewport = [412, 915]

A stage is the generic 90 percent: run this command, stream its output, allow it to be cancelled. A flow is an ordered list of stages with smart interruption: non-interruptible stages queue a new request, interruptible ones cancel and restart.

A capability plugin is the stateful 10 percent: an HTTP artifact server, web serving, screenshot and pixel diff, or a demo deploy to a Pages repo. A project that does not declare a plugin never loads it, and never exposes its tools.

State persists to project-scoped SQLite in an XDG data dir, so a killed daemon recovers cleanly and reports interrupted builds as interrupted.

An AI-driven release

  1. The assistant writes a fix and calls request_build("kairos", "release").
  2. bldr commits, builds, publishes the artifact over HTTP, and records the run.
  3. It calls get_status("kairos") to confirm the flow reached DONE.
  4. It calls screenshot_build and compare_screenshot to catch a visual regression before shipping.

No terminal interaction required on the human side. This site is itself a static build published to GitLab Pages.