Reference·The shellIndex

The shell

Keys, composer prefixes, header, footer and turn bar of the terminal UI.

.mdllms.txt

The shell is the terminal UI. It attaches to the gateway, the local server of a running Nodecode.

Turn

A turn is one prompt and the work the model does to answer it. One turn runs per session at a time.

ActionResult
Enter, no turn runningStarts a turn.
Enter, turn runningSteers. The running turn ends at its next round boundary. Your message runs next.
Tab, turn runningQueues the prompt behind the running turn.
Up, a prompt is queuedTakes the newest queued prompt back into the composer.
Enter on an empty composer, after Up took a prompt backDrops that prompt.
Esc, turn runningInterrupts the turn.
Esc, the turn produced nothingThe prompt returns to the composer. Applies to a turn this shell started.
Ctrl+CClears the composer. Empty composer: interrupts the turn. No turn: quits.
Left, empty composerLeaves the session running. Opens /sessions on a fresh session.

Global keys

KeyAction
EnterSubmit.
TabQueue the prompt while a turn runs. Idle: accept the highlighted suggestion. Empty composer under a cell's status row that offers something: take it, the row's key hint says what. See Status rows.
Shift+Enter, Alt+Enter, Ctrl+JInsert a newline.
Up, DownPrevious or next prompt. In a dropdown: previous or next suggestion.
Ctrl+NNext suggestion.
Ctrl+PEmpty composer: insert /. Dropdown open: previous suggestion.
Ctrl+ROpen or close the prompt history picker.
Ctrl+SOpen or close the sessions picker.
Ctrl+OSwitch the viewport between Standard and Developer.
Ctrl+FGive an open dialog the full window height.
PgUp, PgDnScroll the transcript.
Home, EndEmpty composer: jump to the transcript top or bottom.
?Empty composer: open keyboard help.
Ctrl+V, Ctrl+Alt+VPaste an image from the clipboard. In a dialog: paste clipboard text.
Ctrl+Shift+CCopy the selection.
EscInterrupt the turn. Idle: close the newest toast.
Esc, Esc within 0.5 sIdle: open /tree.
Ctrl+CClear the composer, then interrupt the turn, then quit.
Ctrl+QQuit.
Ctrl+DEmpty composer: quit. With text: delete the character at the cursor.

Composer editing

