shcli-starterkit
is a CLI tools to make shell script cli tool for your
project.
With this tool, you can create a cli for your project very easily.
git clone git@github.com:yassun7010/shcli-starterkit.git
Install cmdcomp
If you are running dockerd, cmdcomp
will automatically run using the Docker
image.
If cmdcomp
is installed locally, it takes precedence over the Docker Image
method. You can use the following method to install cmdcomp
in local.
pipx install cmdcomp
echo 'export PATH=$PATH:'"$(pwd)/bin" >> ~/.bash_profile
echo "[[ -x `which shcli` ]] && eval \"$(shcli init -)\"" >> ~/.bash_profile
echo 'export PATH=$PATH:'"$(pwd)/bin" >> ~/.zsh_profile
echo "[[ -x `which shcli` ]] && eval \"$(shcli init -)\"" >> ~/.zsh_profile
Go to the repository where you want to install cli and execute the following
command. As a result, The cli
and bin
directories will be created.
cd $YOUR_PROJECT
install-shcli $PROJECT_NAME $COMMAND_NAME
# Please read the README for instructions on how to use the generated cli tool.
less cli/README.md
The template
directory has real sources. The cli
and bin
directories are
symbolic links to the directory of the same name in template
.
The reason why we have symbolic links is that we want to use the shcli
command
in development process. The symbolic link allows the shcli
command to be fully
functional without having to look in the template
directory.
.
├── .vscode -> template/cli/.vscode
├── bin -> template/bin
├── cli -> template/cli
├── template
│ ├── bin
│ │ └── shcli
│ └── cli
│ ├── .vscode
│ └── shcli.sh
└── installer.sh