Repository navigation
feat(cli): add commands, onboarding, and interactive chat screen (ENG-383) - #6
Merged
folathecoder merged 2 commits intoOct 18, 2026
Conversation
added 2 commits
October 18, 2026 13:10
…-383) Implement the terminal door (aldwin.cli) on top of Typer, Rich, and prompt_toolkit, plus the door-safe setup and inspection bridge in aldwin.client and aldwin.host.in_process.
Use default foreground for replies, collapse approvals into one-line records, serialize concurrent approval prompts, exclude approval wait time from tool durations, hide secret key input during onboarding, and show remaining context percentage in the bottom status line.
folathecoder
deleted the
folathecoder/eng-383-7-the-cli-commands-onboarding-and-chat-screen
branch
October 18, 2026 14:17
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Builds and polishes the terminal experience for Aldwin 0.0.1: the
aldwin,aldwin setup, andaldwin uninstall [--purge]commands, the first-run onboarding flow with zero-echo secret input, and the inline scrollback chat screen with streaming markdown, single-line tool cards, collapsible single-key approvals, curated/modelpicker, remaining-context status bar, and instantEscstop. All CLI modules communicate exclusively throughaldwin.clientandaldwin.protocolwithout importingaldwin.coreoragentling.Ticket
Closes ENG-383
Closes ENG-393
Closes ENG-396
Closes ENG-400
Changes
src/aldwin/cli/theme.py): Semantic RichTHEMEwhere reply prose uses the terminal's default foreground (fg), metadata/user input usemuted(grey50), code and the›pointer usecyan, outcomes usegreen/red, and approvals useyellow. Overridesprompt_toolkitdefaults withPROMPT_STYLE(noreversetoolbar) and addscontext_left_percent()andfilter_canonical_models().src/aldwin/cli/render.py): Fence-awaresplit_markdown_blockswith blank-line separation between blocks/lists; human-readable tool argument formatting (format_display_args, includingpersona.md · N linesforset_persona); single-line✓/✗tool rows truncated withellipsis; and transient approval panels that collapse into✓ approved <target>/✗ declined <target>after answering.src/aldwin/host/runner.py,src/aldwin/core/tools/):ApprovalBroker.ask()serializes concurrent approval requests with anasyncio.Lock, andRunCommandTool/SetPersonaToolrecord post-approval executionduration_msonToolOutputso user decision time is excluded.src/aldwin/cli/onboarding.py):_HiddenInputProcessorhides API keys completely while typing/pasting (no wrapped lines of***), confirms withChecking key… sk-…a1b2 ✓, and skips the duplicate welcome header when transitioning into chat./modelPicker (src/aldwin/cli/commands.py):SlashCompleter, indentedTable.gridoutput for/skills(•bullets),/tools, and/help, and canonical model filtering on/model(with/model allto list all dated snapshots).src/aldwin/cli/chat_screen.py): Framed›input prompt,<model> · <N>% context left ? shortcuts · esc stopbottom status line,?shortcut help,TurnKeyListener(50 msflush_keys()timeout for bareEsc), andCtrl-C/Ctrl-Dexit handling.src/aldwin/core/assets/): Instructs the model to callrun_commandandset_personadirectly (since the app handles they/napproval box) and never truncate requested long-form answers.How it was tested
uv run pytest --cov=aldwin->207 passed, 1 deselected in 3.16s(92%total coverage;89%acrosssrc/aldwin/cli/).uv run ruff check src testsanduv run ruff format --check src tests-> 0 issues.uv run mypy src tests->Success: no issues found in 61 source files.TC-15) covering onboarding,remember/recall,web_search/web_fetch,run_commandapproval,set_personaapproval,Escmid-stream stop, and/model.Screenshots / recordings
TC-15.Notes for reviewers
aldwin tui) and!shell mode are tracked separately inENG-398/0.0.2.