tempest-cli
Documentação: Português (BR) · English (US)
One command for the quality gate of any Python project — ruff +
mypy + pytest, with a typing-strictness dial that lives in your
pyproject.toml instead of in four different Makefile targets.
Framework-agnostic on purpose: Django, Flask, Litestar, FastAPI, a
library, a script. It brings ruff along, so the gate runs the moment
you install it; typer is the only other runtime dependency.
uv add --dev tempest-cli
tempest-cli check # lint + fmt-check + type + test, in order, stops at the first failure
tempest-cli fix # every ruff autofix, then format
tempest-cli type -s strict # override the configured strictness for one run
tc check # `tc` is the short alias for the same program
Why it exists
The four commands are always the same, and every project rewrites them
slightly differently — a Makefile here, a tox.ini there, a CI job that
drifts from what runs locally. tempest-cli check is the same gate on
your machine and in CI, and --strictness makes "how much typing do we
enforce" a value in pyproject.toml rather than a flag someone
remembered to pass.
Commands
| Command | Runs |
|---|---|
tempest-cli lint |
ruff check |
tempest-cli fix |
ruff check --fix then ruff format (--unsafe for the risky autofixes) |
tempest-cli format |
ruff format (writes) |
tempest-cli fmt-check |
ruff format --check (read-only) |
tempest-cli type |
mypy |
tempest-cli test |
pytest |
tempest-cli check |
all four, in order, stopping at the first failure |
tempest-cli pr-prompt |
builds the prompt that makes an AI write this branch's PR description |
Every command takes an optional path (tempest-cli lint src/) and
returns the underlying tool's exit code, so CI reads it exactly as it
would read ruff directly.
Typing strictness
[tool.tempest]
typing_strictness = "strict" # lenient | standard | strict
The level adds flags on top of your own [tool.ruff] /
[tool.mypy] — it never relaxes what you already configured:
| Level | ruff (extra ANN rules) |
mypy |
|---|---|---|
lenient |
none | none |
standard |
ANN001, ANN201, ANN202, ANN205, ANN206 |
--disallow-untyped-defs --disallow-incomplete-defs |
strict |
the above plus ANN204 |
--strict |
ANN401 is never enabled at any level: Any is a legitimate
annotation. The levels enforce that things are annotated, never that
they avoid Any.
Override per run with --strictness / -s. Absent config means
standard.
PR descriptions from the branch itself
tempest-cli pr-prompt | claude -p
tempest-cli pr-prompt develop --lang en --out pr_prompt.txt
The prompt carries the repository's own pull-request template (or a bundled PT-BR / EN-US default), the rules that stop a model from handing back the template with its placeholders intact, and the branch context: commit subjects, changed files, and a bounded excerpt of each patch.
Diffs are read as base...head — the merge-base diff the forge shows —
so commits that landed on the base after the branch started are not
attributed to it. Whatever the bounds leave out is stated inside the
prompt, so a partial diff reads as partial.
Use it as a library
from tempest_cli import load_tempest_config, run_full_check
config = load_tempest_config()
exit_code = run_full_check(".", config=config)
And to expose the same gate from your own CLI, without copying command bodies:
import typer
from tempest_cli.main import register_commands
cli: typer.Typer = typer.Typer(name="mytool")
register_commands(cli)
Where the tools come from
ruff comes with the package — six of the eight commands are ruff,
so lint, fix, format and fmt-check work straight after
uv add --dev tempest-cli, with nothing else to install. It is a static
binary wheel with no Python dependencies of its own, so nothing of its
propagates into your resolution.
mypy and pytest are deliberately left to you — a mypy bump changes
which errors your code reports, and pytest has to match your plugins and
your suite. Add them yourself, or take the bundle:
uv add --dev "tempest-cli[tools]"
Whatever you pin wins over the bundled ruff. The lookup runs in this order:
- the project's environment —
$VIRTUAL_ENV, then the nearest.venvup the tree; - the environment
tempest-cliitself runs from (where the bundled ruff lives); PATH, skipping a pyenv/asdf shim that dispatches nowhere (the one that answerspyenv: ruff: command not found);uv run --with <tool> <tool>, whenuvis available.
Relationship with tempest-fastapi-sdk
This package was extracted from
tempest-fastapi-sdk,
where the same gate shipped as tempest check. Getting it meant
installing FastAPI, SQLAlchemy, Alembic and Pydantic — 38.7 MB of
dependencies and roughly 0.5 s of import time per invocation, for four
commands that never touch any of it.
tempest check keeps working: the SDK depends on this package and
registers the same commands. Both stay in sync because there is now one
implementation.
License
MIT — see LICENSE.
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 tempest_cli-0.3.0.tar.gz.
File metadata
- Download URL: tempest_cli-0.3.0.tar.gz
- Upload date:
- Size: 129.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e32d5c627fb621fa9d8e26526f001a31899f12f961ec418d0e8259034b420e80
|
|
| MD5 |
1a009550630f5ab3983a0e258e56fd80
|
|
| BLAKE2b-256 |
5737b29a19141ea0090d1dde26b3245102d24f877818ffa53c1e81cf2333c2cf
|
Provenance
The following attestation bundles were made for tempest_cli-0.3.0.tar.gz:
Publisher:
release-pypi.yml on mauriciobenjamin700/tempest-cli
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
tempest_cli-0.3.0.tar.gz -
Subject digest:
e32d5c627fb621fa9d8e26526f001a31899f12f961ec418d0e8259034b420e80 - Sigstore transparency entry: 2477916622
- Sigstore integration time:
-
Permalink:
mauriciobenjamin700/tempest-cli@f5737e5f00ed10a5f6ba69ba67a7873bc1ca270e -
Branch / Tag:
refs/tags/v0.3.0 - Owner: https://github.com/mauriciobenjamin700
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-pypi.yml@f5737e5f00ed10a5f6ba69ba67a7873bc1ca270e -
Trigger Event:
push
-
Statement type:
File details
Details for the file tempest_cli-0.3.0-py3-none-any.whl.
File metadata
- Download URL: tempest_cli-0.3.0-py3-none-any.whl
- Upload date:
- Size: 27.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d6d652decb225d081ccf74922feefabe39e11732668c2bf85bc77eb3d4f72a5e
|
|
| MD5 |
b286922871ade2802dd8477a2df654ba
|
|
| BLAKE2b-256 |
1188724c9bcbe12e92586a2e56c26d793f90cb7cb9ff417cfb39f28925a244d9
|
Provenance
The following attestation bundles were made for tempest_cli-0.3.0-py3-none-any.whl:
Publisher:
release-pypi.yml on mauriciobenjamin700/tempest-cli
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
tempest_cli-0.3.0-py3-none-any.whl -
Subject digest:
d6d652decb225d081ccf74922feefabe39e11732668c2bf85bc77eb3d4f72a5e - Sigstore transparency entry: 2477916753
- Sigstore integration time:
-
Permalink:
mauriciobenjamin700/tempest-cli@f5737e5f00ed10a5f6ba69ba67a7873bc1ca270e -
Branch / Tag:
refs/tags/v0.3.0 - Owner: https://github.com/mauriciobenjamin700
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-pypi.yml@f5737e5f00ed10a5f6ba69ba67a7873bc1ca270e -
Trigger Event:
push
-
Statement type: