TOML Run
Define custom scripts in your pyproject.toml and easily run them with this dependency free tool. This tool is both inspired by and similar to NPM Scripts.
If you run into any issues or have any questions, support is available.
To get started Install the cli and view the Usage.
Features
- Define scripts in your
pyproject.toml - Easily run scripts with
run [name] - Cross-platform support using subprocess
- Supports
preandpostscripts - Supports multiple commands per script
- Pass additional arguments to scripts
- Automatically finds the
pyproject.toml - Runs scripts relative to the root directory
- Evaluate python code 🧪 (experimental)
Install
From PyPI: https://pypi.org/p/toml-run
pip install toml-run
pip install --group dev toml-run
uv tool install toml-run
uv add --dev toml-run
Usage
First, add some scripts to the pyproject.toml using the [tool.scripts] section.
[tool.scripts]
prepare = "python scripts/prepare.py"
build = "run prepare && uv run hatch build"
prelint = "echo always runs before lint"
lint = ["black --check .", "ruff check ."]
postlint = "echo always runs after lint"
format = """
black .
ruff format .
"""
clean = "#py shutil.rmtree('.cache', True)"
Run scripts with the run command.
run build
List available scripts with --list.
run -l
Run without installing using astral-sh/uv.
uvx toml-run build
Support
If you run into any issues or need help getting started, please do one of the following:
- Report an Issue: https://github.com/cssnr/toml-run/issues
- Q&A Discussion: https://github.com/cssnr/toml-run/discussions/categories/q-a
- Request a Feature: https://github.com/cssnr/toml-run/issues/new?template=1-feature.yaml
- Chat with us on Discord: https://discord.gg/wXy6m2X8wY
Contributing
If you would like to submit a PR, please review the CONTRIBUTING.md.
Please consider making a donation to support the development of this project and additional open source projects.
For a full list of current projects visit: https://cssnr.github.io/
Metadata
Release files for toml-run 0.0.2
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 | Actions |
|---|---|---|---|---|
| toml_run-0.0.2.tar.gz | 7.5 kB | With provenance | Details for toml_run-0.0.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| toml_run-0.0.2-py3-none-any.whl | Python 3 | none | any | Details for toml_run-0.0.2-py3-none-any.whl |
Total release size: 15.2 kB
Release files / toml_run-0.0.2.tar.gz
| Download URL | toml_run-0.0.2.tar.gz |
|---|---|
| Size | 7.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f94ef95267c2aee45c12121993b0a85cdd614c60a54e90542753226ed41d8b86
|
|
BLAKE2b-256 checksum How to use checksums |
049fcc38ec7c7b94fbba9c50d9e1b0b7f0c08700a58d054ef8ad996d20b66415
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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 Dec 22, 2025.
Transparency logRelease files / toml_run-0.0.2-py3-none-any.whl
| Download URL | toml_run-0.0.2-py3-none-any.whl |
|---|---|
| Size | 7.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0d473dfa384c2ce73e45a1152e20a4c75ce9f1dbff4de5ef5dd0a77d36c8032a
|
|
BLAKE2b-256 checksum How to use checksums |
de9490edff2fdd55d29e5bec9633b6783017815ede6390278d260b219adbcffb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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 Dec 22, 2025.
Transparency logSecurity for toml-run 0.0.2
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 toml_run-0.0.2.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 Dec 22, 2025.
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.