Autogenerate Completions for CLI tools built with click
Project description
Autogenerate Completions for CLI tools built with click
Add the integration to your CLI tool:
pip install fig-click-completions
Add new subcommand to your CLI tool.
- You must pass in the root level CLI.
- Note: make sure you use the name
generate_fig_spec
.
from fig_click_completions import fig
...
@cli.command()
def generate_fig_spec():
fig.print_completion_spec(cli)
cli.add_command(generate_fig_spec)
You can now automatically generate the completion spec skeleton by running the following command:
$CLI generate-fig-spec > $CLI.ts
Updating
Prereqs:
- Create a ~/.pypirc
[testpypi]
username = __token__
password = ...
(Note that __token__
is NOT a placeholder)
- Install
twine
python3 -m pip install --upgrade twine
- Bump the version in
setup.cfg
python3 -m build
twine upload dist/*
Project details
Release history Release notifications | RSS feed
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 fig-click-completions-0.0.4.tar.gz
.
File metadata
- Download URL: fig-click-completions-0.0.4.tar.gz
- Upload date:
- Size: 3.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.9.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e11aeb32488900debec37f5487e623171e2f20eb37fc88b20556d576c7cfd8f3 |
|
MD5 | bdc8d0f3ace87bdaa5a43f98e3b30f8c |
|
BLAKE2b-256 | f3e09cd2e773295f01d8556f0ab4b45da6666eadbf63cb2ad9175005ee8d7a97 |
File details
Details for the file fig_click_completions-0.0.4-py3-none-any.whl
.
File metadata
- Download URL: fig_click_completions-0.0.4-py3-none-any.whl
- Upload date:
- Size: 4.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.9.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e8a674dd2a2ad87fadb34d931bd156f01c0d8d605900fc51d9b2a2ae0382dce5 |
|
MD5 | 6ec8a259122ee4af852d20d742659307 |
|
BLAKE2b-256 | 64ffcd74995421fd2368ac49573d372fe519a412066727d66e427129ee3d7041 |