Augments LabsCrucible Code

Keys

Every key and mouse action the terminal interface answers, grouped by where you are when you press it. A key means one thing at the prompt and can mean another inside a panel, so each section below is one place. The prose version of most of this is in Run it; this page is the list. Slash commands are not keys: they are listed under Commands.

What holds everywhere

  • A Ctrl key here is Control held on its own. With Shift added the letter is a different key, and one crucible gives no meaning to, so Ctrl+Shift+C stays your terminal's copy. Any other letter held with Ctrl or Alt, and the function keys, do nothing, apart from closing the /help panel shown while a turn runs.
  • Shift-Enter opens a line only on a terminal that spells modified keys distinctly. Crucible asks for that spelling when it starts, a terminal without it discards the request, and there the press arrives as a plain Enter. Alt-Enter and Ctrl+J need nothing asked for. Ctrl+Enter is the same: VTE terminals such as GNOME Terminal, macOS Terminal, and tmux without extended-keys send it as a plain Enter, and there it does what Enter does.
  • A mark in any list stops at each end. It never wraps round.
  • The mouse is reported to crucible for the whole session. Hold Shift while you drag to hand the pointer back to your terminal's own selection.
  • With output.screen set to native the mouse is not reported at all, and the wheel, a drag and a click are your terminal's.
  • A click outside the rows of whatever is standing over the box is ignored, and so is a click on a blank cell beside what one of its rows drew; the pointer lights nothing there either. The wheel over a panel that is not a window over more text than it shows scrolls the transcript underneath it; over one that is, it walks the panel, and a notch the panel has no use for at either end goes to the transcript. The /help panel shown while a turn runs is the exception: a notch closes it.
  • Resizing the window redraws whatever is standing.

Writing a prompt

Editing

