retry-cli
A utility to run a shell command a set number of times with automatic retries on failure.
Mainly created as having tools such as pre-commit, format, etc fail once then pass the second time is (to me!) quite annoying. Often they'll fail once, then pass the second time.
Example usage:
uvx --from retry-cli retry --command "pre-commit run --all-files"
Usage
usage: retry [-h] --command COMMAND [--retries RETRIES] [--show-first] [--success-code SUCCESS_CODE]
Run shell command with automatic retries on failure.
Usage Examples:
retry --retries 4 --show-first --command "pre-commit run --all-files"
Useful for auto-formatters and tools like pre-commit, which might fail one or
more times but ultimately pass.
options:
-h, --help show this help message and exit
--command COMMAND The command string to execute.
--retries RETRIES Number of retries after the first attempt (default: 2).
--show-first Show output of the first attempt (default: hidden).
--success-code SUCCESS_CODE
The exit code that indicates success (default: 0).
Installation
Given this is a simple CLI tool it's recommended to use pipx / uvx to run with.
uvx
# PyPI
uvx --from retry-cli retry --command "pre-commit run --all-files"
# GitHub
uvx --from git+https://github.com/geo7/retry-cli.git retry --command "..."
Development
make init # setup project
make test # run tests
make blast # run linting
Release
Manual release process, merge feature into main then:
Run release script:
make release VERSION=0.1.0
Push commit:
git push origin main v0.1.0
Which will trigger GitHub Release workflow.
Metadata
Release files for retry-cli 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| retry_cli-0.1.3.tar.gz | 5.2 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| retry_cli-0.1.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 11.1 kB
Release files / retry_cli-0.1.3.tar.gz
| Download URL | retry_cli-0.1.3.tar.gz |
|---|---|
| Size | 5.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7c3411689a91a20179a69dbd6fb38922f09066717fba385ea0a46bfa53375b3b
|
|
BLAKE2b-256 checksum How to use checksums |
1eacd1da72fcb5742205bd3e2b483f38893d0c858a6bd888ff5a760b4edaa745
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 16, 2026.
Transparency logRelease files / retry_cli-0.1.3-py3-none-any.whl
| Download URL | retry_cli-0.1.3-py3-none-any.whl |
|---|---|
| Size | 5.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
00ea734dffa031888b37846dcdd3438dce95390b61c4a4b25039d0074c0cfb4b
|
|
BLAKE2b-256 checksum How to use checksums |
a781213d256f68aa8421aa0d93a5c9a95018db676a013adefa323fc019a4ccab
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 16, 2026.
Transparency logSecurity for retry-cli 0.1.3
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.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for retry_cli-0.1.3.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 16, 2026.
Transparency logA 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.