Cheat Sheet (PDF)

This content was generated with the assistance of AI and should be verified against the official documentation before being relied on in production; see the section bibliography for the reference material consulted while preparing these pages.

A single A4 page that summarises the CLI section for quick memorization or as a printable desk reference. It contains:

  • Choosing — the kinds of terminal program and the "which stack?" table (language by startup, size, cross-compilation and TUI library).

  • Terminal mechanics — the terminal stack (emulator, PTY, line discipline), canonical versus raw mode, the key escape sequences (SGR colours, cursor, alternate screen, mouse, bracketed paste, synchronized output, OSC 8) and the TERM, COLORTERM, NO_COLOR and FORCE_COLOR policy.

  • Platforms — POSIX process essentials, Windows console essentials and the platform-differences table.

  • Languages — argument parsing per language, and prompt, line-editing and progress libraries.

  • TUIs — the TUI loop skeleton, the library comparison row, a Ratatui skeleton with its TestBackend test, and short skeletons for Bubble Tea, Textual, Terminal.Gui, ncurses and FTXUI.

  • Integration and shipping — completions per shell, service one-liners (systemd, launchd, Windows services), cross-compilation commands, signing and notarization commands, packaging channels, PTY and snapshot testing tools and the accessibility rules.

For the full explanation, every option and additional examples, see the dedicated pages. The section overview, the reading order and the bibliography are on the CLI page.

Related guides — Building CLIs for AI Agents

Download

Get the downloadable PDF.