Headlamp
Headlamp is a Rust-powered test UX CLI: smarter test selection, cleaner output, and a unified workflow across jest, Rust tests (headlamp runner), 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=headlamp|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
Peer dependencies (system requirements)
Headlamp is a wrapper around your project’s runners. It does not vendor the runners themselves, so you need the runner executables available in your environment for the features you’re using.
Common (all runners)
- Git: required for
--changed=...modes (e.g.--changed=branch).
Jest runner (--runner=jest)
- Node.js: required.
- Jest installed in the repo: Headlamp expects Jest to be runnable from your project (typically
./node_modules/.bin/jest). - Coverage (
--coverage): requires Jest coverage support (standard Jest--coverage+ reporters). Headlamp formats/prints coverage from generated reports.
Pytest runner (--runner=pytest)
- Python 3: required.
- pytest: must be on
PATH(pytest/pytest.exe). - Coverage (
--coverage): requirespytest-cov(Headlamp enables coverage and passes--covflags; branch coverage uses--cov-branch).
Headlamp (native Rust runner) (--runner=headlamp)
- Rust toolchain:
cargo+rustc. - Per-test timings: requires a preinstalled nightly toolchain (Headlamp enables libtest JSON +
--report-timeonly when nightly is available).- Install via:
rustup toolchain install nightly
- Install via:
Cargo test runner (--runner=cargo-test)
- Rust toolchain:
cargo+rustc. - Coverage (
--coverage): collected via LLVM tools fromrustup(nocargo-llvm-covdependency).- Install via:
rustup component add llvm-tools-preview
- Install via:
Cargo nextest runner (--runner=cargo-nextest)
- Rust toolchain:
cargo+rustc. - nextest: requires
cargo-nextest(cargo install cargo-nextest). - Coverage (
--coverage): collected via LLVM tools fromrustup(nocargo-llvm-covdependency).- Install via:
rustup component add llvm-tools-preview
- Install via:
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
Requirements:
--runner=cargo-nextest: requirescargo-nextestto be installed.- Install via:
cargo install cargo-nextest(or your preferred installer)
- Install via:
CLI
Run headlamp --help to see the up-to-date flags list.
Highlights:
- runners:
--runner=headlamp|jest|pytest|cargo-nextest|cargo-test - changed selection:
--changed=all|staged|unstaged|branch|lastCommit|lastReleaselastReleaseselects changes since the previous stable SemVer release tag
- coverage:
--coverageplus--coverage-ui,--coverage-detail, thresholds, etc. - artifacts (default: none):
--keep-artifactsto 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.tsheadlamp.config.jsheadlamp.config.mjsheadlamp.config.cjsheadlamp.config.jsonheadlamp.config.json5headlamp.config.jsoncheadlamp.config.yamlheadlamp.config.yml.headlamprcplus.headlamprc.*variants (.json,.json5,.jsonc,.yaml,.yml,.js,.cjs,.mjs,.ts)
Headlamp also supports embedded TOML config (lower precedence than explicit config files):
pyproject.tomlunder[tool.headlamp]Cargo.tomlunder[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.
Metadata
Release files for headlamp 0.1.60
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| headlamp-0.1.60.tar.gz | 6.5 kB | With provenance | Details |
Built distributions (wheels)
| File | Reset | |||
|---|---|---|---|---|
| headlamp-0.1.60-py3-none-win_amd64.whl | Python 3 | none | Windows x86-64 | Details |
| headlamp-0.1.60-py3-none-musllinux_1_2_x86_64.whl | Python 3 | none | Linux musl 1.2+ x86-64 | Details |
| headlamp-0.1.60-py3-none-musllinux_1_2_aarch64.whl | Python 3 | none | Linux musl 1.2+ ARM64 | Details |
| headlamp-0.1.60-py3-none-manylinux_2_28_x86_64.whl | Python 3 | none | Linux glibc 2.28+ x86-64 | Details |
| headlamp-0.1.60-py3-none-manylinux_2_28_aarch64.whl | Python 3 | none | Linux glibc 2.28+ ARM64 | Details |
| headlamp-0.1.60-py3-none-macosx_11_0_arm64.whl | Python 3 | none | macOS 11.0+ ARM64 | Details |
| headlamp-0.1.60-py3-none-macosx_10_12_x86_64.whl | Python 3 | none | macOS 10.12+ x86-64 | Details |
Total release size: 17.9 MB
Release files / headlamp-0.1.60.tar.gz
| Download URL | headlamp-0.1.60.tar.gz |
|---|---|
| Size | 6.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
45114ad97f59800c8a14c14c74d8929905c1aba958591717af75a3e77d01bf32
|
|
BLAKE2b-256 checksum How to use checksums |
7d4224a6c35aa814c6a24eb6e843cd14ada61ff7238ac747ad692aac9b3b5b89
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jan 3, 2026.
Transparency logRelease files / headlamp-0.1.60-py3-none-win_amd64.whl
| Download URL | headlamp-0.1.60-py3-none-win_amd64.whl |
|---|---|
| Size | 2.5 MB |
| Tags | Python 3 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
9d9ef0b3cb9965b184ac51ce2b806bee5b19edab5ae4c37326704c8b4cdb99b6
|
|
BLAKE2b-256 checksum How to use checksums |
79526d734acf849bfcb3270da86c0af6d66abf05706d3d27f17f54777c6eb0ce
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jan 3, 2026.
Transparency logRelease files / headlamp-0.1.60-py3-none-musllinux_1_2_x86_64.whl
| Download URL | headlamp-0.1.60-py3-none-musllinux_1_2_x86_64.whl |
|---|---|
| Size | 2.8 MB |
| Tags | Linux musl 1.2+ x86-64 Python 3 |
|
SHA-256 checksum How to use checksums |
3fda70843931bf8a61ad51ad4452b9d714b37f5c50d760e1994bab500b3e7a37
|
|
BLAKE2b-256 checksum How to use checksums |
f15a5ffa70205eb9f9dcad42e09adc2c4b7f2fcf5645a468dd18deca2b90f4ed
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jan 3, 2026.
Transparency logRelease files / headlamp-0.1.60-py3-none-musllinux_1_2_aarch64.whl
| Download URL | headlamp-0.1.60-py3-none-musllinux_1_2_aarch64.whl |
|---|---|
| Size | 2.5 MB |
| Tags | Linux musl 1.2+ ARM64 Python 3 |
|
SHA-256 checksum How to use checksums |
f219e117127dfaac47c71f38396bb4c9b18eddac3c03eeeafd133e5ad4b5d537
|
|
BLAKE2b-256 checksum How to use checksums |
eb414f78557f722a6af130c243679c98166a51a4f04b15267d61be050e063450
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jan 3, 2026.
Transparency logRelease files / headlamp-0.1.60-py3-none-manylinux_2_28_x86_64.whl
| Download URL | headlamp-0.1.60-py3-none-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 2.7 MB |
| Tags | Linux glibc 2.28+ x86-64 Python 3 |
|
SHA-256 checksum How to use checksums |
5875d60948354bc533b32a71471abbd3114f150ff5fd8e86dc9df8773616ef43
|
|
BLAKE2b-256 checksum How to use checksums |
e2dcdf7f3833b0a06abba7469b2e3c4b5ce595a46de93700ecf336f2e0b81c2f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jan 3, 2026.
Transparency logRelease files / headlamp-0.1.60-py3-none-manylinux_2_28_aarch64.whl
| Download URL | headlamp-0.1.60-py3-none-manylinux_2_28_aarch64.whl |
|---|---|
| Size | 2.5 MB |
| Tags | Linux glibc 2.28+ ARM64 Python 3 |
|
SHA-256 checksum How to use checksums |
c156ef62790ce470a646031b0e28255f52fcd7de776e183a118cad3b25f28113
|
|
BLAKE2b-256 checksum How to use checksums |
f9539a9e649e861eae649c615cc0a226a2ba270fdd997f4b536df6832273c62c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jan 3, 2026.
Transparency logRelease files / headlamp-0.1.60-py3-none-macosx_11_0_arm64.whl
| Download URL | headlamp-0.1.60-py3-none-macosx_11_0_arm64.whl |
|---|---|
| Size | 2.3 MB |
| Tags | Python 3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
4b2968a2664765f51152bc8c7d51e5f81c0da86ea9cffde3025ebfbece1bd1d5
|
|
BLAKE2b-256 checksum How to use checksums |
806f375df6af5fb8b7da494343446f33053a0f75e5517d8699d5fa534bdf8f1b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jan 3, 2026.
Transparency logRelease files / headlamp-0.1.60-py3-none-macosx_10_12_x86_64.whl
| Download URL | headlamp-0.1.60-py3-none-macosx_10_12_x86_64.whl |
|---|---|
| Size | 2.6 MB |
| Tags | Python 3 macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
921d344afb68bb392f19d51c8c4071657aca5727a65ce8c41611ae2020f8e749
|
|
BLAKE2b-256 checksum How to use checksums |
269609e9b2fcfed83cd37e783dca2aea09e21c49d8da521db7c00ae6e97a5ee8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jan 3, 2026.
Transparency logSecurity for headlamp 0.1.60
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 8 files in this release have been uploaded with provenance metadata.
Attestation for headlamp-0.1.60.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jan 3, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.