/kommando

Kommando is a tool to build command line tools with many nested sub commands.

Primary LanguageGoMIT LicenseMIT

Kommando

Kommando is a tool to build command line tools with many nested sub commands. Instead of writing code to stitch sub commands together, use the directory structure itself to organize sub commands.

# Create a shell alias for your tool
alias calc=/path/to/repo/example/kommando

calc add 1 3          # 4
calc sub 5 3          # 2
calc sub -i 5 3       # -2
calc say hello Earth  # Hello Earth!

Getting Started

First, copy the kommando executable file to the root of your project. It can be compiled using make or you can find pre-built under releases. The next step is to add an alias on your .bashrc file or .zshrc file to the kommando binary you copied.

It will search for commands from the directory where it's located. Each sub command can be written in any language/framework you wish as long as they are executable. Check the example directory on this repo for an example project with Nodejs and Python commands.