Skip to main content

cmdcomp is a cli tool completion generator for shell.

Project description

Command Completion Generator Tool

Test Suite PIP Version Docker Version

cmdcomp generate shell completion file (bash or zsh) from config toml file.

Install

pip install cmdcomp

Usage

Local

cmdcomp --file ${YOUR_CONFIG_FILE} --shell-type bash

Docker

docker run --rm -itv $(pwd):/app/cmdcomp yassun4dev/cmdcomp --file ${YOUR_CONFIG_FILE} --shell-type bash

Config

Configuration can be written in JSON, YAML, and TOML file formats.

Sample

[cmdcomp]
version = "1"

[app]
name = "mycli"
alias = "my-cli"

[root]
options = ["-h", "--help", "--version"]

[root.subcommands.list]
options = ["-a"]
alias = "ls"

[root.subcommands.execute]
options = { type = "command", execute = "your_app_name ps -s" }
alias = ["restart", "shell", "log"]

[root.subcommands.cd]
options = { type = "file", base_path = "$(cd $(dirname $0); pwd)/../apps" }

JSON Schema

https://raw.githubusercontent.com/yassun4dev/cmdcomp/main/docs/config.schema.json

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

cmdcomp-1.1.4.tar.gz (6.7 kB view hashes)

Uploaded Source

Built Distribution

cmdcomp-1.1.4-py3-none-any.whl (10.2 kB view hashes)

Uploaded Python 3

Supported by

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