Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

The CLI is a one-way superset of pinned Ghostty

Status: accepted. Date: 2026-11-07. Owner approved: yes.

The rule in ADR 0009 applies to action invocations too: ghostty +action [options] is recognized as voyager7 +action [options]. Implemented behavior uses upstream names and plain output conventions. Recognizing an action does not claim its feature exists: unsupported actions and options return a nonzero status with not supported yet in Voyager7. They never enter GUI startup. -h and --help print per-action help and return zero even for pending actions. --version, -h and --help also work globally. Value options use --key=value, as in pinned Ghostty's parser. Unknown input is diagnosed, never panicked on.

scripts/gen-ghostty-cli.py extracts the factual action/option inventory from src/cli/ghostty.zig and action Options structs (including manually parsed explain-config flags). Regenerate after updating the vendor pin. It extracts config and keybind documentation and X11 color names from that same pin, without copying Zig parsing, dispatch or playback logic. Documentation and all 235 boo frames are zlib compressed; decompression is bounded. See licenses/README.md and the MIT notice next to the data.

ActionState
+versionImplemented; Ghostty's layout; --full adds Windows bug-report facts (below)
+helpImplemented; our own Windows help for the program and every action
+list-fontsImplemented; grouped by family, sorted unless --family; family/style/bold/italic filters
+list-keybindsImplemented; today's four copy/paste keyboard bindings
+list-themesImplemented; Ghostty's preview and flags in any Windows console (ADR 0016)
+list-colorsImplemented; generated pinned X11 names, plain output
+list-actionsImplemented; generated from the keybind action table, Ghostty order, --docs
+sshImplemented; Ghostty's flags and flow, xterm-ghostty terminfo (below)
+ssh-cacheImplemented; Ghostty's file format, queries, messages and exit codes
+edit-configImplemented; create APPDATA/Voyager7/config, VISUAL, EDITOR or Notepad
+show-configImplemented; default, changes-only, docs, no-pager
+explain-configImplemented; positional, option, keybind, no-pager; own v7-bidi docs
+validate-configImplemented; config-file or default paths, includes, local value checks
+show-faceImplemented; cp/string, style, presentation, real discovery candidates and cmap
+crash-reportImplemented; lists local reports (below); nothing is ever sent
+booImplemented temporarily at the owner's explicit request; remove later
+new-windowImplemented; class-selected local IPC, detached startup fallback, --shell-integration
+new-tabImplemented; --surface-id/VOYAGER7_SURFACE_ID or focused window, detached startup fallback
+toggle-quick-terminalImplemented; class-selected local IPC, detached startup fallback (ADR 0021)
+show-licensesVoyager7 only: prints the LICENSE and NOTICE texts built into the executable (2026-12-01)

show-config describes Voyager7's implemented effective defaults, not imagined support for every Ghostty setting. Unsupported configured keys remain visible with diagnostics. --default skips files, overrides changes-only, and prints all implemented defaults. Changes-only defaults true, as upstream. Scalar entries use the last value; empty resets restore defaults. --docs comments are upstream text, which can describe capabilities Voyager7 has not yet implemented. Validation returns nonzero for unknown/unsupported keys, invalid local values, and unreadable includes; unsupported Ghostty values cannot be fully validated. --no-pager and --plain are accepted: output is always plain and never paged. list-keybinds --docs is accepted and currently has no effect, matching the pin. The old --list-fonts REPORT and +show-config REPORT extensions remain.

CLI output attaches to the parent console, never allocates a console, preserves inherited file/pipe handles, uses Unicode console writes and UTF-8 byte writes for redirection, and never reads stdin or injects keystrokes into a parent prompt. The executable retains its GUI subsystem. Interactive cmd may display its next prompt before a GUI program finishes; start /wait is the Windows mechanism when synchronous prompt ordering is required. Scripts and pipelines wait normally. This OS limitation cannot be fixed by attaching after process startup.

+version keeps upstream's shape (src/cli/version.zig): Voyager7 <version>, a blank line, then titled blocks of - label : value rows. Voyager7 adds a commit row to Version and replaces the GTK rows with Windows ones. Plain +version prints Version and Build Config (Rust, build mode, Text Engine, a device-only D3D11 probe for hardware/WARP, libghostty-vt's own ghostty_build_info with the Ghostty pin and Zig version), as upstream does. +version --full, a Voyager7 option, adds Windows (product, release and build.UBR, edition, architecture, composition, theme, DPI), Backend (the one a new Surface would get, v7-conpty, the default terminal) and Install (installer registration or package flavour, recorded Choices against the files present, config files); those facts are gathered only for --full. Every row, the Version block included, pads its label to the longest label in the printed report, so all colons share one column (upstream hand-pads only its later blocks). Any other argument is an error. It reads only, spawns nothing at run time (build facts come from build scripts), and prints paths relative to %LOCALAPPDATA%, %APPDATA% or %USERPROFILE% with any other \Users\<name> masked. It emits no OSC 8 link, unlike upstream on a TTY, because Windows 7 conhost would print it raw. The palette's v7_copy_version_info copies the --full text. The issue template asks for +version --full.

