KOSHI0.6.0
CLI
v0.5clifield manual

Pane commands

Create, run, move, close, resize, focus, scroll, fullscreen, and write to panes from any shell.

Inside koshi, omitted targets use the current session, tab, pane, or client. Outside koshi, pass a target unless exactly one running session can be chosen.

These verbs take --remote <SERVER> to act on a session on another machine. See Remote commands.

new-pane

Open a shell pane:

koshi new-pane
koshi new-pane --direction left
koshi new-pane --stacked

Main flags:

FlagMeaning
--direction right|down|left|upOpen the new pane beside its target
--stackedAdd it to the target's stack
--pane <PANE_ID>Split this pane
--tab <NAME_OR_ID>Create inside this tab
--session <NAME_OR_ID>Choose the session
--client <CLIENT_ID>Use this client's current view

--direction and --stacked are alternatives. The command prints one pane id.

A new pane's working directory and environment come from the terminal that issued the command.

run

Open a pane running one command:

koshi run -- htop
koshi run --direction down -- cargo watch -x test

Split flags match new-pane. Everything after -- is the command and its arguments. The command prints one pane id.

close-pane

koshi close-pane
koshi close-pane --pane <PANE_ID>
koshi close-pane --pane <PANE_ID> --force

Closing the last pane closes its tab. --force kills the pane's program at once instead of asking it to stop first.

resize-pane

koshi resize-pane --direction right
koshi resize-pane --direction left --size 4 --pane <PANE_ID>
koshi resize-pane --direction right --size -2

Directions are right, down, left, and up. A positive size grows toward that direction; a negative size shrinks from that side.

focus-pane

koshi focus-pane --pane <PANE_ID>
koshi focus-pane --pane <PANE_ID> --client <CLIENT_ID>

Focus belongs to a client. --client chooses which attached terminal moves.

move-pane

Swap a pane with its visible neighbor immediately, without a preview or confirmation:

koshi move-pane --direction right
koshi move-pane --direction left --pane <PANE_ID>
FlagMeaning
--direction right|down|left|upChoose the visible neighbor in this direction
--pane <PANE_ID>Pane to move; defaults to the focused pane

This command swaps panes. To move an existing pane into another tab's tiled layout, use place-pane:

koshi place-pane --pane <PANE_ID> --tab <TAB> --direction right
koshi place-pane --pane <PANE_ID> --tab <TAB> --direction down --client <CLIENT_ID>

--pane, --tab, and --direction are required. --tab names the destination tab by id or name. --direction selects the side of that tab where the pane is inserted. --client is optional and selects the client whose view sizes the destination layout.

scroll-pane

koshi scroll-pane --lines 10
koshi scroll-pane --lines -10 --pane <PANE_ID>
koshi scroll-pane --lines 5 --client <CLIENT_ID>

Scrolls one client's view of a pane. A positive count moves toward history; a negative count moves toward the newest output. --pane defaults to the client's focused pane, and --client defaults to the issuing client.

toggle-pane-fullscreen

koshi toggle-pane-fullscreen
koshi toggle-pane-fullscreen --client <CLIENT_ID>

Fill the current tab with its focused pane, or restore the prior layout. The fullscreen view belongs to one client; --client names which one.

input

koshi input --pane <PANE_ID> "cargo test"
koshi input --pane <PANE_ID> --no-enter "git status"

Text is followed by Enter unless --no-enter is present.

On this page