Skip to main content

devr

CI PyPI version

devr (pronounced dev-er, like “developer” without the “lop”) is a single command that runs your Python linting, formatting, type checks, tests, and coverage inside your project’s virtual environment.

Why devr?

  • One setup command for new repos: devr init
  • One gate command before commit/PR: devr check
  • Works from your project venv, so tooling is isolated per repo
  • Can install a local pre-commit hook that runs the same checks on staged files

Most Python projects have:

  • ruff
  • a formatter
  • mypy or pyright
  • pytest + coverage
  • pre-commit

devr runs all of them together, correctly, inside your project’s virtualenv — with one command.

No guessing which Python is used.
No copying long command chains.
No drift between local and pre-commit.


Install

Recommended with pipx:

pipx install devr

Or with pip:

pip install devr

Quick start

From the root of a Python project:

devr init
devr check

devr init will:

  1. Create or find a virtual environment.
  2. Install the default toolchain into that environment.
  3. Install your project dependencies (pip install -e . when pyproject.toml exists).
  4. Create .pre-commit-config.yaml if it does not already exist.
  5. Install the git pre-commit hook.

Commands

  • devr init [--python python3.12]
  • devr check [--fix] [--staged --changed] [--fast] [--no-tests]
  • devr fix
  • devr security [--fail-fast]
  • devr doctor
  • python -m devr --version (module entrypoint smoke check)

Shell completion

devr currently ships with Typer shell completion disabled (add_completion=False). This is intentional for now to keep startup behavior predictable in minimal environments and avoid implying completion-install support that is not yet documented or validated across shells.

If you need completion today, use your shell's native completion wrappers or aliasing as a local workaround. A future release can enable Typer completion installation once cross-shell setup guidance is documented and tested.

Notes

  • --changed --staged scopes lint/format checks to staged Python files.
  • --fast skips tests.
  • --no-tests always skips tests, even when configured to run.
  • --fix applies safe autofixes (ruff fix + formatting).
  • devr security runs pip-audit and bandit for dependency and code security scans.
  • --fail-fast stops the security scan after the first failing check.
  • devr doctor prints environment diagnostics (project root, Python path, venv resolution, and git detection) to help debug setup issues.

Configuration

Add configuration in your pyproject.toml:

[tool.devr]
venv_path = ".venv"
formatter = "ruff"      # or "black"
typechecker = "mypy"    # or "pyright"
coverage_min = 85
coverage_branch = true
run_tests = true

If values are omitted or invalid, devr falls back to safe defaults.

Virtual environment resolution order

When devr needs to run tooling, it resolves the venv in this order:

  1. tool.devr.venv_path from pyproject.toml (when it points to a valid venv).
  2. The currently active virtual environment (when devr is invoked from inside one).
  3. Project-local fallback directories: .venv, then venv, then env.

This is the same resolution order used by devr init, devr check, devr fix, and devr security.

Release checklist

Use this checklist when cutting a release:

  1. Verify local quality gates pass (devr check and devr security).
  2. Update CHANGELOG.md:
    • Move completed entries from Unreleased into a new version section.
    • Add release date (YYYY-MM-DD) and keep entries grouped by change type.
  3. Bump version in pyproject.toml under [project].version.
  4. Run release preflight checks (artifact smoke tests + changelog/version consistency):
    • python -m devr.release_preflight
    • This builds both wheel and sdist artifacts, installs each in an isolated venv, and verifies both devr --version and python -m devr --version.
  5. Commit release metadata (CHANGELOG.md, version bump, and any final docs updates).
  6. Tag the release (for example, vX.Y.Z) and push branch + tag.
  7. Publish to PyPI using your standard release workflow.
  8. Add a fresh Unreleased section to CHANGELOG.md for subsequent work.

Default toolchain

devr init installs:

  • ruff
  • black
  • mypy
  • pyright
  • pytest
  • pytest-cov
  • pre-commit
  • pip-audit
  • bandit

License

MIT

Metadata

Release files for devr 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 devr 0.1.0
File Size Uploaded Provenance Actions
devr-0.1.0.tar.gz 25.0 kB Without provenance Details for devr-0.1.0.tar.gz

Built distribution (wheel)

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

Total release size: 40.4 kB

Release files / devr-0.1.0.tar.gz

Download URL devr-0.1.0.tar.gz
Size 25.0 kB
Tags Source
SHA-256 checksum
How to use checksums
f33c2c470debdb6a429ef5467c71a83d2f8575dbfdb9bc0657746293fd81f064
BLAKE2b-256 checksum
How to use checksums
aa171b62547d28a94687db7e701388de234374d06a181f8ee6c8fe2e68d13205
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.3

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

Download URL devr-0.1.0-py3-none-any.whl
Size 15.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c61318f643854c2f7dff3109f6d52e3db98f8cd3a186e2c3db4ef734f331cfe7
BLAKE2b-256 checksum
How to use checksums
a14e4e5a8821e7d12b871d5dbc7fbfbb8b0dec7640a9ee31f6d536188ce7ac7a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.3

Security for devr 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