Skip to main content

Dependency-graph based test runner in Rust that supports Rust, Python, and JavaScript.

Project description

Headlamp

Headlamp is a Rust-powered test UX CLI: smarter test selection, cleaner output, and a unified workflow across jest, cargo test, cargo nextest, and pytest.

Headlamp is useful when you want a consistent way to run tests across different projects and keep feedback fast as your repo grows. It can select tests based on what changed, surface failures in a readable format, and keep common defaults (like runner args and coverage settings) in a single config file so your team doesn’t have to remember a long list of flags.

Why Headlamp

  • One CLI, many runners: --runner=jest|cargo-nextest|cargo-test|pytest
  • Selection that scales: run what changed (--changed) and what’s related (dependency-graph driven)
  • Coverage-first UX: coverage output you can actually read
  • Fast: Rust core + caching

Installation

npm (Node.js projects)

Requirements:

  • Node >= 18

Install:

npm i -D headlamp

Run:

npx headlamp --help

Cargo (Rust projects)

Install from crates.io:

cargo install headlamp

Python (pytest projects)

Install:

pip install headlamp
headlamp --runner=pytest

Quickstart

Jest

npx headlamp --runner=jest

Forward runner args after -- (unknown args are forwarded):

npx headlamp --runner=jest -- --runInBand

Cargo nextest / cargo test

headlamp --runner=cargo-nextest
headlamp --runner=cargo-test

CLI

Run headlamp --help to see the up-to-date flags list.

Highlights:

  • runners: --runner=jest|pytest|cargo-nextest|cargo-test
  • changed selection: --changed=all|staged|unstaged|branch|lastCommit|lastRelease
    • lastRelease selects changes since the previous stable SemVer release tag
  • coverage: --coverage plus --coverage-ui, --coverage-detail, thresholds, etc.
  • artifacts (default: none): --keep-artifacts to keep runner artifacts on disk

Legacy aliases (still accepted, but not recommended):

  • --keepArtifacts
  • --coverage.detail

Configuration

Headlamp discovers config from your repo root. Supported file names:

  • headlamp.toml (highest precedence)
  • headlamp.config.ts
  • headlamp.config.js
  • headlamp.config.mjs
  • headlamp.config.cjs
  • headlamp.config.json
  • headlamp.config.json5
  • headlamp.config.jsonc
  • headlamp.config.yaml
  • headlamp.config.yml
  • .headlamprc plus .headlamprc.* variants (.json, .json5, .jsonc, .yaml, .yml, .js, .cjs, .mjs, .ts)

Headlamp also supports embedded TOML config (lower precedence than explicit config files):

  • pyproject.toml under [tool.headlamp]
  • Cargo.toml under [package.metadata.headlamp]

Example: headlamp.toml (recommended for Rust + Python)

# Run tests sequentially (useful for very heavy integration tests)
sequential = true

[coverage]
abort_on_failure = true
mode = "auto"
page_fit = true
keep_artifacts = false

[changed]
depth = 20

Example: headlamp.config.ts

Rules:

  • Must have a default export
  • Only relative imports are supported inside the config file (./ and ../)
export default {
  // Runner defaults
  jestArgs: ["--runInBand"],

  // Run once before tests (npm script name or a shell command)
  bootstrapCommand: "test:jest:bootstrap",

  // Global toggles
  ci: false,
  verbose: false,
  noCache: false,
  keepArtifacts: false,

  // Coverage defaults
  coverage: true,
  coverageUi: "both",
  coverage: {
    abortOnFailure: true,
    mode: "auto",
    pageFit: true,
  },

  // Changed selection defaults
  changed: { depth: 2 },
};

Artifacts (coverage, caches, temp files)

By default, headlamp runs artifact-free: it uses an ephemeral per-run workspace and does not leave files behind in your repo (e.g. coverage/, .coverage, .pytest_cache, target/) or OS temp.

If you need artifacts on disk (for example, to upload coverage reports in CI), opt out:

  • CLI: --keep-artifacts
  • Config: keepArtifacts: true

Contributing

Pull requests are welcome. For large changes, open an issue first to align on direction.

Support

  • Bug reports and feature requests: GitHub Issues

License

MIT — see LICENSE.

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

headlamp-0.1.58.tar.gz (5.8 kB view details)

Uploaded Source

Built Distributions

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

headlamp-0.1.58-py3-none-win_amd64.whl (2.5 MB view details)

Uploaded Python 3Windows x86-64

headlamp-0.1.58-py3-none-musllinux_1_2_x86_64.whl (2.7 MB view details)

Uploaded Python 3musllinux: musl 1.2+ x86-64

headlamp-0.1.58-py3-none-musllinux_1_2_aarch64.whl (2.4 MB view details)

Uploaded Python 3musllinux: musl 1.2+ ARM64

headlamp-0.1.58-py3-none-manylinux_2_28_x86_64.whl (2.6 MB view details)

Uploaded Python 3manylinux: glibc 2.28+ x86-64

headlamp-0.1.58-py3-none-manylinux_2_28_aarch64.whl (2.4 MB view details)

Uploaded Python 3manylinux: glibc 2.28+ ARM64

headlamp-0.1.58-py3-none-macosx_11_0_arm64.whl (2.3 MB view details)

Uploaded Python 3macOS 11.0+ ARM64

headlamp-0.1.58-py3-none-macosx_10_12_x86_64.whl (2.6 MB view details)

