# ppcli
[![PyPI - Version](https://img.shields.io/pypi/v/ppcli.svg)](https://pypi.org/project/ppcli)
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/ppcli.svg)](https://pypi.org/project/ppcli)
-----
`ppcli` stands for **pyproject CLI**. It is a Python package designed to provide an easy way to specify and manage auxiliary commands within a `pyproject.toml` file for any Python project.
## Purpose
The primary purpose of `ppcli` is to allow developers to define and manage common project tasks, such as test, lint, and migration commands, directly within the `pyproject.toml` file. This ensures that all project-specific commands are centralized and easily accessible.
## Installation
You can install `ppcli` via pip:
```console
pip install ppcli
```
## Usage
After installing ppcli, you can define your project-specific commands within your pyproject.toml file under the `[tool.ppcli]` section.
### Example pyproject.toml Configuration
```toml
[tool.ppcli]
lint="black --check --diff ."
fmt="black ."
clean = [
"find . -type d -name __pycache__ -empty -print0 | xargs --null --no-run-if-empty rmdir",
"coverage erase",
]
test = [
"clean",
"pytest --cov --blockage -x -s --no-header -ra",
]
```
### Defining and Combining Commands
* **Single Command**: Each key under [tool.ppcli] represents a command that can be executed. The value can be a single command string or a list of commands.
* **Combined Commands**: Use the keys of other commands to create combined tasks. In the example above, the test command executes the clean command followed by pytest.
### Running Commands
To execute the defined commands, simply run the ppcli tool followed by the command name:
```console
ppcli <command>
```
For example:
```console
ppcli lint
ppcli fmt
ppcli test
```
## Contributing
Contributions are welcome! Please open an issue or a pull request to contribute.
## License
This project is licensed under the [MIT](https://spdx.org/licenses/MIT.html) License. See the [LICENSE](/LICENSE) file for more details.
Raw data
{
"_id": null,
"home_page": null,
"name": "ppcli",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": null,
"keywords": "automation, cli, command-line, configuration, dev-tools, developer-tools, project-management, pyproject, scripting, task-runner, tooling, utility",
"author": null,
"author_email": "Artem Lykhvar <me@a10r.com>",
"download_url": "https://files.pythonhosted.org/packages/b4/f9/005d5c02347bdcbc3f121f29b440bb0ef37fbafd64f56f4cf2acac88d9a5/ppcli-0.0.2.tar.gz",
"platform": null,
"description": "# ppcli\n\n[![PyPI - Version](https://img.shields.io/pypi/v/ppcli.svg)](https://pypi.org/project/ppcli)\n[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/ppcli.svg)](https://pypi.org/project/ppcli)\n\n-----\n`ppcli` stands for **pyproject CLI**. It is a Python package designed to provide an easy way to specify and manage auxiliary commands within a `pyproject.toml` file for any Python project.\n\n## Purpose\n\nThe primary purpose of `ppcli` is to allow developers to define and manage common project tasks, such as test, lint, and migration commands, directly within the `pyproject.toml` file. This ensures that all project-specific commands are centralized and easily accessible.\n\n## Installation\n\nYou can install `ppcli` via pip:\n\n```console\npip install ppcli\n```\n\n## Usage\nAfter installing ppcli, you can define your project-specific commands within your pyproject.toml file under the `[tool.ppcli]` section.\n\n### Example pyproject.toml Configuration\n```toml\n[tool.ppcli]\nlint=\"black --check --diff .\"\nfmt=\"black .\"\nclean = [\n \"find . -type d -name __pycache__ -empty -print0 | xargs --null --no-run-if-empty rmdir\",\n \"coverage erase\",\n]\ntest = [\n \"clean\",\n \"pytest --cov --blockage -x -s --no-header -ra\",\n]\n```\n### Defining and Combining Commands\n* **Single Command**: Each key under [tool.ppcli] represents a command that can be executed. The value can be a single command string or a list of commands.\n* **Combined Commands**: Use the keys of other commands to create combined tasks. In the example above, the test command executes the clean command followed by pytest.\n\n### Running Commands\n\nTo execute the defined commands, simply run the ppcli tool followed by the command name:\n\n```console\nppcli <command>\n```\nFor example:\n\n```console\nppcli lint\nppcli fmt\nppcli test\n```\n\n## Contributing\n\nContributions are welcome! Please open an issue or a pull request to contribute.\n\n## License\nThis project is licensed under the [MIT](https://spdx.org/licenses/MIT.html) License. See the [LICENSE](/LICENSE) file for more details.\n\n",
"bugtrack_url": null,
"license": null,
"summary": "Dynamic CLI tool to manage project-specific commands using pyproject.toml configuration",
"version": "0.0.2",
"project_urls": {
"Documentation": "https://github.com/lykhvar/ppcli#readme",
"Issues": "https://github.com/lykhvar/ppcli/issues",
"Source": "https://github.com/lykhvar/ppcli"
},
"split_keywords": [
"automation",
" cli",
" command-line",
" configuration",
" dev-tools",
" developer-tools",
" project-management",
" pyproject",
" scripting",
" task-runner",
" tooling",
" utility"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "f228c6ef915dbbd927b22febd2a57bdbeebed7176bb152e9ff6bdbbf17e96722",
"md5": "de7d1222934089627fe9c0dd51f98569",
"sha256": "6094dd2c49b8d1dfee9201ea5ff81724b3f9ae1095c670ad912cbfa19cf28abe"
},
"downloads": -1,
"filename": "ppcli-0.0.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "de7d1222934089627fe9c0dd51f98569",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 5273,
"upload_time": "2024-10-03T19:22:47",
"upload_time_iso_8601": "2024-10-03T19:22:47.601547Z",
"url": "https://files.pythonhosted.org/packages/f2/28/c6ef915dbbd927b22febd2a57bdbeebed7176bb152e9ff6bdbbf17e96722/ppcli-0.0.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "b4f9005d5c02347bdcbc3f121f29b440bb0ef37fbafd64f56f4cf2acac88d9a5",
"md5": "79e98ed33b834ac66826e91604bad9d3",
"sha256": "b784842dc60491b717145aa758d372c78837e6b34b47fed88c8afeb9c7ba3e6e"
},
"downloads": -1,
"filename": "ppcli-0.0.2.tar.gz",
"has_sig": false,
"md5_digest": "79e98ed33b834ac66826e91604bad9d3",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 5269,
"upload_time": "2024-10-03T19:22:46",
"upload_time_iso_8601": "2024-10-03T19:22:46.552298Z",
"url": "https://files.pythonhosted.org/packages/b4/f9/005d5c02347bdcbc3f121f29b440bb0ef37fbafd64f56f4cf2acac88d9a5/ppcli-0.0.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-10-03 19:22:46",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "lykhvar",
"github_project": "ppcli#readme",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "ppcli"
}