CLI for reproducing, capturing, and reporting failing test runs.
Project description
Devtriage
Devtriage is a lightweight CLI that turns a failing command into a reproducible bug report. It captures stdout/stderr, environment data, git context, and produces shareable snapshots or issue templates so teammates can reproduce failures quickly.
Features
run: execute any command and capture stdout/stderr plus exit metadata.snapshot: record environment info (OS, Python, pip freeze, git status, sanitized env vars) and bundle it together with command output in a zip archive.issue: runsnapshot, emit anISSUE.md, and optionally auto-open a GitHub issue with--gh(uses the GitHub CLI).focus: auto-detect pytest/nose/jest/mocha (or force with--runner) and only run changed tests or-k/pattern filters.- Safety-first: sensitive env values (
KEY,SECRET,TOKEN, etc.) are redacted before writingenv.json. - Visual proof: screenshot of the CLI flow.
Devtriage/
├── src/devtriage
│ ├── __init__.py
│ ├── cli.py # argparse + entrypoint
│ ├── capture.py # run/snapshot/issue logic
│ └── runners.py # focus-mode heuristics
├── tests/ # pytest suite for runner detection
├── README.md
└── pyproject.toml
Installation
- Stable release:
pip install devtriage - From source: clone and run
pip install -e .
Either path installs the devtriage console script (or run python -m devtriage). Python 3.8+ is required.
Usage
Capture a failing test
devtriage run --cmd "pytest tests/test_widget.py::test_happy_path -q" --out ./triage/widget_fail
The target directory receives stdout.txt, stderr.txt, and meta.json describing the run.
Snapshot & share
devtriage snapshot --cmd "pytest tests/test_widget.py::test_happy_path -q" --out ./triage/widget_fail
This writes env.json plus a timestamped devtriage_snapshot_*.zip with everything you need for a bug report.
Generate an Issue
devtriage issue --cmd "pytest tests/test_widget.py::test_happy_path -q" --title "Widget test regression" --out ./triage/widget_fail
ISSUE.md summarizes the failure, environment, and includes the snapshot path; paste it into GitHub/GitLab.
Focused test runs
- Auto-detect:
devtriage focus --auto - Force a runner:
devtriage focus --runner jest -k "critical" - Legacy flag:
devtriage focus --pytest
devtriage inspects git diff --name-only HEAD to find relevant tests for Python and JavaScript ecosystems. When no changed tests exist, pass -k/--runner to run the full suite with filters.
Visual proof
Contributing
- Fork and clone the repo.
- Create a virtual environment and install with
pip install -e .[dev]. - Run
pytestto execute automated checks (including runner detection + sanitization). - Run
devtriage --helpto validate the CLI locally. - Open pull requests with a clear description plus tests/recordings when relevant.
Releasing
- Ensure
pyproject.tomlandsrc/devtriage/__init__.pyshare the same version (currently 0.1.0) and commit your changes. - Run
pytestlocally and confirm CI is green. - Build artifacts with
python -m pip install --upgrade build twinefollowed bypython -m build. - Upload to TestPyPI or PyPI via
python -m twine upload dist/*. - Tag the release (
git tag v<version>; git push origin v<version>) and create a GitHub release in DevMubarak1/Devtriage.
License
MIT © 2025 devtriage contributors
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file devtriage-0.1.0.tar.gz.
File metadata
- Download URL: devtriage-0.1.0.tar.gz
- Upload date:
- Size: 11.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
505016bf92e9ff3c987fdd1218afa1443b1c529bb941048ca7028766727607bd
|
|
| MD5 |
9a60ac1ebdbb0927452ed03a8a21aa1a
|
|
| BLAKE2b-256 |
7bf26d2908473a8c602e14d16f50cd1c9f0ea623b3f76687a645030fe3b94467
|
File details
Details for the file devtriage-0.1.0-py3-none-any.whl.
File metadata
- Download URL: devtriage-0.1.0-py3-none-any.whl
- Upload date:
- Size: 10.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ccb26f1d684e0dee42bd444a7094be12f5d38943c8f5bea9c578e34070127379
|
|
| MD5 |
f76f01c6f0d16c270b9950d9d4446d18
|
|
| BLAKE2b-256 |
195204aad2586a2da8d2a7ec6d12fa0a6cdecd2e7ce3534795d13c89d6d0be61
|