Poetry plugin for simple custom user commands execution.
Project description
Poetry Command Aliases Plugin
This plugin allows you to define aliases or shortcuts for commonly used commands in your Poetry projects. It simplifies command execution by providing custom aliases for complex or frequently used commands.
Usage
-
Installation:
Install the plugin using Poetry:
pip install poetry-plugin-commands
or
pip install --user poetry-plugin-commands
or at least
poetry self add poetry-plugin-commands
-
Define Aliases:
Add your aliases to the
pyproject.toml
file under the[tool.poetry-plugin-commands]
section:[tool.poetry-plugin-commands] stree = "tree src" test_var = "echo $VAR" run_app = "PYTHONPATH=src:. poetry run python src/app_launch/main.py"
Here,
stree
,test_var
, andrun_app
are the custom aliases, and their corresponding commands are specified. -
Execute Commands:
Now you can use the defined aliases with Poetry:
poetry stree
poetry test_var
poetry run_app
These commands will execute the respective commands defined as aliases.
-
List Available Commands:
To get a list of available aliases along with their corresponding commands, run:
poetry user-commands
This will display a list of aliases and their associated commands:
stree -> `tree src` test_var -> `echo $VAR` run_app -> `PYTHONPATH=src:. poetry run python src/app_launch/main.py`
Contributing
Feel free to contribute to this plugin by reporting issues, suggesting features, or submitting pull requests on GitHub.
License
This plugin is licensed under the Apache 2. License. See the LICENSE file for details.
Project details
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
File details
Details for the file poetry_plugin_commands-0.0.9.tar.gz
.
File metadata
- Download URL: poetry_plugin_commands-0.0.9.tar.gz
- Upload date:
- Size: 7.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.2 PyPy/7.3.10 Linux/5.10.194-1-MANJARO-TKG
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c4ceccf3a3c005ae670f3465d2b8f5490ea3998472a0400e55201e821db8e505 |
|
MD5 | 005526ee3fae85d9862154b26a766dd9 |
|
BLAKE2b-256 | 3d6ee1cc71c843919f5942d461ac3a511afac782f1ca2677e66f522b20981f4d |
File details
Details for the file poetry_plugin_commands-0.0.9-py3-none-any.whl
.
File metadata
- Download URL: poetry_plugin_commands-0.0.9-py3-none-any.whl
- Upload date:
- Size: 8.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.2 PyPy/7.3.10 Linux/5.10.194-1-MANJARO-TKG
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7aa015785b2536552407fbaf325c4edd1334ccc04cfda73e355b9b9c56a671ff |
|
MD5 | 65f3b656fb116940ec5674316e13c314 |
|
BLAKE2b-256 | 755c497454d599c102486e8d30771514c7d1bcdb74f7d8d81b198b9649569906 |