CLI reference¶
commando — context-aware command launcher
Usage:
commando [command]
Commands:
(no args) Open the interactive search TUI
search [--print] Open the TUI; --print writes the chosen command to stdout
init <shell> Print integration for zsh, bash, or fish
run Alias for search
add Interactively add a cheat entry
history [query] Search your shell history (read live from the history file)
doctor Diagnose config, state, history, providers, and shell setup
state clear ... Clear remembered arguments or usage ranking
promote [flags] Promote a command or history entry into a managed cheat
bookmark ... Manage bookmarks: add/list/remove (also: bm)
version Print the version
help Show this help
Run with no arguments to open the search TUI. commando --help prints the usage
above.
commando / commando search¶
Open the interactive search TUI. Running commando with no arguments is
identical to commando search.
| Flag | Effect |
|---|---|
--print |
Write the chosen command to stdout. Used by the shell widget. (The command is written to stdout regardless; the flag exists for explicitness.) |
--exec |
Run the chosen command directly instead of printing it. |
Behavior: you search, optionally fill in a form, and Commando emits the
assembled command. By default it prints to stdout (the zsh widget puts it on
your prompt). With --exec it runs the command via your shell.
In the list, type to fuzzy-filter (each term matches independently across an
entry's title, description, command, and tags) and lead the query with a
:c/:p/:h/:b prefix — or press Tab — to scope to cheats, project
commands, history, or bookmarks. See The TUI
for the full key reference.
Exit codes:
| Code | Meaning |
|---|---|
0 |
A command was chosen and emitted (or run). |
130 |
You cancelled (Esc / Ctrl-C) — nothing chosen. |
1 |
An error occurred. |
commando init¶
Print shell integration to stdout for Zsh, Bash, or Fish.
Add the matching command to your shell config:
eval "$(commando init zsh)" # ~/.zshrc
eval "$(commando init bash)" # ~/.bashrc
commando init fish | source # ~/.config/fish/config.fish
The emitted snippet defines the summon widget and binds it to your configured
key_binding (default Ctrl+G). See
Installation & setup.
commando run¶
An alias for commando search. Accepts the same
flags.
commando add¶
Interactively author a cheat entry. Commando prompts for a title, optional
description, template, and tags, then parses the template to discover each
variable and prompts for its options. The validated entry is appended to
~/.config/commando/cheats/user.toml.
Prompts, in order:
- Title — required; shown in the result list.
- Description — optional; shown for the selected command.
- Command template — required; use
<var>and[optional <var>]. - Tags — comma-separated, optional.
- For each discovered variable:
src,default, multi-select (y/N), and remember scope (none/global/project/dir, defaultnone).
See Cheat sheets.
commando history¶
Search your shell history, read live from the history file. Commando never stores a copy.
| Flag | Default | Effect |
|---|---|---|
--limit N |
50 |
Maximum results to print. |
- The query is one or more words, matched case-insensitively as a substring.
- Results print newest-first.
- Flags may appear before or after the query — both
commando history --limit 3 dockerandcommando history docker --limit 3work.
See Shell history.
commando doctor¶
Inspect the active paths, config and cheat files, state store, shell history, project providers, shell support, and binary discovery.
Each line is marked ok, warn, or error and includes the path or an
actionable detail. Warnings describe reduced functionality and still exit 0;
an error exits 1.
commando state clear¶
Reset Commando's learned state without deleting configuration or bookmarks.
memory forgets parameter values, usage resets command and candidate
frecency, and all clears both.
commando promote¶
Append a literal command or parameterized template to
~/.config/commando/cheats/user.toml.
commando promote [--title "..."] [--desc "..."] [--tags "a,b"] <template>
commando promote --title "Pod logs" --tags "k8s,logs" \
'kubectl logs <pod> [-n <namespace>]'
| Flag | Effect |
|---|---|
--title |
Short result title. Defaults to the template. |
--desc |
Searchable description. |
--tags |
Comma-separated searchable tags. |
Discovered variables are written with remember = "none" so promoting an
existing command cannot start persisting parameter values unexpectedly. Edit
the generated cheat when a variable is safe to remember.
commando bookmark¶
Manage saved commands. Also available as commando bm. With no subcommand, it
lists bookmarks.
commando bookmark add [--tags "a,b"] [--note "..."] <command>
commando bookmark list # alias: ls
commando bookmark remove <command> # alias: rm
bookmark add¶
| Flag | Effect |
|---|---|
--tags |
Comma-separated searchable tags. |
--note |
Free-form searchable note. |
The command is everything after the flags.
bookmark list / ls¶
Prints each bookmark as command [tags] — note.
bookmark remove / rm¶
Removes the bookmark whose command exactly matches the argument. In the TUI, highlight a bookmark and press Ctrl+D for the same operation.
See Bookmarks.
commando version¶
Print the version and exit.
Also available as commando --version and commando -v.
commando help¶
Print the usage summary. Also commando --help and commando -h.