KeyAction
Ctrl+Left, Alt+Left, Alt+BBack one word.
Ctrl+Right, Alt+Right, Alt+FForward one word.
Ctrl+A, HomeLine start.
Ctrl+E, EndLine end.
Ctrl+Home, Ctrl+EndStart or end of the text.
Ctrl+B, Ctrl+FBack or forward one character.
Up, DownOne visual row up or down.
Ctrl+W, Ctrl+Backspace, Alt+BackspaceDelete the previous word.
Alt+D, Ctrl+Delete, Alt+DeleteDelete the next word.
Ctrl+D, DeleteDelete the character at the cursor.
Ctrl+KDelete to line end.
Ctrl+UDelete to line start.
Ctrl+TSwap two characters.
Alt+C, Alt+L, Alt+UCapitalize, lowercase or uppercase a word.
PasteShown as
Text over 10 lines or 1000 characters[Paste #N]. The full text is sent.
Image[Image #N]

Dialog keys

KeyAction
Up, Down, Ctrl+P, Ctrl+NMove the selection.
PgUp, PgDn, Home, EndPage the list or jump to an end.
EnterSelect.
EscClear the search. Empty search: close.
TypingFilter the list.
Ctrl+UClear the search.
Ctrl+W, Ctrl+BackspaceDelete a word of the search.
SpaceToggle a mark. In /cells: turn the cell on or off.
Left, RightFold or unfold rows in /sessions and /tree.
Delete, Ctrl+XInterrupt an exec in /execs. Delete a profile in /profile. It asks first.
F2Rename the highlighted session in /sessions.
Tab, Shift+TabNext or previous tab, for example in /usage. Left and Right too, where no fold takes them.
Ctrl+FFull height.
Ctrl+VPaste clipboard text into the field.

Mouse

GestureAction
WheelScroll.
Drag the scrollbarScroll.
Click a tool cardExpand it.
Click a linkOpen it.
Click the exec bandUnfold or fold its lines. Its stop control interrupts the exec.
Drag over textSelect. Release copies.
Click the × on a toastClose it.
Click a dialog rowConfirm it.
Click a dialog's tabShow that tab, as Tab does. In /usage, /models and the other tabbed dialogs.
Click a key hintPress that key: esc, enter, tab, ctrl+f and the rest a dialog, /settings, /cells or /generations names.
Click a / dropdown rowChoose it, as Enter does.
Click a footer partOpen what it names. See Footer.

Composer prefixes

PrefixOpens
/The command dropdown. See Slash commands.
@Workspace file completion. Hidden files, node_modules, target, zig-cache, zig-out, bazel-bin, bazel-out and bazel-testlogs are skipped. At most 512 files, 10 folders deep. A path that starts with ~/, ../, ./ or / (on Windows also C:\ and \) completes from that one folder instead, as a shell does: a folder goes on into it, and hidden names show once you type the leading ..
$ at the start of a word/index. Knowledge: the meter and the picker.
! at the start of the draftA command run here. See Running a command here.

Running a command here

!git status and Enter runs git status on the machine this terminal runs on, in the folder Nodecode started in, through sh -c (Git for Windows' sh on Windows). Nothing goes to the session: the command and its output stay in this terminal until you attach them.

In the viewDoes
The rowsIts output as it comes, colours and cursor moves removed, its last 2,000 lines kept. The header says running, then how it ended: exit 0, exit 2, stopped.
Enter, once it endedPuts the command and its output in the composer, [exit N] last when N is not 0, as a [Paste #N] past the paste size. Send it with a question, or clear it.
Ctrl+XStops it, and everything it started.
EscCloses the view, and stops it when it still runs.

The command reads nothing from the keyboard, so a program that asks a question gets no answer and ends. Up brings the ! line back like a prompt. A draft that starts with a blank, !important, is sent as a prompt. When a cell made ! its trigger, typing ! opens that cell's list instead; Esc closes it, and the draft then runs here as above.

SideShows
LeftThe session title. In the Developer viewport, then · session-id. Blank on the home screen and in setup.
RightN.N%/WINDOW: context use over the model's window. ctx N when the window is unknown.
Rightevicts at N from 75% of the window, N the eviction line. evicts next request once past it.
Right, Standardcache N%: the share of the session's input served from cache.
Right, Developer↑ input (cache N%): input tokens of the session.
Right, Developer↓ output (reasoning N): output tokens of the session.
Right, Developer$cost, when the cost is known.

Windows under 12 rows have no footer.

SideShows
Leftprovider model (effort) · ← sessions
Left, sessions running← sessions · N running
Left, target unknown yetsetting up…
Left, no model configuredrun /setup to add a model
Rightprofile · folder · Gateway
Right, signed in to nodecode.aiThe account's meter first: the plan's name, then its requests left, or the API credit once that pays. An unlimited account reads Unlimited ∞.

Every part is a link. A second click on one closes the dialog it opened.

PartOpens
The model/models
(effort)/think
← sessions/sessions
The account's meter/usage, the account first
The profile/profiles
The folderThe folder, as a file:// link
GatewayThe web page, on Sessions

The meter's colour says what pays: the plan with a tenth or more left; low once under a tenth, or when a spent plan's credit pays; danger when nothing can pay. Gateway's colour alone shows the connection: connected, connecting or reconnecting, failed. A narrow window drops the profile and the folder, then the meter, then Gateway. Sign in with nodecode login or /login.

Turn bar

The bar shows while a turn runs.

PartMeaning
SpinnerThe turn is running.
VerbThe current activity, waiting on the model, or the retry status. A 429 or 5xx retry adds /models to switch.
ClockElapsed time.
quiet NHow long a quiet stream has waited.
Token meterTokens of this turn. Developer viewport only.
ctx N%Context use. Shown from 75%.
Stop keyesc stop

While a turn runs, type into the composer to steer it. With text in it, the composer shows enter steer and tab queue.

A failed or interrupted turn leaves a resting bar with elapsed time and outcome.

keybinds.json

Override keys in ~/.nodecode/keybinds.json. The file is one JSON object: action name to chord.

Example: {"toggle_viewport": "ctrl+t", "help": "none"}.

A key that starts with / binds a slash line instead of an action: {"/details developer": "ctrl+g"}. The chord runs the line as if typed and entered, built-in or cell command alike, and leaves the composer's text where it stands.

Slash binding ruleDetail
CollisionAn action's chord, default or overridden, wins: the binding is dropped. Without ctrl a letter's case stands in for shift, so alt+shift+r collides with alt+r. With ctrl the shift decides: ctrl+shift+y binds beside ctrl+y, and answers only in a terminal that reports the shift (the kitty keyboard protocol: Ghostty and kitty, WezTerm with enable_kitty_keyboard); elsewhere the press arrives as ctrl+y.
Editing keysA binding is read before the composer, so it takes a chord such as alt+u from it.
Typing keysA chord with neither ctrl nor alt binds only F1 to F12; q or shift+x would take a letter from typing, so the binding is dropped.
Open dialogThe dialog keeps its keys; the binding waits.
Unknown commandPressing the chord says so in the composer status.
Malformed chordThe binding is dropped.
RuleDetail
ChordModifiers ctrl (or mod), alt, shift and one key, joined by +.
Key namesenter, tab, esc, backspace, delete, up, down, left, right, space, pgup, pgdn, home, end, f1 to f12, or one character.
OverrideOne chord replaces every default chord of that action.
"none"Unbinds the action.
Malformed chordThe defaults stay.
Unreadable fileIgnored.
Action nameDefault
quitctrl+q, ctrl+d
submitenter
submit_turn_queuetab
insert_newlineshift+enter, alt+enter, ctrl+j
accept_suggestiontab
history_previousup
history_nextdown
history_dialogctrl+r
sessions_dialogctrl+s
renamef2
toggle_viewportctrl+o
toggle_dialog_fullscreenctrl+f
page_uppgup
page_downpgdn
scroll_homehome
scroll_endend
help?
open_command_palettectrl+p
paste_imagectrl+v, ctrl+alt+v
copy_selectionctrl+shift+c

The composer editing keys and Esc are fixed.

Esc

    Loading the index…

    ↑↓ moveEnter openEsc close