SHEPHERDdocs Search the docs/ v0.5.3-beta
On this pageWhere 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 windowTerminal UI keys by tabTips

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.

Works inDesktop appTerminal UI

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

WhereKeysSee
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 UIPress 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
CLIEvery 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

ActionKey
New tabprefix+c
Split right / downprefix+v / prefix+minus
Move between panesprefix+h j k l
Workspace pickerprefix+w
Detach and leave everything runningprefix+q

They cover most daily movement. Everything else can stay on the mouse.

Panes: split, move, zoom, resize

ActionKey
Split right (side by side)prefix+v
Split down (one above the other)prefix+minus
Move to the pane on the left, below, above, rightprefix+h / j / k / l
Next / previous paneprefix+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 neighbourprefix+shift+h / j / k / l
Close the paneprefix+x
Rename the paneprefix+shift+p
Copy mode (scroll back, search, select)prefix+[
Open the scrollback in your editorprefix+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

ActionKey
New tabprefix+c
Next / previous tabprefix+n / prefix+p
Jump to tab 1 to 9prefix+1 .. prefix+9
Rename the tabprefix+shift+t
Close the tabprefix+shift+x

Workspaces and the session

ActionKey
Workspace pickerprefix+w
Goto picker: every agent and terminal, grouped by workspaceprefix+g
New workspaceprefix+shift+n
New worktreeprefix+shift+g
Rename / close the workspaceprefix+shift+w / prefix+shift+d
Show or hide the sidebarprefix+b
Open the Shepherd section (agents, tasks, runs, patterns...)prefix+a
Settingsprefix+s
Open the target of the latest notificationprefix+o
Reload the configprefix+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.

ToKeys
Moveh 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 copyv or Space starts a selection, y or Enter copies it
Leaveq 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.

ActionKeys
Move one characterLeft / Right, ctrl+b / ctrl+f
Start / end of the lineHome / End, ctrl+a / ctrl+e
Move one wordalt+b / alt+f
Delete the previous / next characterBackspace, ctrl+h / Delete, ctrl+d
Cut to the start / endctrl+u / ctrl+k
Cut the previous / next wordctrl+w, alt+Backspace / alt+d
Paste the last cut textctrl+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:

ActionCommand
Split a paneshepherd pane split --direction right|down [--current] [--cwd PATH]
Move focusshepherd pane focus --direction left|right|up|down
Zoomshepherd pane zoom [PANE_ID]
Resizeshepherd pane resize --direction left|right|up|down
Swapshepherd pane swap --direction left|right|up|down
Close a paneshepherd pane close PANE_ID
New tab / focus / rename / closeshepherd tab create [--workspace ID] [--cwd PATH] [--label TEXT], tab focus ID, tab rename, tab close
Workspacesshepherd workspace list, create, focus, rename, close
List panes and read oneshepherd 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-config prints the whole commented default config, with every action and its default key.
  • shepherd config reset-keys backs up config.toml and goes back to the built-in keys.
  • Plain printable keys such as n are unsafe as direct bindings because they steal typing; bind them with prefix+. For direct chords, ctrl+alt+letter is the safest family: terminals and desktops leave it free. Avoid ctrl+alt+arrows, ctrl+alt+t, ctrl+alt+l, ctrl+alt+s, ctrl+alt+u and ctrl+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

KeysAction
Ctrl+Shift+SSwitch between Terminal and Shepherd
Ctrl+Shift+POpen the command palette
Ctrl+BShow or hide the sidebar
Ctrl+1..Ctrl+5Workspace views: Overview, Runs, Agents, Tasks, Patterns
Ctrl+6..Ctrl+9Inspect 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

KeyAction
↑ ↓Select an agent
EnterOpen its terminal
sNew agent (a form: role, task, vendor/model, worktree, extra skills)
lLink the agent to a task (a number), or detach it (empty)
tSnapshots of the agent
KKill (asks first)
x / XClean this finished agent / clean all finished ones (asks first)
rRefresh
uResume: 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: n new, g make global, d delete.
  • By agent: Space turns the skill on or off for that agent, r restores 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: Space pause, r replay from an offset, / filter, n new topic (name or name:partitions), m message for the selected topic, C clear the bus (asks first).
  • Pattern runs: p pause or resume, x stop, D delete the selected run (an active one is stopped first), C forget finished runs.

Tips

  • The typed prompts (n, m, l) take Enter to send and Esc to drop.
  • Every key calls the same server operation as the CLI command and the app button; see the API reference.
Was this page useful?Suggest an edit on GitHub