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 json
/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: "2"
app:
name: "mycli"
alias: "my-cli"
root:
arguments:
--verbose:
type: flag
description: "verbose output."
--no-verbose:
type: flag
description: "no verbose output."
--version:
type: flag
alias: "-V"
description: "print version."
--config:
type: file
description: "config file."
--help:
type: flag
description: "print help."
subcommands:
list:
alias: "ls"
description: "list project files."
arguments:
--all:
type: flag
alias: "-a"
description: "list all files."
"*":
type: file
description: "list files."
cd:
description: "cd project directory."
arguments:
-P:
type: flag
description: "physical directory."
1:
type: file
base_path: $HOME
description: "change project directory."
test:
description: "test command."
subcommands:
rubocop:
description: "run rubocop."
arguments:
--auto-correct:
type: flag
alias: "-A"
description: "auto correct."
pytest:
description: "run pytest."
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.5.tar.gz
(11.2 kB
view hashes)
Built Distribution
cmdcomp-2.0.5-py3-none-any.whl
(19.5 kB
view hashes)