mirror of
https://github.com/AutoMaker-Org/automaker.git
synced 2026-02-03 08:53:36 +00:00
feat: enhance TUI launcher with production-ready features and documentation
Major improvements to start-automaker.sh launcher script: **Architecture & Code Quality:** - Organized into logical sections with clear separators (8 sections) - Extracted all magic numbers into named constants at top - Added comprehensive comments throughout **Functionality:** - Dynamic version extraction from package.json (no manual updates) - Pre-flight checks: validates Node.js, npm, tput installed - Platform detection: warns on Windows/unsupported systems - Terminal size validation: checks min 70x20, displays warning if too small - Input timeout: 30-second auto-timeout for hands-free operation - History tracking: remembers last selected mode in ~/.automaker_launcher_history **User Experience:** - Added --help flag with comprehensive usage documentation - Added --version flag showing version, Node.js, Bash info - Added --check-deps flag to verify project dependencies - Added --no-colors flag for terminals without color support - Added --no-history flag to disable history tracking - Enhanced cleanup function: restores cursor + echo, better signal handling - Better error messages with actionable remediation steps - Improved exit experience: "Goodbye! See you soon." message **Robustness:** - Real initialization checks (validates node_modules, build artifacts) - Spinner uses frame counting instead of infinite loop (max 1.6s) - Proper signal trap handling (EXIT, INT, TERM) - Error recovery: respects --no-colors in pre-flight checks **File Management:** - Renamed from "start automaker.sh" to "start-automaker.sh" for consistency - Made script more portable with SCRIPT_DIR detection **Documentation:** - Added section to README.md: "Interactive TUI Launcher" - Documented all launch modes and options with examples - Added feature list, history file location, usage tips - Updated table of contents with TUI launcher section Fixes: #511 (CI test failures resolved) Improvements: Better UX for new users, production-ready error handling Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
35
README.md
35
README.md
@@ -28,6 +28,7 @@
|
||||
- [Quick Start](#quick-start)
|
||||
- [How to Run](#how-to-run)
|
||||
- [Development Mode](#development-mode)
|
||||
- [Interactive TUI Launcher](#interactive-tui-launcher-recommended-for-new-users)
|
||||
- [Building for Production](#building-for-production)
|
||||
- [Testing](#testing)
|
||||
- [Linting](#linting)
|
||||
@@ -179,6 +180,40 @@ npm run dev:electron:wsl:gpu
|
||||
npm run dev:web
|
||||
```
|
||||
|
||||
### Interactive TUI Launcher (Recommended for New Users)
|
||||
|
||||
For a user-friendly interactive menu, use the built-in TUI launcher script:
|
||||
|
||||
```bash
|
||||
# Show interactive menu with all launch options
|
||||
./start-automaker.sh
|
||||
|
||||
# Or launch directly without menu
|
||||
./start-automaker.sh web # Web browser
|
||||
./start-automaker.sh electron # Desktop app
|
||||
./start-automaker.sh electron-debug # Desktop + DevTools
|
||||
|
||||
# Additional options
|
||||
./start-automaker.sh --help # Show all available options
|
||||
./start-automaker.sh --version # Show version information
|
||||
./start-automaker.sh --check-deps # Verify project dependencies
|
||||
./start-automaker.sh --no-colors # Disable colored output
|
||||
./start-automaker.sh --no-history # Don't remember last choice
|
||||
```
|
||||
|
||||
**Features:**
|
||||
|
||||
- 🎨 Beautiful terminal UI with gradient colors and ASCII art
|
||||
- ⌨️ Interactive menu (press 1-3 to select, Q to exit)
|
||||
- 💾 Remembers your last choice
|
||||
- ✅ Pre-flight checks (validates Node.js, npm, dependencies)
|
||||
- 📏 Responsive layout (adapts to terminal size)
|
||||
- ⏱️ 30-second timeout for hands-free selection
|
||||
- 🌐 Cross-shell compatible (bash/zsh)
|
||||
|
||||
**History File:**
|
||||
Your last selected mode is saved in `~/.automaker_launcher_history` for quick re-runs.
|
||||
|
||||
### Building for Production
|
||||
|
||||
#### Web Application
|
||||
|
||||
Reference in New Issue
Block a user