KeyWhat it does
EnterSends the prompt. Nothing while the box is empty. With the command list open, runs the marked command instead.
Shift-Enter, Alt-Enter, Ctrl+JOpens a line under the cursor. input.send set to altEnter swaps this with Enter: see input.
\ and the sending keyA backslash just before the cursor makes the sending press open a line instead, and the backslash goes.
Backspace, DeleteRubs out the character behind or ahead of the cursor.
Ctrl+W, Ctrl+Backspace, Alt-BackspaceRubs out the word behind the cursor.
Ctrl+URubs out from the cursor back to the start of its line.
Ctrl+KRubs out from the cursor to the end of its line.
TabNothing. A tab inside pasted text becomes four spaces.
Ctrl+YCopies everything in the box exactly as typed, by asking your terminal to put it on the clipboard. The row under the box says line copied once the request is sent. Nothing while the box is empty.
Ctrl+VPastes an image from the clipboard and puts a marker such as [Image #1] in the box. When nothing readable is there, the reason is written under the box.
Ctrl+CClears the box, every line of it. When the box is already empty the row says press ctrl+c again to leave, and a second press within two seconds ends the session.
Ctrl+DEnds the session, only while the box is empty.

A line here is the text between two newlines, so on a line long enough to have wrapped, Ctrl+U, Ctrl+K, Home and End reach its real ends rather than the edges of the row. The keys that clear, copy or end act on the whole box instead.

Text pasted from the terminal goes in whole, newlines included; every control character but tab is left out. A paste of more than 1,000 characters is shown in the box as a label such as [Pasted text 1234 chars] and sent in full. The prompt holds up to 1 MiB, and past that the row under the box says prompt is limited to 1 MiB.

The copy is a request written to the terminal (an OSC 52 request), so line copied means it was asked for. Under a terminal or multiplexer that ignores such requests the row still says line copied, and nothing reaches the clipboard. A prompt over 64 KiB of text is not copied at all, nor is anything when the output is not a terminal, and the row says the line is too long for the terminal to copy.

Moving

KeyWhat it does
←, →One character.
Ctrl+←, Ctrl+→, Alt-←, Alt-→, Alt-B, Alt-FOne word. A word is a run of anything that is not whitespace, so a path is one word.
Home, EndThe start or the end of the cursor's line.
↑, ↓To the line above or below, keeping the column. A line ends at a newline, not at the edge of the window, so they do not move between the rows of a paragraph that has wrapped. On the first or last line they walk the command list if one is open, the queue while prompts wait in it, and the history otherwise, where ↓ needs a walk already open.
Click in the boxPuts the cursor where you pointed.

History

↑ on the first line of the box, with no list open and no prompt waiting in the queue, walks back through the prompts sent from this directory, newest first, and keeps what it interrupted. The box need not be empty. ↓ walks forward again, and one step past the newest puts that text back. The top border of the box says where you are, such as history 80/100. Any edit ends the walk and leaves the text yours; moving the cursor does not. Each directory keeps at most its last hundred prompts between sessions, out of 512 kept across every directory, and a blank prompt or one longer than 1024 bytes is never kept. Run it tells the longer story.

The command list

While the box holds one word starting with /, the commands whose names begin with it stand in a list above the box, and a bare / shows all of them. ↑ and ↓ walk the list and Enter runs the marked command rather than the word as typed. Esc closes it and keeps the line; typing reopens it. Where there is no room for the whole of it, it shows as many commands as fit and ends on a row saying how many more there are, ↓ 2 more; once ↓ walks the mark past the last one shown, the list moves with it and a ↑ N more row stands over it. Under three rows it is not drawn, but it is still there: ↑ and ↓ still move its unseen mark. The commands themselves are under Commands.

Other keys at the prompt

KeyWhat it does
Shift-TabSteps the permission mode on the press: ask, allowEdits, fullAccess, then ask again. See Stepping it while you type.
Ctrl+BStands the list of commands left running. With none running it closes at once. A click on their count under the box does the same. While a turn runs it stands the list only when the turn has no command to leave in the background and one or more commands are left running: see While a turn runs.
Ctrl+OStands the results the transcript cut short. Nothing while none were cut.
Ctrl+TExpands the plan past its seven rows, or folds it back. Nothing without a plan. See Seven rows, and the key that gives the rest back.
EscCloses the command list, keeping the line. Nothing otherwise.
Ctrl+E, Ctrl+XTake the highlighted prompt of the queue back into the box, or delete it. Nothing while none are waiting.
Ctrl+EnterDoes what Enter does.
Ctrl+SSends the highlighted prompt of the queue alone, and the rest stay queued. Nothing while none are waiting.
Ctrl+RNothing between turns.
WheelScrolls the transcript.

While a turn runs

The box stays open while an answer streams in, and most keys mean what they mean at the prompt: editing, moving, the history walk, the command list, clicks, Ctrl+Y, Ctrl+V, Ctrl+T and the wheel. These differ:

KeyWhat it does
EscCloses the command list where one is open. Otherwise asks the turn to stop. The row above the box reads interrupting until it has. A search or a walk stopped this way answers with what it found: see Stopping one.
EnterQueues the prompt for the running turn. Up to 64 prompts and 1 MiB of text can wait; past either bound the prompt stays in the box and the row says typed-ahead prompts are limited to 64 lines and 1 MiB. A prompt that is a command is run or refused instead: see A command typed while a turn runs.
Shift-TabSteps the mode for the turn that starts next, and the row under the box says which. The running turn keeps the mode it began under.
Ctrl+CClears the box. When it is already empty it offers to leave as at the prompt, and the second press within two seconds stops the turn and ends the session.
Ctrl+DNothing.
Ctrl+BLeaves the running command in the background, where it can be, including in the seconds before its row offering (ctrl+b to background) is drawn (output.pinAfterSeconds). See Leaving one running. Where there is no such command and one or more commands are left running, it stands their Still running list, as a click on their count under the box does. Nothing otherwise.
Ctrl+OStands the cut results under the tail of the answer, which goes on arriving above them.
Ctrl+E, Ctrl+XTake the highlighted prompt of the queue back into the box, or delete it. Nothing while none are waiting.
Ctrl+Enter, Ctrl+SStop the turn and send the queue now: all of it with the line in the box last, or the highlighted prompt alone. Each prompt is sent as the line it was typed as.
TabNothing.

While the Ctrl+O view or the command list stands over a running turn, Esc closes it rather than stopping the turn. Its keys are under Results cut short and The command list. The queue has nothing to close: Esc stops the turn and leaves the prompts waiting as they are.

Reading the conversation

ActionWhat it does
WheelScrolls the transcript, six rows a notch unless CRUCIBLE_CODE_MOUSE_SCROLL_SPEED says otherwise, from 3 to 30. Sending a prompt takes you back to the foot.
Pointer over a cut resultLights it, every row of it, while the pointer is on the result's own text rather than a blank cell beside it.
Pointer over the scroll railLights the track and its marks, and draws the mark under the pointer larger.
Click on a cut resultStands that one result, in the view Ctrl+O stands them all in. The click counts on the result's own text; a blank cell beside it on the row opens nothing.
DragSelects the rows you cover, anywhere in the window, and letting go copies them. At the top or the foot the transcript scrolls under the pointer, and the wheel scrolls it while the button is still down. Resizing lets go of the selection.
Click on the scroll railOff the thumb, moves the transcript so the thumb is centred where you clicked, or as near as the rail's ends allow; a click on a prompt's mark lands on that prompt. A click on the thumb takes hold of it without moving it.
Drag on the scroll railScrolls the transcript with the pointer, holding the thumb where you took it; at the foot it follows the newest line again.

Moving through the transcript describes the scroll rail, and Run it the drag.

Answering a permission question

A call that needs your verdict stands a panel where the box was: The question.

KeyWhat it does
↑, ↓Moves the mark. While the explanation is open and was cut to fit, scrolls it instead.
1, 2, 3Takes that answer at once: Yes, once, Yes, and don't ask again this session, No, and end the turn.
EnterTakes the marked answer.
Ctrl+EOpens the explanation the call sent, under the command or the path, and hides it again. Only where the footer names it.
Esc, Ctrl+C, Ctrl+DRefuses, the same as No, and end the turn.
Anything elseNothing. The wheel scrolls the transcript.

The footer names the keys that apply: esc to cancel alone, or esc to cancel · ctrl+e to explain where the call sent an explanation and esc to cancel · ctrl+e to hide once it is open. An open explanation cut to fit adds ↑↓ to see more. The long version is about what Ctrl+E shows.

Where there is no room for the panel, or no keyboard, the question is asked a row at a time and one key answers it: y or Y runs the call once, s or S runs it and stops asking for the rest of the session, and anything else refuses, Enter, Esc, Ctrl+C and Ctrl+D among them. Down a pipe a whole line is read, so yes and session answer too. See The three answers.

Answering an ask_user question

A question the agent puts to you stands in the same place, and The keys introduces them. In full:

KeyWhat it does
↑, ↓Moves the mark down the answers.
←, →Steps to the next question or the one before, and onto the review stop of an ask that has one.
EnterTakes the marked answer and moves to the next stop, or sends from the last. On Something else with nothing written yet, it opens the line instead, and takes it on the next press. On the review stop, Send sends and Cancel leaves. Where several answers may be chosen, it moves on with what you have chosen and does not choose the marked one.
SpaceWhere several answers may be chosen, chooses the marked one or unchooses it.
nOpens a line for a note of your own beside the answer. Not on the review stop.
1 to 9Marks that answer and takes it. Where several may be chosen, it chooses or unchooses it instead. The number one past the last answer is the row under the rule, Say it in the prompt instead, and leaves. On the review stop, 1 sends and 2 cancels.
Esc, Ctrl+C, Ctrl+DLeaves the whole thing unanswered. Not while you are writing a line: then Esc stops writing, Ctrl+C clears what you wrote, and Ctrl+D does nothing.
Anything elseNothing. The wheel scrolls the transcript.

While you are writing a line, the editing keys edit it, and Enter or Esc stops writing and keeps what you wrote; the footer reads esc to stop typing · enter to keep it. Otherwise the footer is esc to cancel · n for a note for one question that takes one answer. Any other ask has a review stop and adds ←→ between questions. A question that takes several answers adds space to choose, and the review stop itself reads esc to cancel · ←→ between questions. Several questions at once is about that stop.

Pickers and panels

Every panel stood over the box reads the same few keys unless its section says otherwise: ↑ and ↓ move the mark, Enter takes it, and Esc, Ctrl+C or Ctrl+D leave it with nothing changed. A ladder such as /effort uses ← and → in place of the vertical arrows. Where the window has no room for a panel, it is not stood.

/resume

KeyWhat it does
Typing, pasteNarrows the list to the sessions whose title or branch holds the text, or the directory a row shows, ignoring case. With no match the list says no session holds "the text", or no session on <branch> where Ctrl+B left nothing and nothing is typed.
↑, ↓Walks the list. In a window 70 columns or wider, the preview beside it follows the mark.
EnterPicks up the marked session. On one recorded in another directory, whose preview says Enter to see how to resume, the picker stays open and says under the list the cd … && crucible --resume <id> that picks it up there, broken after the && onto a second row where one is too narrow. Nothing while nothing matches.
Ctrl+AShows every project's sessions; again, only this one's.
Ctrl+BKeeps the sessions recorded on the branch checked out here; again, every branch's. Nothing, and left off the keys row, where no branch is checked out.
Ctrl+WAdds the sessions of this repository's other worktrees; again, takes them away. Alt-Backspace rubs out a word of the search; Ctrl+Backspace does too where the terminal reports it as Backspace held with Ctrl, but a terminal that sends it as Ctrl+W toggles the worktrees instead.
EscClears the search and marks the top. With nothing to clear, leaves: cancelled, no session picked up.
Ctrl+ROpens a rename over the marked session's title. While it is open, typing and paste edit the title, Enter saves it (an empty one is refused with a title cannot be empty), and Esc closes it and keeps the search.
Ctrl+C, Ctrl+DLeaves, rename open or not.
Pointer, clickThe pointer lights a row. A click marks the row under it, and a click on the marked row picks it up.
WheelOver the list walks the mark; over the preview scrolls it; anywhere else scrolls the transcript.

Switching without restarting is about what picking one up does.

/model

KeyWhat it does
Typing, pasteNarrows both panes at once, and an edit puts the marks back at the top. Home, End and the word keys work on the search line.
TabCrosses between the provider pane and the model pane.
↑, ↓Walks the pane the mark is in. Stepping onto another provider puts the model and the rung back at the top.
←, →Steps the rung on the strip.
EnterTakes the model and the rung together. Nothing while no model matches.
Esc, Ctrl+C, Ctrl+DLeaves, changing nothing.
Pointer, clickThe pointer lights a row, and a click where nothing was lit lights it. A click on a lit provider narrows the shelf to it; a click on a lit model marks it, and one on the marked model takes it.
WheelScrolls the transcript. The shelf is not a window over more than it shows.

Typed while a turn runs, the shelf stands with an empty rung strip, and Enter stands a Switch model? panel under the footer esc to go back. Yes holds the model for the turn that starts next; No, Esc, Ctrl+C or Ctrl+D go back to the shelf. See A command typed while a turn runs.

/effort

← and → step the rung, Enter confirms it, and Esc, Ctrl+C or Ctrl+D leave with cancelled, no rung taken.

/fast

↑ and ↓ walk Standard and Fast, Enter takes the one marked, and Esc, Ctrl+C or Ctrl+D leave with cancelled, the speed is unchanged. Typed while a turn runs, the speed taken is asked for once the turn ends.

/context

Esc, Ctrl+C and Ctrl+D close it, and a resize redraws it; ↑ and ↓ scroll it where it is taller than the window, and the footer then reads esc to close · ↑↓ to see more. Enter and every other key do nothing. Typed while a turn runs, it stands over the turn with the figures that turn last reported, which include anything it has recorded since its last request.

/usage

Esc, Ctrl+C and Ctrl+D close it, and a resize redraws it; ↑ and ↓ scroll it where it is taller than the window, and the footer then reads esc to close · ↑↓ to see more. Enter and every other key do nothing. While it asks the plan for its limits, keys work as ever, and the block is drawn again when the answer comes. Typed while a turn runs, it stands over the turn with the totals and plan windows that turn last reported, and asks nothing.

/settings

←, →, Tab and Shift+Tab switch between the Status, Config and Usage tabs, and Esc, Ctrl+C or Ctrl+D close the panel. Turning to Usage between turns asks the plan for its limits as /usage does. On Config, ↑ and ↓ walk the rows and Enter or Space changes the one marked: a switch flips, a list of three or fewer moves to the next choice, a longer list opens under the row, and the scroll speed steps up, back to 3 after 30. On the scroll speed ← and → step it down and up instead. / starts a search that keeps the rows whose label holds what is typed; ↓ goes from it to the rows and Esc clears it. In an opened list ↑ and ↓ walk, Enter picks and Esc leaves the row as it was. Typed while a turn runs, it stands over the turn.

/theme

↑ and ↓ walk the list in view, ← and → switch between the interface list and the code list, and Enter takes what is marked. The specimen is redrawn from the marks on every frame, so leaving with Esc, Ctrl+C or Ctrl+D changes nothing. Commands describes the two lists.

/sandbox

← and → switch between the Sandbox and Dependencies tabs, and ↑ and ↓ walk the one in view. Enter on Enable sandbox or Disable sandbox does that; on any other row it writes that row into the transcript. Leaving writes sandbox settings unchanged.

/login

The first panel and each list take the common keys; the arrows pass over the Subscription and API key headings that stand over rows narrowed by words. Below the first screen Esc, Ctrl+C or Ctrl+D go back one screen with the mark where it was, and the footer reads esc to go back. On the first screen, and on one that words after /login opened directly, they cancel with cancelled, nothing signed in, and the footer reads esc to cancel.

The key box shows one mark per character and never the key. Typed characters and a paste go in (a paste is trimmed and its control characters dropped), Backspace rubs out the last character, Enter saves the key and does nothing while the box is empty, and Esc, Ctrl+C or Ctrl+D leave it as its footer says. The arrows do nothing here: there is no cursor to move. A key past 16 KiB is refused whole, and silently. A window too short for the box says the window has no room for the key box; make it taller and try /login again.

While an account login waits on the browser, Esc, Ctrl+C or Ctrl+D stops it and goes back; on a sign-in that words opened directly it cancels with cancelled, nothing signed in. Pressed as the sign-in is being stored, it waits for the write, up to ten seconds, and ends signed in where the write went through, or says ! the sign-in was being stored when it was stopped; /login shows what is stored. A sign-in that fails, is refused or expires ends with ! sign-in did not complete and what stays stored. Where a code is typed by hand instead, typing, paste and Backspace edit it and Enter submits it once it holds something. Past 16 KiB the row under the box says authorization input is limited to 16 KiB. Account login today names the accounts.

/logout

A panel headed Remove stored credential, with the common keys and the footer esc to cancel.

/help, and a command refused mid-turn

/help writes the list of commands into the transcript, and there is nothing to close. /release-notes stands a list of releases: Up and Down move, Enter prints the one chosen into the transcript, Esc closes it, and the foot of the list names these keys. It is refused while a turn runs. While a turn runs /help stands as a panel instead: any key closes it, and so does a click on its rows or a wheel notch, and a resize redraws it. A command that cannot act while a turn runs stands a panel saying so, with esc to close under it; Esc, Enter, Ctrl+C and Ctrl+D all close it. A word typed alone that names no command stands the same panel, saying the word back with the nearest command names, or pointing at /help when none is near, in place of a name and a reason.

A large session on pickup

The This session is large panel offers Carry on from summary, Carry all of it and Stop asking, under enter to choose · esc to carry it whole. Enter takes the marked answer and Esc, Ctrl+C or Ctrl+D carry the session whole. It is never asked down a pipe. See Picking up a large one.

Commands left running

Ctrl+B between turns stands the Still running list, under esc to close · enter shows it · x stops it. While a turn runs it stands the list when the turn has no command to leave in the background and one or more commands are left running; where the turn has one, the key backgrounds it instead. A click on their count under the box stands the list at either time, in fullscreen.

KeyWhat it does
↑, ↓Moves the mark.
EnterShows what the marked command has printed so far.
xStops it, with no confirmation. If the stop fails the panel says Stop failed; x retries.
ClickMarks the row under the pointer, and a click on the marked row shows it. The click counts on the row's own text; the blank after it marks nothing.
Esc, Ctrl+B, Ctrl+C, Ctrl+DCloses the list.
WheelScrolls the transcript.

Inside what one has printed, ↑, ↓ and the wheel scroll the output, Esc, Ctrl+B or Enter go back to the list, and Ctrl+C or Ctrl+D close the whole thing. Finding them again shows the list.

Results cut short

Ctrl+O stands every result the transcript cut, newest first, and a click on a result's (ctrl+o to expand) offer stands that one. A result no longer held in memory is read back from the session log when the view reaches it, one result's worth at a time: a further one the window reaches says read back from the session log as the view moves on to it until the one above it leaves, as does one the running turn has not written yet, and a step stops at each such result rather than passing it. Between turns the view takes the place of the box; while a turn runs it stands under the tail. Results cut after it opened are there the next time it is opened. In native mode the key is the way to a cut result, and an offer above a session resumed or new session divider belongs to a session no longer open. The footer reads esc to close; where there is more it reads esc to close · ↑↓ pgup pgdn to see more, and where there is more than one result it goes on · ←→ result 2 of 7, counting the result at the top of the view with the newest as 1. In a window too narrow for all of it, it loses whole parts from the right, and never esc to close.

KeyWhat it does
↑, ↓, wheelAn arrow moves a row up or down; a wheel notch moves as many rows as it moves the transcript, six unless CRUCIBLE_CODE_MOUSE_SCROLL_SPEED says otherwise. At either end, a notch the view cannot use scrolls the transcript.
PgUp, PgDnMoves by the rows the view shows, less one, so the row that was at one edge is at the other.
→, ←→ puts the top of the next older result at the top of the view, and ← the next newer. At the oldest or the newest it does nothing.
Ctrl+O, Esc, Ctrl+C, Ctrl+DCloses it.
Anything elseNothing, Enter included.

With one row of room the view gives it to the transcript and closes.

The queue

The prompts waiting behind a running turn stand in one panel over the box whenever any are waiting: a title counting them, up to three of them a blank row apart with one highlighted, and a footer naming the keys. Between turns the same panel holds the prompts left queued behind a turn that stopped on a used-up plan, until you send a prompt. You go on typing into the box under it; the panel only adds these keys:

KeyWhat it does
↑, ↓Moves the highlight, once the line in the box has no row above or below to move to and no command list is open. While prompts wait they do not reach the history. The three rows shown follow the highlight.
Ctrl+ETakes the highlighted prompt out of the queue and into the box at the cursor, where it can be edited or sent again. A prompt too long to go in beside what the box already holds (1 MiB together) stays queued and highlighted, and the panel says no room in the box · line stays queued until the next key. On an approval prompt it opens the explanation instead.
Ctrl+XDeletes the highlighted prompt; the box is left as it was.
Ctrl+EnterStops the turn as Esc does and sends every waiting prompt, oldest first, with the line in the box last, as the next turn, each as the line it was typed as. The panel goes and the box is left empty. With nothing waiting it stops the turn and sends the line in the box; with the box empty too it does nothing. A line in the box past the queue's bound stays there, the row says why, and the turn goes on; one that is a command is run or refused as Enter runs it. Between turns it is Enter.
Ctrl+SStops the turn as Esc does and sends the highlighted prompt alone as the next turn. The rest stay queued in order behind it, to be sent together when it ends, with the highlight on the prompt that followed; the line in the box stays in the box. Between turns it sends the highlighted prompt. Nothing while none are waiting, or once the turn has taken the highlighted one.

After Ctrl+E or Ctrl+X, the highlight stays where it was, on the prompt that followed, and the panel goes when the last prompt does. A prompt queued later goes to the end and leaves the highlight where it is.

Neither Ctrl+Enter nor Ctrl+S asks first: each does in one press what Esc, Ctrl+E and Enter already do. Otherwise nothing here holds the queue: the running turn takes every waiting prompt at its next step, whichever is highlighted, and the panel goes with them.