Reference

CLI reference

Every Tooee command, flag, terminal channel, output, and exit code.

tooee <command> [options]

tooee, tooee help, tooee --help, and tooee -h print the usage text to stdout and exit with code 0. An unknown command prints Unknown command: <name> to stderr, prints the usage text to stdout, and exits with code 2.

Interactive commands separate terminal traffic from command data:

ChannelPurpose
process stdinPiped items or content
controlling terminal inputKeyboard events when stdin is a pipe
controlling terminal outputAlternate-screen drawing when stdout is redirected
process stdoutSubmitted text and selected values
process stderrUsage and startup errors

When process stdin or stdout already points at a terminal, Tooee uses that stream directly. Each command restores the terminal when its screen closes. A session that needs /dev/tty and cannot open it prints an error to stderr and exits with code 2.

tooee view

tooee view [file] [--renderer <name>] [--outline]
Argument or flagMeaning
fileA file or a directory. When omitted, View reads stdin.
--renderer <name>, -r <name>, --renderer=<name>Force a renderer: markdown, code, text, table, diff.
--outlineOpen the heading outline beside Markdown content at start. Other formats ignore it.
CaseBehaviour
FileRenderer from the extension; see the table in View. A text file that holds a unified patch opens as a diff.
DirectoryOpens the directory view. --renderer with a directory prints --renderer cannot be used with directory view and exits with code 2.
stdinReads all of stdin, then remains interactive through the controlling terminal. Renders as markdown or as a diff when it is a patch, unless --renderer is set.
Unknown rendererPrints Unknown renderer: <name> and the list of values. Exit code 2.
Missing renderer valuePrints Missing value for --renderer. Exit code 2.
Second positional argumentPrints Unexpected argument: <arg>. Exit code 2.

View exits with code 0 after q or ctrl+c.

tooee ask

tooee ask [--single-line | --multiline] [prompt...]
FlagMeaning
--single-line, -sOne-line input. Enter submits.
--multiline, -mMultiline editor. Shift+Enter submits in insert mode. This is the default.

Every other argument joins the prompt, separated by spaces. Without arguments, Ask shows the editor with no prompt line.

Stream or codeValue
stdinKeyboard input when it is a terminal. Piped data is ignored while keys come from /dev/tty.
stdoutThe submitted text followed by a newline. Nothing on cancel.
Exit code0 on submit. 1 on cancel.

tooee choose

tooee choose [--multi] [--prompt <text>]
FlagMeaning
--multi, -mMulti-select. Tab and Shift+Tab toggle items.
--prompt <text>Title bar text.

Other arguments are ignored.

Stream or codeValue
stdinOne item per line. Empty lines are dropped. Choose expects a pipe and reads keys from /dev/tty while stdin is piped.
stdoutOne line per picked item, in the order the items were toggled, or the highlighted item when none is toggled. Nothing on cancel.
Exit code0 on confirm. 1 on cancel.

Exit codes

CodeWhen
0Usage text printed; View closed; Ask submitted; Choose confirmed.
1Ask or Choose cancelled without a confirmed result.
2Invalid arguments, an unknown command, no usable controlling terminal, or another startup error.

Next

On this page