Skip to main content

Run GitLab CI pipelines locally

Project description

Bitrab 🐰

Bitrab runs your .gitlab-ci.yml on a plain machine so you can find problems before you push, wait, and repeat.

It is built for the expensive part of CI: feedback latency and duplicated setup. Instead of burning build minutes on every small YAML tweak, you can validate and run the same pipeline definition locally, then reuse that same definition inside CI when it makes sense.

Why you might want to use it

  • Run GitLab-style pipelines locally and catch failures before pushing.
  • Shorten the edit-test-debug loop for CI changes.
  • Reuse .gitlab-ci.yml outside GitLab on any Python-capable host.
  • Run multiple jobs in parallel inside one host or container instead of paying full per-job startup overhead every time.
  • Keep one build script closer to reality instead of maintaining separate local and CI scripts.

The theme is simple: save developer time, save CI minutes, and stop paying for "push, wait, discover typo, push again".

Where the savings come from

GitLab CI is great at orchestrating remote jobs, but remote feedback is naturally slower:

  • every iteration costs a push or MR update
  • every job pays queue and startup overhead
  • every "just checking if the YAML works" run consumes minutes
  • local and remote scripts can drift when they are maintained separately

Bitrab helps by moving more of that loop earlier:

  • validate and dry-run the pipeline locally
  • execute jobs directly on your workstation when container isolation is unnecessary
  • use the same pipeline file in CI with bitrab run --no-tui --parallel N to fan jobs out inside one container
  • optionally keep one source of truth for your build steps

Quick start

pipx install bitrab
pipx install 'bitrab[fast]'
bitrab validate
bitrab run --no-tui --parallel 1

For this repo's own dogfooding flow:

make quality-gate
just quality-gate
uv run bitrab -c .bitrab-ci.yml run --no-tui --parallel 4 --parallel-backend thread --no-worktrees

Usage

bitrab run --no-tui --parallel 4

For real runs in a Git checkout, parallel jobs use per-job git worktrees by default when they can, so sibling jobs do not fight over the same files. If you want changes to land in your real working tree instead, serialize the run:

bitrab run --no-tui --serial

--serial forces one job at a time in the project root and disables worktrees, which is the safe choice for formatters, autofixers, and other intentional mutations.

If repo-local .bitrab\worktrees interferes with your tools, set [tool.bitrab].worktree_root in pyproject.toml, for example ~/.bitrab/worktrees/bitrab.

What Bitrab is

Bitrab is a local runner for a practical subset of GitLab CI. It executes jobs as native shell processes, supports stage execution, DAG needs:, job filtering, retries, local and remote includes, artifacts, watch mode, graph output, and optional mutation warnings.

What Bitrab is not

Bitrab is not a drop-in replacement for GitLab Runner.

  • It does not provide container isolation.
  • image: and services: are not executed locally.
  • Some GitLab features are ignored, partially supported, or intentionally blocked.
  • GitLab-specific server features still need GitLab.

The docs call these differences out explicitly instead of pretending full compatibility.

Docs

GITLAB is a trademark of GitLab Inc. Bitrab is not affiliated with, endorsed by, or approved by GitLab Inc.

Project Links

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bitrab-0.5.0.tar.gz (134.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

bitrab-0.5.0-py3-none-any.whl (152.7 kB view details)

Uploaded Python 3

File details

Details for the file bitrab-0.5.0.tar.gz.

File metadata

  • Download URL: bitrab-0.5.0.tar.gz
  • Upload date:
  • Size: 134.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for bitrab-0.5.0.tar.gz
Algorithm Hash digest
SHA256 0ab0a8cd9efd6d86add2ad93d680885347e59962ee746d12c4742d8215f5971c
MD5 fd2bbf0790e3af695129241bd89a9a4f
BLAKE2b-256 001c39d6f0018dcaa3b4cfee65fdb4e2ac244101d98e58075b9cfb2e9f8e191f

See more details on using hashes here.

Provenance

The following attestation bundles were made for bitrab-0.5.0.tar.gz:

Publisher: release.yml on matthewdeanmartin/bitrab

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file bitrab-0.5.0-py3-none-any.whl.

File metadata

  • Download URL: bitrab-0.5.0-py3-none-any.whl
  • Upload date:
  • Size: 152.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for bitrab-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 99d6e1e1827c6a36e86bf3193112fa5a118045211f3ae842b1eb082a0353c08d
MD5 a48c92689173f9665682aa0b0554b0a1
BLAKE2b-256 9a673659344a40fc211ea8ce8dfdd1066eee9e3bd680983ae4604589bec9b57e

See more details on using hashes here.

Provenance

The following attestation bundles were made for bitrab-0.5.0-py3-none-any.whl:

Publisher: release.yml on matthewdeanmartin/bitrab

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page