feat(cli): port ghostty +action CLI commands

Ports ZIG/src/cli into ghostty-cli: action detection/dispatch with
per-action --help, and the actions help, version, list-actions,
list-colors, list-keybinds, list-themes (plain listing plus an
interactive ratatui browser mirroring Ghostty's libvaxis UI),
show-config, validate-config, edit-config, crash-report (listing),
ssh-cache and boo (235 embedded frames).

Verified byte-for-byte against the installed Ghostty 1.3.1 for stdout,
stderr and exit codes of most actions, incl. tty output in a pty at
widths 20-200. Known differences: +list-colors --plain prints all 782
colors (Ghostty truncates at 617 because it never flushes), +version
has placeholder build info until build_info::set is wired up.

Deferred: list-fonts, show-face (need font discovery integration) and
new-window (needs GTK IPC); they return NotYetAvailable for now.

Test Plan:
- cargo test -p ghostty-cli (86 tests)
- cargo run -p ghostty-cli --example cli -- +list-keybinds --plain
  and diff against `ghostty +list-keybinds --plain`
This commit is contained in:
ddidderr committed 2026-10-11 22:22:01 +02:00
1 parent a97ae04f1d
commit 6286e02f07
46 files changed
+7135 -6

No files matched your search

@@ -0,0 +1,24 @@
The `list-fonts` command is used to list all the available fonts for
Ghostty. This uses the exact same font discovery mechanism Ghostty uses to
find fonts to use.
When executed with no arguments, this will list all available fonts, sorted
by family name, then font name. If a family name is given with `--family`,
the sorting will be disabled and the results instead will be shown in the
same priority order Ghostty would use to pick a font.
Flags:
* `--bold`: Filter results to specific bold styles. It is not guaranteed
that only those styles are returned. They are only prioritized.
* `--italic`: Filter results to specific italic styles. It is not guaranteed
that only those styles are returned. They are only prioritized.
* `--style`: Filter results based on the style string advertised by a font.
It is not guaranteed that only those styles are returned. They are only
prioritized.
* `--family`: Filter results to a specific font family. The family handling
is identical to the `font-family` set of Ghostty configuration values, so
this can be used to debug why your desired font may not be loading.