feat: replace inquirer with @clack/prompts for modern TUI#13
Merged
Conversation
Replaces the entire inquirer stack with @clack/prompts, bringing the terminal experience in line with modern CLIs (Claude Code, Gemini CLI). Changes: - Drop inquirer, @inquirer/prompts, @types/inquirer (-87 packages) - Add @clack/prompts (+4 packages) - ui.ts: delegate success/error/info/warn to clack log.*; add createSpinner() that returns a real async-bound SpinnerResult - menu.ts: select() with emoji labels + hint text; isCancel + outro for graceful Ctrl+C exit; showAbout() now uses note() info box - main.ts: printHeader() replaced by intro() session frame - calendar.ts: real spinner bound to fetchEvents(); Unicode box-drawing table (┌─┬─┐) replaces dashed ASCII output - repair.ts, website.ts: spinner wraps open() instead of fake timer - docs.ts: all inquirer prompts replaced with select()/confirm(); doc category labels updated with emoji icons - i18n: add eventsFound key (zh + en); add field to Translations type Backward compatibility: src/index.ts script mode is untouched. All non-interactive commands (--json, --help, lang) continue to work.
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.
Closes #12
Summary
inquirer,@inquirer/prompts,@types/inquirer— 87 packages removed@clack/prompts— 4 packages, covers all interactive primitivesSpinnerResultbound to actual operations[✓]/[✗]/[ℹ]hand-assembled strings withlog.success/error/info/warnlistprompt withselect({ label, hint })+ emoji iconsintro()/outro()session frame around the interactive TUIshowAbout()as anote()info box┌─┬─┐)inquirercalls withselect()/confirm()Files changed
package.jsonsrc/core/ui.tslog.*; addcreateSpinner()src/core/menu.tsselect(),isCancel(),outro(),note()src/main.tsprintHeader()→intro()src/features/calendar.tssrc/features/repair.tsopen()src/features/website.tsopen()src/features/docs.tssrc/i18n/index.ts+ localeseventsFoundkeyTest plan
npm run buildpasses with zero errorsnbtca --helpprints usage (non-interactive, unaffected)nbtca events --jsonreturns JSON array (non-interactive, unaffected)nbtca lang zhsets language (non-interactive, unaffected)npm run dev— interactive TUI showsintro()frame after logooutro("Goodbye!")and exits cleanly.error()statenote()info box