huhtree
Combining cobra and huh for the ultimate CLI experience.
Thirty Second Demo

Usage
Building
With Go installed, run the following command to compile the CLI and setup autocompletion.
# For bash
$ go build -o huhtree main.go && ./huhtree completion bash > /tmp/completion && source /tmp/completion
# For zsh
$ go build -o huhtree main.go && ./huhtree completion zsh > /tmp/completion && source /tmp/completion
Running
Once it's compiled, you can run the binary:
$ ./huhtree
Doing so with no arguments will ask you which command you wish to run from a list of options.
If you want to see the normal help command, you can still run:
$ ./huhtree -h
Command Autocomplete
The goal of this demo is to demonstrate how discoverable a CLI's different commands can be.
From the root command, there are three ways to discover the commands, with two being runnable:
- Output the help info of the root command.
- Run the root command with no arguments to choose from a list of subcommands.
- Hit after the CLI name to view and select from a list of subcommands.
When running a subcommand, there are again three ways to discover the options, with two bring runnable:
- Output the help info for the subcommands.
- Run the subcommand with no arguments to be prompted to fill out a "form" for each required argument.
- Hit after the subcommand's name in the CLI to view and select from a list of suggested arguments.