troupe setup is one full screen over the daemon's first-run questions, opened by plain troupe when no provider is set up: a question at a time, nothing written before the summary, Shift-Tab back, Esc out, ending in the session it started¶
TUI decision 153 · accepted · 2026-10-09 · issue #76
- Its own screen, before any session.
Troupe.UI.Setupis anExRatatui.Appof its own, run underTroupe.UI.Windowsas the terminal UI is, and the runner waits for how it ended, then for it to give the terminal back, before the session's window takes it. It is not a page ofTroupe.UI.TUI.Server, which needs a session to mount: a scratch session made only to draw the setup would be a write on a machine where Esc must write nothing, and the session worth opening is the one the setup starts. It asks the daemon through acallit is given (Link.call/2), so the UI still calls nothing pastTroupe.Client(mix troupe.xref) and a test plays the daemon. - The desktop app's questions, order and words. Where, provider (a vendor's key in
the environment, opencode, a working
config.yamlfirst), key, models (the main one, then the small one, which the desktop app asks on one screen), project with the approval model, at login, summary. The fake provider is offered last only whereTROUPE_FAKE_SCRIPTnames a script, so a packaged build can be walked to a session with no model behind it and a person with a key never sees it. - Keys. ↑↓ choose, typing goes to the step's one field, Enter answers, Shift-Tab goes
back a step (the daemon's
{"back": true}for a step it holds, which forgets the key with it, as the desktop app's Back does), Esc and Ctrl-C leave; a key being asked about holds the keys until the daemon answers. A typed key is drawn as one dot a character, is cleared from the screen's state as it is sent, and is never in a line the screen says. - The key, by the line-by-line rule. From
ANTHROPIC_API_KEY(orOPENAI_API_KEY) when the daemon has it, typed, or typed as{env:VAR}; the daemon checks it before anything is kept, so a variable not set where the daemon runs is refused with the daemon's reason, wheretroupe configsaves the reference and says to set it. - At login. Asked as the desktop app asks it, unless the entry is there already: then
it is said where it is and that
troupe daemon login offtakes it back, and kept, as the installers do (root Decision 818). - Where it is opened.
troupe setupat any time, whatever is set up; plaintroupewhen the daemon says a first run is needed, opening the setup's session instead of a new one, and going on to a new one as before when the person leaves. A daemon from beforesetup.get, and a terminal the screen could not be drawn on, gettroupe config's questions line by line (said); with standard input or output not a terminaltroupe setupsays which, prints the ways on, and exits 1.troupe configkeeps its own questions (TUI Decision 123).
Governs: clients/tui/lib/troupe/ui/setup.ex, clients/tui/lib/troupe/cli/config_setup.ex, clients/tui/lib/troupe/cli/runner.ex, clients/tui/lib/troupe/cli.ex