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_COLORandFORCE_COLORpolicy. -
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
TestBackendtest, 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.
Foundations — The CLI Landscape & Choosing a Stack, Terminals, TTYs & Pseudo-Terminals, Escape Sequences & Terminal Capabilities, POSIX Processes, Signals & I/O, Windows Console & Processes, Cross-Platform Portability
Native languages — Command-Line Programs in C, Command-Line Programs in C++, Command-Line Tools in Swift, Command-Line Tools in Objective-C, .NET Console Applications, Command-Line Programs in Go, Command-Line Programs in Rust, Command-Line Programs on the JVM & Kotlin
Terminal user interfaces — TUI Architecture & Concepts, Ratatui: Getting Started, Ratatui: Layout, Widgets & Styling, Ratatui: Events, Async & Application Architecture, Ratatui: Testing & Ecosystem, Go TUIs with Bubble Tea, Python TUIs with Textual, Rich & prompt_toolkit, .NET TUIs with Spectre.Console & Terminal.Gui, C & C++ TUIs: ncurses, PDCurses & FTXUI, Other TUI Libraries: JVM, Kotlin, Node.js & Swift
Interaction, output and integration — Interactive Prompts & Line Editing, Progress, Colour & Rich Output, Shells, Completions & Shell Integration, Long-Running Processes & Services, Accessibility & Internationalization
Shipping — Native Binaries & Cross-Compilation, Signing, Notarization & OS Trust, Native Packages & Installers, Testing Terminal Apps & TUIs
Related guides — Building CLIs for AI Agents
Download
Get the downloadable PDF.