Skip to main content

Devtriage

Tests

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: run snapshot, emit an ISSUE.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 writing env.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

devtriage demo

Contributing

  1. Fork and clone the repo.
  2. Create a virtual environment and install with pip install -e .[dev].
  3. Run pytest to execute automated checks (including runner detection + sanitization).
  4. Run devtriage --help to validate the CLI locally.
  5. Open pull requests with a clear description plus tests/recordings when relevant.

Releasing

  1. Ensure pyproject.toml and src/devtriage/__init__.py share the same version (currently 0.1.0) and commit your changes.
  2. Run pytest locally and confirm CI is green.
  3. Build artifacts with python -m pip install --upgrade build twine followed by python -m build.
  4. Upload to TestPyPI or PyPI via python -m twine upload dist/*.
  5. 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

Metadata

Release files for devtriage 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for devtriage 0.1.0
File Size Uploaded Provenance Actions
devtriage-0.1.0.tar.gz 11.8 kB Without provenance Details for devtriage-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for devtriage 0.1.0
File Interpreter ABI Platform Actions
devtriage-0.1.0-py3-none-any.whl Python 3 none any Details for devtriage-0.1.0-py3-none-any.whl

Total release size: 22.3 kB

Release files / devtriage-0.1.0.tar.gz

Download URL devtriage-0.1.0.tar.gz
Size 11.8 kB
Tags Source
SHA-256 checksum
How to use checksums
505016bf92e9ff3c987fdd1218afa1443b1c529bb941048ca7028766727607bd
BLAKE2b-256 checksum
How to use checksums
7bf26d2908473a8c602e14d16f50cd1c9f0ea623b3f76687a645030fe3b94467
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.0

Release files / devtriage-0.1.0-py3-none-any.whl

Download URL devtriage-0.1.0-py3-none-any.whl
Size 10.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ccb26f1d684e0dee42bd444a7094be12f5d38943c8f5bea9c578e34070127379
BLAKE2b-256 checksum
How to use checksums
195204aad2586a2da8d2a7ec6d12fa0a6cdecd2e7ce3534795d13c89d6d0be61
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.0

Security for devtriage 0.1.0

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A 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.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page