Debug commands
Print running session state, solved layouts, and recent events for a bug report.
koshi debug prints diagnostics. Both subcommands accept --format table
(default) or --format json.
debug dump-state
koshi debug dump-state
koshi debug dump-state --format jsonPrints every running session, with its tabs, panes, and clients. Every session answers this command.
debug dump-layout
koshi debug dump-layout
koshi debug dump-layout --tab <NAME_OR_ID>
koshi debug dump-layout --format jsonPrints, for each tab: its split tree, the solved rectangles, panes with no room, stacks, and per-client focus.
Every client viewing one tab shares one set of sizes. The tab solves against the
smallest viewing terminal on each axis, minus the top tab bar row and the bottom
hint row. Two clients on one tab, one 80x24 and one 120x40, both print
viewport 80x22.
What is per client is the view: one client tiled and one with a pane fullscreen give that tab two sets of rectangles. A tab no client is viewing prints its tree and no rectangles.
debug events
koshi debug events
koshi debug events --since 30s --filter pane --format jsonPrints the last 1000 events each running session published, oldest first. Each
row names the time, event, session, client, tab, and pane ids. It never prints
command lines, pane output, or typed characters. A keystroke appears as
PaneTyped.
--since keeps events within a duration such as 30s, 5m, 2h, or 7d.
--filter keeps event names containing the given text, ignoring case. A
session started by an older koshi has no event buffer; the command says so.
A shell that emits OSC 133 prompt markers publishes PaneCommandStarted and
PaneCommandFinished for each command. Each event names only the pane and
never the command line or its output.
Command arguments are masked
A pane's command arguments print as ***; the program name stays visible.
mysql ***A pane running mysql -pHUNTER2 prints as mysql ***. Use
koshi inspect pane when you need the command in full.
Sessions older than this binary
A session that started before you installed this koshi cannot report its
layout. dump-layout says so and names what to do: restart that session, or
run dump-state, which every session answers.
Doctor
koshi doctor rates this machine's installation — config, shell, terminal, directories, router, session directory, and remote access — one row per check.
Update and versions
koshi update installs the newer release and restarts the running sessions into it; koshi version and koshi server-version show which build each side runs.