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 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.4.0.tar.gz (100.0 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.4.0-py3-none-any.whl (112.8 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for bitrab-0.4.0.tar.gz
Algorithm Hash digest
SHA256 38fb1407a81a9c930c52a88b7a12188eab59a2815034796ccffc49c3477af509
MD5 c52b1e531824a3ac5878b255ff73cfe3
BLAKE2b-256 0ceb401bb9b4a2d4ca63d57572f8c092210d02bc1962631542c51d916040a7de

See more details on using hashes here.

Provenance

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

Publisher: publish_to_pypi.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.4.0-py3-none-any.whl.

File metadata

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

File hashes

Hashes for bitrab-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 beefd4eca448312e98f01c6c1c3604661d2ca0f00d189872e5411a564c2c429c
MD5 6fdaa767cf3850b413f69f2c6643c6aa
BLAKE2b-256 557e0033ddaa81f671bafa5aba8b6aa706cffb9e7ec253651e67331f04479272

See more details on using hashes here.

Provenance

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

Publisher: publish_to_pypi.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