cmdcomp is a cli tool completion generator for shell.
Project description
Command Completion Generator Tool
cmdcomp
generate shell completion file (bash or zsh) from config yaml/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
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
cmdcomp-2.0.0.tar.gz
(10.7 kB
view hashes)
Built Distribution
cmdcomp-2.0.0-py3-none-any.whl
(18.8 kB
view hashes)