Skip to content

feat: improve REPL interface with banner, dot-commands, and --quiet flag#4888

Merged
hansl merged 7 commits intoboa-dev:mainfrom
sahanaxzy:cli-repl-improvements
Mar 7, 2026
Merged

feat: improve REPL interface with banner, dot-commands, and --quiet flag#4888
hansl merged 7 commits intoboa-dev:mainfrom
sahanaxzy:cli-repl-improvements

Conversation

@sahanaxzy
Copy link
Contributor

Summary

Improves the REPL experience by adding a welcome banner, dot-commands, and a --quiet flag.

Solves #4883

Changes

  • Welcome banner with version info on startup
  • .help, .clear, .load <file> dot-commands
  • --quiet / -q flag to suppress the banner
  • Ctrl+C now shows exit hint instead of quitting
  • Improved error formatting (bold + red labels)
  • Added help descriptions for -O and --optimizer-statistics
  • Updated README.md with new REPL Commands section

Files Changed

Modified cli/src/main.rs

REPL loop, banner, dot-commands, CLI flags, error formatting

Modified cli/README.md

Updated CLI options and added REPL Commands section

@sahanaxzy sahanaxzy requested a review from a team as a code owner March 5, 2026 20:54
@github-actions
Copy link

github-actions bot commented Mar 5, 2026

Test262 conformance changes

Test result main count PR count difference
Total 52,963 52,963 0
Passed 49,666 49,666 0
Ignored 2,284 2,284 0
Failed 1,013 1,013 0
Panics 0 0 0
Conformance 93.77% 93.77% 0.00%

Tested main commit: 1753d9729e3d0930d808990f6911ca0b940a21d7
Tested PR commit: bda50ee6fec6c325240b42f0ec1f241f8ee713a9
Compare commits: 1753d97...bda50ee

Copy link
Contributor

@hansl hansl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd be okay with a TODO comment in the code for the second point and doing it in a follow up PR.

@hansl
Copy link
Contributor

hansl commented Mar 5, 2026

Just wanted to add, I like this a lot and I think it goes into the right direction. I look forward to having a more powerful REPL.

@sahanaxzy
Copy link
Contributor Author

cc @hansl Addressed both points — trimmed readline input and added TODO for CliCommand enum. Please re-review, thanks!

@hansl hansl enabled auto-merge March 5, 2026 21:56
auto-merge was automatically disabled March 5, 2026 22:26

Head branch was pushed to by a user without write access

@sahanaxzy
Copy link
Contributor Author

@hansl The CI failed on formatting, so I pushed a quick rustfmt fix. Could you please re-approve the workflows?

@hansl hansl enabled auto-merge March 6, 2026 01:12
@codecov
Copy link

codecov bot commented Mar 6, 2026

Codecov Report

❌ Patch coverage is 0% with 50 lines in your changes missing coverage. Please review.
✅ Project coverage is 57.67%. Comparing base (6ddc2b4) to head (bda50ee).
⚠️ Report is 773 commits behind head on main.

Files with missing lines Patch % Lines
cli/src/main.rs 0.00% 50 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##             main    #4888       +/-   ##
===========================================
+ Coverage   47.24%   57.67%   +10.43%     
===========================================
  Files         476      556       +80     
  Lines       46892    60782    +13890     
===========================================
+ Hits        22154    35057    +12903     
- Misses      24738    25725      +987     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@hansl
Copy link
Contributor

hansl commented Mar 6, 2026

@sahanaxzy Please fix the linting errors and I'll reenable CI + merge.

@jedel1043 jedel1043 added A-Enhancement New feature or request C-CLI Issues and PRs related to the Boa command line interface. labels Mar 6, 2026
@jedel1043 jedel1043 added this to the v1.0.0 milestone Mar 6, 2026
auto-merge was automatically disabled March 6, 2026 08:14

Head branch was pushed to by a user without write access

@jedel1043
Copy link
Member

jedel1043 commented Mar 6, 2026

you might need to merge pull the latest changes

@sahanaxzy
Copy link
Contributor Author

Thanks! I’ve pulled the latest changes from main and updated the branch.

This should have a little refactor soon.
@hansl hansl enabled auto-merge March 7, 2026 02:24
@hansl hansl added this pull request to the merge queue Mar 7, 2026
Merged via the queue into boa-dev:main with commit 2ebc979 Mar 7, 2026
19 checks passed
@sahanaxzy sahanaxzy deleted the cli-repl-improvements branch March 7, 2026 08:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-Enhancement New feature or request C-CLI Issues and PRs related to the Boa command line interface.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants