https://github.com/wingkwong/pcsk
📦 Python CLI Starter Kit
https://github.com/wingkwong/pcsk
cli pcsk python python-cli python-cli-starter-kit quickstart starter-kit template
Last synced: about 1 month ago
JSON representation
📦 Python CLI Starter Kit
- Host: GitHub
- URL: https://github.com/wingkwong/pcsk
- Owner: wingkwong
- License: mit
- Created: 2019-11-24T09:28:18.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2024-05-01T14:43:55.000Z (about 1 year ago)
- Last Synced: 2025-02-16T03:43:16.987Z (3 months ago)
- Topics: cli, pcsk, python, python-cli, python-cli-starter-kit, quickstart, starter-kit, template
- Language: Python
- Homepage:
- Size: 9.77 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# PCSK - Python CLI Starter Kit
PCSK is a CLI starter kit written in Python. It is designed to help you kickstart your Python CLI project using [click](https://github.com/pallets/click/) and following AWS CLI structure.
## Getting started
Using PCKS requires Python 3.6 or above. After you clone the project, you need to configure the following.
1. Use your favourite editor to edit ``setup.py``, change the info accordingly.
2. Rename project name ``pcks`` to ``your_project_name`` and CLI name ``pckscli`` to ``your_cli_name``
3. Install the packages by running ``python setup.py install``
4. Run the CLI using ``your_cli_name``. There are built-in two commands ``your_cli_name command1`` and ``your_cli_name command2``````
Usage: pcskcli [OPTIONS] COMMAND [ARGS]...Options:
--version Show the version and exit.
--help Show this message and exit.Commands:
command1 This is a short help for command1
command2 This is a short help for command2
````### To start writing your commands
1. Go to ``/commands`` and copy the existing example ``command1`` or ``command2``
2. In the new command folder, modify ``__init__.py`` and ``command.py``
3. Write your CLI logic in ``command.py``
- Update ``HELP_TEXT``
- Update ``SHORT_HELP``
- Update the command name in ``@click.command`` and options
- Add your CLI logic in ``do_cli``
4. Go to ``/cli/command.py``, add the package you just created to ``_COMMAND_PACKAGE``
5. Test your commands## License
PCKS is licensed under the MIT license. Check the [LICENSE](https://github.com/wingkwong/pcsk/blob/master/LICENSE) file for details.