Uploaded Python 3macOS 10.12+ x86-64

File details

Details for the file headlamp-0.1.58.tar.gz.

File metadata

  • Download URL: headlamp-0.1.58.tar.gz
  • Upload date:
  • Size: 5.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for headlamp-0.1.58.tar.gz
Algorithm Hash digest
SHA256 da91dd3cfb14238620a0d479e1bc0cb908ee7d28d75a7b8c2642523c6ea4d5eb
MD5 d6e6b0d2e143dae504309246ff81de71
BLAKE2b-256 728497e690effc75f08353a47b7c304b57c21233a5116b5c899c9fee6984de09

See more details on using hashes here.

Provenance

The following attestation bundles were made for headlamp-0.1.58.tar.gz:

Publisher: release.yml on dbpiper/headlamp

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

File details

Details for the file headlamp-0.1.58-py3-none-win_amd64.whl.

File metadata

  • Download URL: headlamp-0.1.58-py3-none-win_amd64.whl
  • Upload date:
  • Size: 2.5 MB
  • Tags: Python 3, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for headlamp-0.1.58-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 5fc7edd08c1c78eed84f2155d3c3628993899c4d2596e41dba72cf1dff8117e0
MD5 2689488c982a85da3a994fd458466787
BLAKE2b-256 d55572cd713cc9f1f790f47f7a53e3b5a0a5e7da05b3f2ce8f346382fb6e5a9c

See more details on using hashes here.

Provenance

The following attestation bundles were made for headlamp-0.1.58-py3-none-win_amd64.whl:

Publisher: release.yml on dbpiper/headlamp

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

File details

Details for the file headlamp-0.1.58-py3-none-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for headlamp-0.1.58-py3-none-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 006630f9a4b3fb07a263b669dc95a42638abd6207f9e452e4b92a7578751e591
MD5 0e95e0710fc2d5dbc376b4ee2b28b55c
BLAKE2b-256 2bd78a5c733466de3de62e6fa0c90564f068f4ff3530b62578f6d44e31c4caba

See more details on using hashes here.

Provenance

The following attestation bundles were made for headlamp-0.1.58-py3-none-musllinux_1_2_x86_64.whl:

Publisher: release.yml on dbpiper/headlamp

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

File details

Details for the file headlamp-0.1.58-py3-none-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for headlamp-0.1.58-py3-none-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 a28a621b13e698261987072dd15fec9045ba41576d8bb4763b97388ecb05061f
MD5 8ad442437578c5cf686ef0bcece8fac7
BLAKE2b-256 07a23aa7694ef10b868533224de2300c5e33cd72b3406b9c84efe249943fc267

See more details on using hashes here.

Provenance

The following attestation bundles were made for headlamp-0.1.58-py3-none-musllinux_1_2_aarch64.whl:

Publisher: release.yml on dbpiper/headlamp

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

File details

Details for the file headlamp-0.1.58-py3-none-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for headlamp-0.1.58-py3-none-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 01079e2a1e4a188daf4429de298566f9bb158c79415dc4834821e94c172433a9
MD5 48869ad6da7ace6ef7d073e3459a38d4
BLAKE2b-256 e5b018948d40ecb134ae7c62e1efa415998454709b2adc8fafb4fd79918e108b

See more details on using hashes here.

Provenance

The following attestation bundles were made for headlamp-0.1.58-py3-none-manylinux_2_28_x86_64.whl:

Publisher: release.yml on dbpiper/headlamp

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

File details

Details for the file headlamp-0.1.58-py3-none-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for headlamp-0.1.58-py3-none-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 891164a4d6f3a2bd0a72d560883f7db4ff127ee07317eb37478350b899fa41ef
MD5 8dcb60f67f662557a1b64fab073f248e
BLAKE2b-256 67473ca402e5c0fb9f48e155050bfcb92fdb8f3b4cd914c6cfea42bb3e0fbc51

See more details on using hashes here.

Provenance

The following attestation bundles were made for headlamp-0.1.58-py3-none-manylinux_2_28_aarch64.whl:

Publisher: release.yml on dbpiper/headlamp

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

File details

Details for the file headlamp-0.1.58-py3-none-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for headlamp-0.1.58-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 92d30dfce9e2f8bfc99e25e63182c463de3386140c60035f37b0a90a253c2b7a
MD5 2f6a2f9a9bcccc5aa7ddbb1477dc4eec
BLAKE2b-256 acc053af0662886697f114b44038a3192f8edfc0bb8a300faf5bd4e75ca80269

See more details on using hashes here.

Provenance

The following attestation bundles were made for headlamp-0.1.58-py3-none-macosx_11_0_arm64.whl:

Publisher: release.yml on dbpiper/headlamp

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

File details

Details for the file headlamp-0.1.58-py3-none-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for headlamp-0.1.58-py3-none-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 8c9bc2a5f33402191a17ff141be57302c97e6e7fc1eb018827217e08ae9b392c
MD5 8498af6b5ea7d47a64083295d9e76e7d
BLAKE2b-256 3b030432ecc1f3b9da32f0ea75f20ae6c089a2c91fcfce687e8fa1bfc50c8833

See more details on using hashes here.

Provenance

The following attestation bundles were made for headlamp-0.1.58-py3-none-macosx_10_12_x86_64.whl:

Publisher: release.yml on dbpiper/headlamp

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