Workspaces and panes

The flat commands for worktrees, panes and tabs.

Beyond panel, sirioctl uses flat command names that mirror cmux’s CLI.

Workspaces

A workspace is a worktree, one row under the sidebar’s Projects tab.

bash
sirioctl list-workspaces --json
sirioctl current-workspace
sirioctl new-workspace --project <project> [--branch <branch>]
sirioctl select-workspace --workspace <worktree>
sirioctl close-workspace --workspace <worktree>
sirioctl worktree-set --worktree <worktree> --comment 'Parser rewrite'
sirioctl restore-session

list-workspaces prints each worktree’s id, project, branch, path and whether it is the selected one, and --json adds mounted and comment. current-workspace prints the selected worktree’s project, branch, path and id. Wherever a command takes --workspace or --worktree, give it an id from that list or the worktree’s path. panel create, panel list and the commands of surface changes that run git take a worktree that list-workspaces --json shows as mounted, which means the selected one or one you selected since Sirio started and kept open. Any other answers unknown worktree, so run select-workspace first.

new-workspace runs git worktree add in the project you name by its id, name or path. It checks out --branch, and creates that branch from HEAD when it does not exist yet. Leave the option out and Sirio makes up a name such as wt-1759230000. A branch that already has a worktree stops the command, and so does a project outside git. On success it prints an id for the new worktree and adds the worktree under its project in the sidebar, with its directory under sirio-worktrees in the system’s temporary directory.

select-workspace selects a worktree as a click in the sidebar does. close-workspace unmounts one. It stops the panels that sirioctl panel started there and lets go of the terminals and tabs Sirio kept for it in the background. When it is the selected worktree, it also closes every open tab without asking, and its chats move to Closed in the sidebar’s Sessions tab. The worktree keeps its directory and its row in the sidebar. Right after you close the selected worktree, no worktree is current, and current-workspace answers no current workspace. The next refresh of the project list, which follows window focus, new-workspace or a new project, makes the worktree the window still shows current again. A script that needs a current worktree should select one first.

worktree-set gives a worktree a comment, a session, or both, and needs at least one of them. The comment takes the second line of the worktree’s card in the sidebar, where the name of its last task otherwise sits, the sidebar’s filter finds it, and it survives a restart. --session ties a pane id to the worktree, so sirioctl identify run from that pane reports this worktree.

restore-session does what History: Restore Previous Launch does in the command palette, Ctrl+Shift+O, or Ctrl+Shift+H on Windows.

Panes and tabs

bash
sirioctl pane split right
sirioctl pane focus left
sirioctl pane close
sirioctl tab cycle backward
sirioctl tab select 2

The pane commands work on the splits inside the active tab of the selected worktree. pane split opens a new shell beside the focused pane, to the right, left, down or up, and focuses it. pane focus moves to the neighbouring pane in the direction you give, and pane close closes the focused pane of a split tab. A tab with a single pane stays open, and surface tabs close closes a tab. pane split is the one that splits a terminal you can see: the panels of sirioctl panel run inside Sirio without a place in the window.

tab cycle moves forward, or backward when you say so, and tab select takes a position that counts from 1, with 9 always picking the last tab. Both count only the tabs of the centre half that has focus, left or right, the same way the keyboard does.

The surface commands, which open and read Changes, Settings, pull requests, every tab in either half and a file’s text, have a page of their own, and the browser has sirioctl browser.