Skip to content

CLI

kanade with no verb runs the shell. kanade <verb> [args] asks the running one over its socket, so a niri keybind, a script and a hook all reach the same code path.

Terminal window
kanade launcher toggle
kanade volume-up
kanade session lock
Exit Meaning
0 Done
1 Refused, no shell running, or a failed write to stdout (not a pipe its reader closed, as head does)
2 Not a verb, or not its arguments
3 Not known whether it was done: the shell, or niri for a screenshot, got the call but did not answer in time

Exit 3 is not worth repeating blindly: the call may still be done. A verb of a Module turned off in the config answers module <name> is off. With no shell running, a verb says so.

kanade help lists every verb with a line on what it does; kanade help <verb> or kanade <verb> --help gives the forms it takes. kanade --version prints the version, and output is bold on a terminal unless NO_COLOR is set.

kanade dmenu [--prompt <text>] opens the Launcher with only the lines read from stdin, searched as it searches apps.

Terminal window
printf 'one\ntwo\nthree\n' | kanade dmenu --prompt "Pick one"

It prints the line pressed, exactly as read, and exits 0; Escape, a collapse or another Surface exits 1 with nothing printed. Empty lines are skipped, and it takes at most 5000 lines of up to 1000 characters. It holds the keyboard until answered: unlike other verbs, it never collapses on its own after 5 s or when the pointer leaves.

Surfaces, media and capture, system controls, activity, config, session and UI, maintenance. The CLI reference has every verb verbatim.