Skip to content
isenePublic

About

A paned front for Claude Code in the terminal: answers, a tool log and a status line (Fe2O3 suite)

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

103 Commits

Folders and files

Repository files navigation

deck

Rust Unlicense Fe2O3

A paned terminal front for Claude Code. Part of the Fe2O3 Rust terminal suite.

 deck  #myproject  ● working 0:12 · 3 tools · Bash 0:04
› Why does the build fail on ARM?                  › Why does the build fail on ARM?
                                                   ✓ Bash Build for ARM
The linker flag is set for x86 only.               ✓ Read ~/src/build.rs
...                                                ↻ rewrite: answer:1: 31 words (max 22)
› _
user@host ~/src/myproject [Opus 5.5 high] [12%] ...
  • The answer gets the big pane. New text comes in at the bottom, as in a terminal, and PgUp/PgDn scroll back. While you read further up, the pane stays where you are. A reopened session shows its last ten turns.
  • Each tool call is one line in the log on the right: ✓ when it worked, ✗ when it failed. C-O shows the last turn's calls with their output.
  • When a stop hook sends an answer back, you see only the rewrite, and one log line says what the hook found.
  • The top bar names the session's state in fleet's words and colours: working (amber), YOURS (bold green), idle (blue) and off (grey-blue).
  • When an answer gave an ETA for work that goes on after it, the top bar shows that time in place of "YOURS", as fleet's State column does ("● 16:30"), and in red once that time has passed. Under gluon it follows "▸ Claude".
  • When the session goes idle as fleet counts it (idle_mins in ~/.fleetrc, 30 by default, after the turn ends), glass dims deck's window to 20% brightness until you press a key in it. A session that has just answered (YOURS) stays bright (glass v0.3.102 on frame v0.1.56; Alt+d dims or lifts it by hand). It lifts by itself when Claude works again. Under gluon it is off. fleet's D key switches it for one session and Ctrl-D for all; deck reads ~/.fleetrc when a turn ends.
  • The bottom row runs the statusLine command from Claude Code's settings, after each turn, with deck's version at the right.
  • The answer pane takes the session's background from fleet's ~/.fleetrc (session <tag> <workspace> <colour>). C-B picks a new one in prism and keeps it there.
  • The prompt grows to as many rows as it needs, up to a third of the screen. Shift+Enter, C-J, or \ then Enter starts a new line.
  • Enter on a closed session in fleet opens it in deck.
  • A message from another session (fleet's bus) shows as a prompt in the turn it came in, as if you had typed it. When fleet wakes the session, deck puts the messages in the prompt itself, where every model reads them, and shows only the messages. A phone message with a ! line still goes through fleet's hook.
  • When Claude asks a multiple-choice question, it opens as a menu. Esc closes it, and Claude is told the question went unanswered.
  • When a turn ends, or Claude asks something, while another window is in front, a box shows at the top right (notify-send, which herald draws).

Use

deck              start a new session in this directory
deck <tag>        open the session with this bookmark tag (from cc-sessions)
deck --new <tag>  start a new session in this directory, under this tag
deck <id>         open the session with this id
Key Does
Enter send; while Claude works, the message waits its turn, in purple
C-Enter send the purple messages now; they turn blue, and Claude reads them when its current step ends
! command runs on the terminal; while Claude works it waits in purple like a message, and C-Enter runs it now and sends Claude its output
/model picks the model in a popup, the newest of each kind and the one before; /model sonnet switches at once. The switch lasts until deck quits
/effort picks how hard Claude thinks (low to max) in a popup; /effort high sets it at once. It lasts until deck quits
/login signs in to Claude again with claude auth login, in the browser; the running session reads the new login and goes on
// draws a grey line under the answers: the task above is done, and the deck is free for the next one. Claude gets nothing; the line is still there when deck opens the session again
S-Enter, C-J, \ Enter a new line in the prompt
Up, Down the row above or below, else earlier prompts, also from past runs; with text typed, only the prompts that start with it (! and Up: the ! commands)
!command run it in a shell; Claude reads what it printed and answers. When an answer hands you a script as code, `! /tmp/fix.sh`, deck puts it on the clipboard
Esc stop the turn Claude is on
PgUp, PgDn scroll the answers
C-F find in the answers; C-F then Enter finds the next
C-PgUp, C-PgDn scroll the tool log
C-O the last turn's tool calls in full, and back
C-G edit the prompt in $EDITOR (scribe if unset)
C-Y copy the last answer, as drawn
C-S-Y copy what the answer pane shows, scrolled or not
C-W, C-S-W answer pane a tenth wider, narrower
C-B pick the answer pane's colour in prism
C-S-B the next look: plain, the bridge, the matrix (green in glass); it stays for the next start
C-? the keys in a popup
y, n answer a permission question
C-Space an empty answer pane to start afresh; PgUp still shows what was there
C-L draw the screen again
C-D quit; a popup asks y/n first while Claude or a command of its runs, and always under gluon

deck refuses a session that is open in Claude Code already. For what deck lacks (slash command dialogs, plan mode, questions with choices), quit and run claude --resume <id> on the same session.

How it works

deck runs claude -p --input-format stream-json --output-format stream-json --permission-prompts host and reads its events. The answer pane shows each turn's result, which is the final text after any stop hook rewrite. When ~/.claude/hooks/hyperlist-display-asm is installed and switched on, answers are drawn through it, as Claude Code does.

While ~/.deck/matrix exists, a new answer comes up as green glyphs that settle into its letters in under a second, the top lines a little first (fx switches it). It is skipped while another window or gluon tab is in front, and costs under 10 ms of CPU per answer. Off, it costs one look for the file per answer.

Idle, deck uses no CPU: it waits on the keyboard, and the thread that reads Claude's output wakes it with a signal. While Claude works, the bar's clock wakes it once a second.

Claude Code itself wakes about 25 times a second while idle, 30 to 70 mW. So after 10 minutes with no turn, deck pauses it (SIGSTOP), and the next prompt lets it go on (SIGCONT), with nothing to reload. A paused session still shows as open in fleet. While Claude runs a job of its own (a background command, a monitor), it is not paused, so the job's end can wake it. DECK_PARK=<seconds> sets the wait.

When such a job ends, Claude starts a turn to answer it, and deck keeps Claude awake until that turn is over.

Build

git clone https://github.com/isene/crust
git clone https://github.com/isene/deck
cd deck && cargo build --release

License

Unlicense: public domain.

About

A paned front for Claude Code in the terminal: answers, a tool log and a status line (Fe2O3 suite)

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages