Keyboard shortcuts
Every default key: how to split the terminal, move between panes and tabs, copy mode, the keys of the Shepherd section and the desktop app, and the CLI command behind each action.
Shepherd is mouse-native: you can click panes, tabs and workspaces, drag the borders between split panes and use right-click menus without learning a single key. The keyboard is optional. This page lists every default key, how to split the terminal, and the CLI command behind each action.
Where each set of keys works
| Where | Keys | See |
|---|---|---|
Terminal UI (shepherd --tui) | The prefix keys (ctrl+b then a letter): split, move, zoom and resize panes, tabs, workspaces, copy mode. | Prefix keys |
| Shepherd section of the terminal UI | Press prefix+a, then digits 1 to 7 switch tabs and each tab has its own letters. | Terminal UI keys by tab |
Desktop app (shepherd --gui) | No prefix. Ctrl+Shift+P command palette, Ctrl+B sidebar, Ctrl+1..Ctrl+9 views, Ctrl+Shift+S Terminal or Shepherd. The desktop app does not split panes: use the terminal UI or shepherd pane split. | Where each set of keys worksThe prefixLearn these five firstPanes: split, move, zoom, resizeTabsWorkspaces and the sessionCopy modeEditing text fieldsThe same actions from the CLIChange any keyThe window |
| CLI | Every action has a command that talks to the same server. | The same actions from the CLI |
The prefix
A terminal multiplexer sits between your terminal and the programs inside it, and those programs already use most key combinations (ctrl+c interrupts, ctrl+r searches history, editors claim the rest). So Shepherd reserves one key, the prefix, ctrl+b by default: press it, release it, and the next key goes to Shepherd instead of the program. prefix+c means: press ctrl+b, release, press c.
Press prefix+? at any time to see every active binding; / filters them.
Learn these five first
| Action | Key |
|---|---|
| New tab | prefix+c |
| Split right / down | prefix+v / prefix+minus |
| Move between panes | prefix+h j k l |
| Workspace picker | prefix+w |
| Detach and leave everything running | prefix+q |
They cover most daily movement. Everything else can stay on the mouse.
Panes: split, move, zoom, resize
| Action | Key |
|---|---|
| Split right (side by side) | prefix+v |
| Split down (one above the other) | prefix+minus |
| Move to the pane on the left, below, above, right | prefix+h / j / k / l |
| Next / previous pane | prefix+tab / prefix+shift+tab |
| Zoom the focused pane (again to restore) | prefix+z |
Resize mode (prefix+? shows its keys) | prefix+r |
| Swap the pane with its neighbour | prefix+shift+h / j / k / l |
| Close the pane | prefix+x |
| Rename the pane | prefix+shift+p |
| Copy mode (scroll back, search, select) | prefix+[ |
| Open the scrollback in your editor | prefix+e |
prefix+v prefix+minus
┌────────┬────────┐ ┌─────────────────┐
│ │ │ │ │
│ pane │ new │ ├─────────────────┤
│ │ │ │ new │
└────────┴────────┘ └─────────────────┘With the mouse: click a pane to focus it, drag a border to resize it, right-click for the menu.
Tabs
| Action | Key |
|---|---|
| New tab | prefix+c |
| Next / previous tab | prefix+n / prefix+p |
| Jump to tab 1 to 9 | prefix+1 .. prefix+9 |
| Rename the tab | prefix+shift+t |
| Close the tab | prefix+shift+x |
Workspaces and the session
| Action | Key |
|---|---|
| Workspace picker | prefix+w |
| Goto picker: every agent and terminal, grouped by workspace | prefix+g |
| New workspace | prefix+shift+n |
| New worktree | prefix+shift+g |
| Rename / close the workspace | prefix+shift+w / prefix+shift+d |
| Show or hide the sidebar | prefix+b |
| Open the Shepherd section (agents, tasks, runs, patterns...) | prefix+a |
| Settings | prefix+s |
| Open the target of the latest notification | prefix+o |
| Reload the config | prefix+shift+r |
Show every active binding (/ filters) | prefix+? |
Detach, leaving every agent running (run shepherd --tui to come back) | prefix+q |
In the Goto picker (prefix+g) every agent or terminal has its own row, grouped by workspace. Press / to search names, agent kinds, tabs, workspaces, branches or paths; Enter jumps to the row. Outside the search, b w i d filter blocked, working, idle or done agents and a shows everything again.
Copy mode
Press prefix+[ to enter copy mode for the focused pane. The pane keeps running while you read its history.
| To | Keys |
|---|---|
| Move | h j k l, words w b e (big words W B E), paragraphs { }, PageUp PageDown, ctrl+u ctrl+d |
| Search | / forward, ? backward, then n / N to repeat. Case-insensitive unless the query has a capital letter |
| Select and copy | v or Space starts a selection, y or Enter copies it |
| Leave | q or Esc (the first Esc clears a selection or a search) |
Dragging with the mouse copies without entering copy mode.
Editing text fields
The naming dialogs, branch fields and filters of Shepherd edit at the cursor. These keys apply to Shepherd's own fields, not to the shell or agent inside a pane.
| Action | Keys |
|---|---|
| Move one character | Left / Right, ctrl+b / ctrl+f |
| Start / end of the line | Home / End, ctrl+a / ctrl+e |
| Move one word | alt+b / alt+f |
| Delete the previous / next character | Backspace, ctrl+h / Delete, ctrl+d |
| Cut to the start / end | ctrl+u / ctrl+k |
| Cut the previous / next word | ctrl+w, alt+Backspace / alt+d |
| Paste the last cut text | ctrl+y |
The same actions from the CLI
Every key calls the same server operation as a CLI command, so you can split panes and open tabs from a script or from another terminal:
| Action | Command |
|---|---|
| Split a pane | shepherd pane split --direction right|down [--current] [--cwd PATH] |
| Move focus | shepherd pane focus --direction left|right|up|down |
| Zoom | shepherd pane zoom [PANE_ID] |
| Resize | shepherd pane resize --direction left|right|up|down |
| Swap | shepherd pane swap --direction left|right|up|down |
| Close a pane | shepherd pane close PANE_ID |
| New tab / focus / rename / close | shepherd tab create [--workspace ID] [--cwd PATH] [--label TEXT], tab focus ID, tab rename, tab close |
| Workspaces | shepherd workspace list, create, focus, rename, close |
| List panes and read one | shepherd pane list, shepherd pane read PANE_ID |
The desktop app does not split panes. To split the terminal use the terminal UI (shepherd --tui) or shepherd pane split.
Change any key
Every binding is configurable, including the prefix, in the [keys] table of config.toml:
[keys]
prefix = "ctrl+a" # a different prefix
split_vertical = ["prefix+v", "ctrl+alt+d"] # several keys for one action
focus_pane_left = ["prefix+h", "ctrl+alt+h"]shepherd --default-configprints the whole commented default config, with every action and its default key.shepherd config reset-keysbacks upconfig.tomland goes back to the built-in keys.- Plain printable keys such as
nare unsafe as direct bindings because they steal typing; bind them withprefix+. For direct chords,ctrl+alt+letteris the safest family: terminals and desktops leave it free. Avoidctrl+alt+arrows,ctrl+alt+t,ctrl+alt+l,ctrl+alt+s,ctrl+alt+uandctrl+alt+f1..f12, which desktops and terminals use. If a direct chord does nothing, your terminal or desktop consumed it first.
The window
Top bar and sessions
The top bar holds the Terminal | Shepherd switch. A row of sessions lists the servers known to the shepherd binary. From it you can:
- switch to another session,
- create a new one with
+(it starts a named server), - close one with
×: the first click warns, the second stops it, and on a stopped session it deletes it.
Closing and deleting always take two clicks, because the app has no pop-up dialogs.
Shortcuts
| Keys | Action |
|---|---|
Ctrl+Shift+S | Switch between Terminal and Shepherd |
Ctrl+Shift+P | Open the command palette |
Ctrl+B | Show or hide the sidebar |
Ctrl+1..Ctrl+5 | Workspace views: Overview, Runs, Agents, Tasks, Patterns |
Ctrl+6..Ctrl+9 | Inspect views |
The command palette runs any action by name: type to filter, Up and Down to move, Enter to run, Esc to close.
Run shepherd --tui in your repository, then press ctrl+b a to open the Shepherd section. ctrl+b q detaches and shepherd --tui reattaches. Esc leaves the section.
Digits 1 to 7 switch tabs: Agents, Tasks, Runs, Patterns, Skills, Git, Events. The bottom line always shows the keys of the tab you are on. Actions that destroy something show a confirmation line: Enter confirms, Esc cancels.
Terminal UI keys by tab
1 Agents
| Key | Action |
|---|---|
↑ ↓ | Select an agent |
Enter | Open its terminal |
s | New agent (a form: role, task, vendor/model, worktree, extra skills) |
l | Link the agent to a task (a number), or detach it (empty) |
t | Snapshots of the agent |
K | Kill (asks first) |
x / X | Clean this finished agent / clean all finished ones (asks first) |
r | Refresh |
u | Resume: mark the agents a server restart left behind (starts nothing) |
Snapshots (after t): c capture, d / D diff against the previous snapshot or the current worktree, f restore one file, R restore everything (saves a pre-restore first), x delete, p prune, Tab finished agents, Esc back.
2 Tasks
n new, e edit (opens your editor), i import a GitHub issue, a archive, D delete for good (asks first; refuses a task with a live agent).
3 Runs
l start a run for the selected task, c cancel it, a approve the waiting gate, d reject it.
4 Patterns
n new, e edit, c duplicate, v validate, d delete.
5 Skills
c switches between the catalog and by agent.
- Catalog:
nnew,gmake global,ddelete. - By agent:
Spaceturns the skill on or off for that agent,rrestores it. Changes apply the next time the agent starts.
6 Git
w new worktree, b new branch, p publish (approves the subtask waiting on that branch), t snapshots, x delete a worktree, c copy the path.
7 Events
Tab switches between two sub-views.
- Topics and flow:
Spacepause,rreplay from an offset,/filter,nnew topic (nameorname:partitions),mmessage for the selected topic,Cclear the bus (asks first). - Pattern runs:
ppause or resume,xstop,Ddelete the selected run (an active one is stopped first),Cforget finished runs.
Tips
- The typed prompts (
n,m,l) takeEnterto send andEscto drop. - Every key calls the same server operation as the CLI command and the app button; see the API reference.