On this page
Bellows
Migration
This guide describes how an existing GitHub Actions repository adopts Bellows.
Expected Starting Point
.github/workflows/ci.yml
.pre-commit-config.yamlThe repository may use GitHub-hosted runners:
runs-on: ubuntu-latestor Blacksmith runners:
runs-on: blacksmith-4vcpu-ubuntu-2204Step 1: Install Dependencies
Required:
Docker or a Docker-compatible local runtime.
act.pre-commitif hook integration is desired.
Use bellows doctor after initialization to confirm Docker and act are
available.
Step 2: Initialize
Preview a migration plan from existing workflows:
bellows migrate github-actionsMachine-readable output is available for agents and scripts:
bellows migrate github-actions --format jsonbellows initPreview the generated config without writing files:
bellows init --dry-runExpected effects:
discover
.github/workflows/*.yml;create
.bellows.yml;detect runner labels;
add local mappings for common GitHub and Blacksmith labels;
add a
pre-commithook when--pre-commitis passed.
To initialize with pre-push integration:
bellows init --pre-commitStep 3: Inspect
bellows doctorThe command reports:
discovered workflows;
default workflows;
runner labels and mappings;
unsupported features;
jobs recommended for local skipping;
missing secrets;
missing local dependencies.
Apply safe config fixes:
bellows doctor --fixdoctor --fix patches safe values into .bellows.yml while preserving
hand-authored comments and existing key order where possible.
Use JSON output for agents or migration scripts:
bellows doctor --format json
bellows explain --format json
bellows compat --format jsonStep 4: Run Locally
bellows runList the resolved local plan before invoking Docker:
bellows run --listSpecific workflow:
bellows run --workflow ci.ymlSpecific job:
bellows run --workflow ci.yml --job testPre-push hook mode:
bellows run --precommitStep 5: Enable Pre-Push
Bellows can write the generated hook entry:
bellows hooks install --stage pre-push
pre-commit install --hook-type pre-pushGenerated .pre-commit-config.yaml entry:
repos:
- repo: local
hooks:
- id: bellows
name: Run GitHub Actions locally with Bellows
entry: bellows run --precommit
language: system
pass_filenames: false
stages: [pre-push]Install:
pre-commit install --hook-type pre-pushRemove a generated Bellows-only hook file:
bellows hooks uninstallMigration Principles
Do not require workflow rewrites for common CI workflows.
Prefer
.bellows.ymlmappings over editing.github/workflows/*.yml.Keep cloud CI enabled as the final authority.
Skip deploy jobs locally unless the repo has an explicit local deployment simulation.
Pass only explicitly allowed secrets.
Common Adjustments
Skip Deployment
skip:
jobs:
- deployAdd a Runner Mapping
runner:
map:
custom-ubuntu-runner: ghcr.io/smeltery/kiln:ubuntu-22.04Allow a Secret
secrets:
mode: env
allow:
- NPM_TOKENThen run:
NPM_TOKEN=... bellows runCloud CI Cost Reduction
Bellows reduces wasted cloud minutes by catching failures before push. It does not skip required cloud CI status checks in v1.
Recommended workflow:
Bellows runs locally at
pre-push.Developers fix failures before pushing.
GitHub Actions or Blacksmith still runs on pull request.
Cache Cleanup
Local runs are fastest when language package caches and Docker layers are reused. Prefer existing setup actions where they are already in the workflow, but expect local behavior to differ from GitHub-hosted cache services.
Recommended project-level cache choices:
Go: keep
GOMODCACHEandGOCACHEon the host or mounted by the local runner image.Node: use lockfiles and package-manager caches for npm, pnpm, yarn, or bun.
Rust: keep Cargo registry and target directories reusable between local runs.
Docker: use BuildKit layer cache and prune it intentionally when it grows.
Prune Docker builder cache used during local workflow runs:
bellows cache prune