The temporary animation player has one dispatch arm and its own module and data; no global playback state. A redirected stream gets one complete cycle without delays or escape sequences. A console loops at about 30 fps until Escape or Ctrl+C. It needs a console large enough for the 100 by 41 art. Platform code owns safe console cursor/input wrappers; Rust playback is entirely our own.

cargo xtask vm-cli builds, checks Win7 imports, then runs real cmd.exe scripts through win7vm.py on both guests, using the VM lock internally. It checks help for every action, implemented invocations, unknown actions/options, validation errors, redirection, pipes, and PowerShell redirection. See the status document for measured executable size and acceptance results.

Step 6 Part A replaced the fixed copy/paste inventories: +list-keybinds reports the application's effective table (--default skips files). See the Part A inventory.

+list-actions (2026-11-29) prints the names a keybinding accepts, without parameters, as Ghostty does: v7_core::action_list derives them from Action::ALL and the free-text actions, puts Ghostty's in Binding.zig order (names generated into ghostty_actions.rs by scripts/gen-ghostty-cli.py), then Voyager7's v7_ actions. Ghostty actions Voyager7 does not implement are left out of the list and named at the end of +list-actions --help, computed from the same table. --docs writes Ghostty's plain-text layout with Ghostty's documentation (our own for v7_ actions). A test fails when an action parses but is not listed, or the reverse.

+new-window and +new-tab (2026-11-29) take Ghostty's per-surface --shell-integration=<mode>; it also travels with a bare startup that joins a running instance. Every program a surface starts sees VOYAGER7_SURFACE_ID (Ghostty's GHOSTTY_SURFACE_ID, 0x%016x; Voyager7 does not set the Ghostty name, as it hides other terminals' brands). +new-tab --surface-id=<id>, or that variable, opens the tab in the window holding that surface; 0 or an unknown id is the focused window, as upstream. +new-window --surface-id is an error: upstream's +new-window has no such option.

Crash reports

Ghostty writes Sentry envelopes, to send later, and its +crash-report lists them. Voyager7 keeps the listing but never sends anything anywhere: no network code, no upload option, now or later. A report is two local files in %LOCALAPPDATA%\Voyager7\crash: <id>.txt (build, process and role, the exception code and address, a backtrace unwound from the crashed context, then +version --full from a child process) and <id>.dmp (a minidump: normal plus indirectly referenced memory, thread info and unloaded modules). The id is YYYYMMDD-HHMMSS-PID, local time. The 10 newest reports are kept. +crash-report prints <id> (<local date>, <age> ago), newest first, and Ghostty's No crash reports! 👻 only to a console.

v7_platform_windows::crash::install runs first in every voyager7.exe role (window, CLI action, Win7 console agent, default-terminal watcher) and in voyager7.com. Injected DLLs never install it. The panic handler and an unhandled-exception filter hand the crash to a new thread with a 1 MiB stack (the crashing thread may have overflowed its own) and wait for it; if that thread cannot start within 3 s the crashing thread writes the report itself. The crash path does not allocate. A panic's message and source location are not read: that keeps every panic site's strings in the executable (about 230 KB); the backtrace's first frames name the site instead. dbghelp.dll is loaded by its full System32 path only when a dump is written, so startup pays nothing and no DLL can be planted. A crash in the report writer ends that thread; earlier stages stay written. Windows' own handling (WER) still runs after the filter. On 64-bit Windows 7, exceptions in window procedures called back from the kernel were ignored; install turns that filter off (SetProcessUserModeExceptionPolicy) so they crash and are reported. Fail-fast exits (heap corruption, __fastfail) bypass unhandled-exception filters and leave no report.

Crashes are tested only with the crash-test Cargo feature, which packages never enable: V7_CRASH_TEST=panic|access-violation|stack-overflow[@paint] and V7_CRASH_TEST_MATCH=<command line text>. Ghostty's crash keybind action is not implemented, so a normal user cannot crash Voyager7 on purpose or by accident.

+ssh and +ssh-cache

