Poetry plugin to define and execute shell scripts in pyproject.toml file like npm run.
Important
This plugin only works on Poetry versions >=2.1.0 installed on Python versions >=3.9!
Install the exec plugin via the poetry self add:
poetry self add poetry-plugin-execIn the pyproject.toml file of your project, define the [tool.poetry_plugin_exec.scripts] section, adding your needed scripts:
[tool.poetry_plugin_exec.scripts]
check-format = "poetry run ruff check ."Then, you can simply run the poetry exec <script_name> command:
poetry exec check-formatNote
This plugin is based on examples from the official Poetry repositories.