Skip to main content

CLI for reproducing, capturing, and reporting failing test runs.

Project description

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

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

devtriage-0.1.0.tar.gz (11.8 kB view details)

Uploaded Source

Built Distribution

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

devtriage-0.1.0-py3-none-any.whl (10.5 kB view details)

Uploaded Python 3

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

Hashes for devtriage-0.1.0.tar.gz
Algorithm Hash digest
SHA256 505016bf92e9ff3c987fdd1218afa1443b1c529bb941048ca7028766727607bd
MD5 9a60ac1ebdbb0927452ed03a8a21aa1a
BLAKE2b-256 7bf26d2908473a8c602e14d16f50cd1c9f0ea623b3f76687a645030fe3b94467

See more details on using hashes here.

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

Hashes for devtriage-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ccb26f1d684e0dee42bd444a7094be12f5d38943c8f5bea9c578e34070127379
MD5 f76f01c6f0d16c270b9950d9d4446d18
BLAKE2b-256 195204aad2586a2da8d2a7ec6d12fa0a6cdecd2e7ce3534795d13c89d6d0be61

See more details on using hashes here.

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