+ssh follows pinned src/cli/ssh.zig: --forward-env, --terminfo, --cache, --ssh and --verbose come first, and -- or the first other argument starts ssh's arguments, which pass through unchanged. It sends COLORTERM, TERM_PROGRAM and TERM_PROGRAM_VERSION with SendEnv, runs ssh -G to name the destination (user@host, :port when not 22), and on the first connection pipes the terminfo entry into command -v tic … && mkdir -p ~/.terminfo && tic -x - on the remote host. It sets TERM in ssh's own environment, not with SetEnv. Messages, warnings and exit statuses are upstream's (2 for usage errors, 1 when ssh cannot start, otherwise ssh's status), and a destination is cached only after the session exits 0. The flow lives in v7_core::ssh behind a Host trait and the cache rules in v7_core::ssh_cache behind a Store trait, so both are tested on Linux against upstream's own test cases.

TERM is xterm-ghostty, falling back to xterm-256color. Voyager7's VT is libghostty-vt: the parser, modes, replies (DA, XTVERSION, DECRQM, kitty keyboard and graphics) and capabilities that Ghostty's terminfo entry describes are the same code, so that entry is the accurate description of what remote programs talk to. A Voyager7-named entry would describe the same thing under a name no program, distribution or ncurses release knows. The entry is not copied or retyped: scripts/gen-ghostty-cli.py runs the pinned src/terminfo/ghostty.zig under Zig (scripts/ghostty-terminfo.zig), so data/xterm-ghostty.z is byte for byte what Ghostty installs and the cache records Ghostty's content-derived version (cli/terminfo.rs). A host Ghostty set up therefore counts as set up here, and re-pinning Ghostty changes the version, which reinstalls on the next connection, as upstream does. Where the install cannot happen (--terminfo=false, no tic, no write access), TERM is xterm-256color, which every host knows. Identity stays separate from capability: TERM_PROGRAM=Voyager7 says which terminal this is. One capability depends on the Windows path rather than the VT, and programs probe it rather than assume it: the kitty keyboard protocol (fullkbd) is not offered on the Windows 7 hook or inbox ConPTY, where encoded keys cannot reach the program, so they keep legacy keys there.

The cache is %LOCALAPPDATA%\Voyager7\ssh_cache (Ghostty's $XDG_STATE_HOME/ghostty/ssh_cache), one destination|unix seconds|version line each, newest line winning, at most 512 KiB, replaced atomically. Keys, [ipv6]:port brackets, queries (user@host exact, bare host any user and port, host:port any user), the listing (2026-05-05T22:49:33Z (2w ago)), --prune durations and every message match src/cli/ssh_cache.zig. Windows has no file locks here, as upstream on Windows.

Windows-specific behaviour:

  • voyager7.exe is a GUI program, so +ssh joins its parent's console (keeping redirected handles) before starting ssh, and outlives Ctrl+C so it can report ssh's status; voyager7.com waits as for every action. Without a parent console, children get no console window.
  • ssh is looked up as ssh, ssh.com or ssh.exe in each PATH folder only, not in the current folder or Voyager7's own; --ssh=<path> takes a path, with or without .exe. Windows 10's System32\OpenSSH, Git for Windows' usr\bin\ssh.exe and a portable Win32-OpenSSH on Windows 7 all work, and arguments are quoted with the CRT rules that all three parse.
  • The install connection uses -o ControlMaster=no -o ControlPath=none instead of upstream's private short-lived master, which Win32-OpenSSH cannot create. Both keep the install out of a multiplexed connection from the user's ssh config. ssh -G output may end lines in CRLF.
  • The install connection gets its own arguments, not all of the session's (v7_core::ssh::install_args): the destination plus only the options that say how to reach and log in to the host (-p -l -i -F -o -J -b -c -m -B -E -I -P and -1 -2 -4 -6 -a -C -k -K -q -v -y), led by -T -o RemoteCommand=none -o ClearAllForwardings=yes. Upstream appends its script to every argument, so ghostty +ssh -tt host gives tic a pty whose input never ends and waits forever, -L/-R forwards are opened twice, and a remote command (+ssh host tmux attach) receives the script as arguments.
  • -h before ssh's arguments prints help, as for every action above; upstream would run ssh -h. As upstream, a second +word anywhere is a second action and an error.

Shell integration: Ghostty's ssh-env and ssh-terminfo features (off by default) make the shell's ssh run ghostty +ssh with --forward-env=false or --terminfo=false for a missing feature. Voyager7 does the same in its PowerShell hook (Windows PowerShell 2.0 and later, pwsh), calling the voyager7.com beside the running voyager7.exe so PowerShell waits for it. cmd's integration is only its PROMPT; it has no functions and the command line is never rewritten, so cmd users run voyager7 +ssh or a doskey macro.