Run a full Python dev preflight (ruff format/lint, typecheck, tests, coverage) inside your project venv.
Project description
devr
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:
- Create or find a virtual environment.
- Install the default toolchain into that environment.
- Install your project dependencies (
pip install -e .whenpyproject.tomlexists). - Create
.pre-commit-config.yamlif it does not already exist. - Install the git pre-commit hook.
Commands
devr init [--python python3.12]devr check [--fix] [--staged --changed] [--fast] [--no-tests]devr fixdevr security [--fail-fast]devr doctorpython -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 --stagedscopes lint/format checks to staged Python files.--fastskips tests.--no-testsalways skips tests, even when configured to run.--fixapplies safe autofixes (ruff fix + formatting).devr securityrunspip-auditandbanditfor dependency and code security scans.--fail-faststops the security scan after the first failing check.devr doctorprints 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:
tool.devr.venv_pathfrompyproject.toml(when it points to a valid venv).- The currently active virtual environment (when
devris invoked from inside one). - Project-local fallback directories:
.venv, thenvenv, thenenv.
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:
- Verify local quality gates pass (
devr checkanddevr security). - Update
CHANGELOG.md:- Move completed entries from
Unreleasedinto a new version section. - Add release date (
YYYY-MM-DD) and keep entries grouped by change type.
- Move completed entries from
- Bump version in
pyproject.tomlunder[project].version. - 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 --versionandpython -m devr --version.
- Commit release metadata (
CHANGELOG.md, version bump, and any final docs updates). - Tag the release (for example,
vX.Y.Z) and push branch + tag. - Publish to PyPI using your standard release workflow.
- Add a fresh
Unreleasedsection toCHANGELOG.mdfor subsequent work.
Default toolchain
devr init installs:
ruffblackmypypyrightpytestpytest-covpre-commitpip-auditbandit
License
MIT
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 devr-0.1.0.tar.gz.
File metadata
- Download URL: devr-0.1.0.tar.gz
- Upload date:
- Size: 25.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f33c2c470debdb6a429ef5467c71a83d2f8575dbfdb9bc0657746293fd81f064
|
|
| MD5 |
8109ca3d17025c4d161d486f334e5446
|
|
| BLAKE2b-256 |
aa171b62547d28a94687db7e701388de234374d06a181f8ee6c8fe2e68d13205
|
File details
Details for the file devr-0.1.0-py3-none-any.whl.
File metadata
- Download URL: devr-0.1.0-py3-none-any.whl
- Upload date:
- Size: 15.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c61318f643854c2f7dff3109f6d52e3db98f8cd3a186e2c3db4ef734f331cfe7
|
|
| MD5 |
20c7ea9607183eba61a05d6a13196af6
|
|
| BLAKE2b-256 |
a14e4e5a8821e7d12b871d5dbc7fbfbb8b0dec7640a9ee31f6d536188ce7ac7a
|