Skip to main content

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
  1. Bump the version in setup.cfg
  2. python3 -m build
  3. twine upload dist/*

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

fig-click-completions-0.0.4.tar.gz (3.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fig_click_completions-0.0.4-py3-none-any.whl (4.1 kB view details)

Uploaded Python 3

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

Hashes for fig-click-completions-0.0.4.tar.gz
Algorithm Hash digest
SHA256 e11aeb32488900debec37f5487e623171e2f20eb37fc88b20556d576c7cfd8f3
MD5 bdc8d0f3ace87bdaa5a43f98e3b30f8c
BLAKE2b-256 f3e09cd2e773295f01d8556f0ab4b45da6666eadbf63cb2ad9175005ee8d7a97

See more details on using hashes here.

File details

Details for the file fig_click_completions-0.0.4-py3-none-any.whl.

File metadata

File hashes

Hashes for fig_click_completions-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 e8a674dd2a2ad87fadb34d931bd156f01c0d8d605900fc51d9b2a2ae0382dce5
MD5 6ec8a259122ee4af852d20d742659307
BLAKE2b-256 64ffcd74995421fd2368ac49573d372fe519a412066727d66e427129ee3d7041

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page