cli-help-maker
Command Line Interface help message generator.
This repo contains a CLI to create simulated help messages with the positions annotated of the commands, arguments and options. Its created as a separated package, but its intended use is to generate datasets to be used in helpner-core, which deals with the model that powers helpner.
What range of help messages covers?
For the moment, it indents to recreate messages like those found in the examples of docopt-ng. This should cover CLI apps created in python using for example argparse, click or typer*.
typer uses click underneath, but when rich its is installed, the message has a special (and prettier) layout, currently not in the scope.
A proper list of items covered is yet to be made.
Installation
It can be installed directly from PyPI:
pip install cli-help-maker
This creates the following CLI:
❯ cli-help-maker --help
Usage: cli-help-maker [OPTIONS] INPUT_PATH [OUTPUT_PATH]
Function to generate a dataset of cli help messages from a .yaml file with the info.
A folder will be generated containing two jsonl files:
- arguments.jsonl: Contains the arguments that were generated, these can be associated to
each help message for further analysis.
- dataset.jsonl: A dataset of help messages with annotations.
╭─ Arguments ──────────────────────────────────────────────────────────────────────────────────╮
│ * input_path FILE Path pointing to the .yaml file. [default: None] │
│ [required] │
│ output_path [OUTPUT_PATH] Dirname of the output path. If not given, creates a │
│ directory with the version number │
│ [default: None] │
╰──────────────────────────────────────────────────────────────────────────────────────────────╯
╭─ Options ────────────────────────────────────────────────────────────────────────────────────╮
│ --install-completion [bash|zsh|fish|powershell|pwsh] Install completion for the │
│ specified shell. │
│ [default: None] │
│ --show-completion [bash|zsh|fish|powershell|pwsh] Show completion for the │
│ specified shell, to copy it or │
│ customize the installation. │
│ [default: None] │
│ --help Show this message and exit. │
╰──────────────────────────────────────────────────────────────────────────────────────────────╯
Examples
The folder examples contains a rough recreation of some of the examples found in docopt-ng repo, to see an example, run any of them, for example:
python examples/arguments_example_like.py
This would create a random help message with a layout similar to the one found in docopt-ng (approximately).
It highlights the labels using rich.
Development
TBD
Metadata
Release files for cli-help-maker 0.2.0
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 |
|---|---|---|---|---|
| cli-help-maker-0.2.0.tar.gz | 40.8 kB | Without provenance | Details for cli-help-maker-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| cli_help_maker-0.2.0-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details for cli_help_maker-0.2.0-py2.py3-none-any.whl |
Total release size: 63.5 kB
Release files / cli-help-maker-0.2.0.tar.gz
| Download URL | cli-help-maker-0.2.0.tar.gz |
|---|---|
| Size | 40.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3940177f7b37e9911a87cbd2728fc3d4791f8f3ab8c5225c0ce06c4225e12f87
|
|
BLAKE2b-256 checksum How to use checksums |
6e2ea7443d1eca143367bc8d9d24db246a397c86756f04d39b469bfec15d7309
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-requests/2.28.1
|
Release files / cli_help_maker-0.2.0-py2.py3-none-any.whl
| Download URL | cli_help_maker-0.2.0-py2.py3-none-any.whl |
|---|---|
| Size | 22.7 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
b8fee0d824b6521dbb0b43c026886b390a9719748a5dece1525c57a3765af0dd
|
|
BLAKE2b-256 checksum How to use checksums |
3ed4984e17a46e5e9eecb6d8f5fb47492255c1c3b4ec180e481beceb11123b48
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-requests/2.28.1
|
Security for cli-help-maker 0.2.0
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A 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.