Skip to content

Conversation

@JZilla808
Copy link

Summary

Add a beautiful terminal user interface (TUI) launcher script that provides an interactive menu for starting Automaker in different modes without needing to remember npm commands.

What This PR Does

  • Adds start automaker.sh - a shell script with an interactive TUI menu
  • Provides three launch modes:
    • [1] Web Browser - Opens UI at localhost:3007
    • [2] Desktop App - Launches Electron app
    • [3] Desktop + Debug - Electron with DevTools
  • Features:
    • ASCII art logo with gradient colors
    • Centered, responsive layout
    • Animated spinner during launch
    • Cross-shell compatibility (bash/zsh)
    • Clean exit handling

Testing

  • Tested in bash and zsh on macOS
  • All three launch modes work correctly
  • Keyboard navigation works

Add a beautiful terminal user interface (TUI) script that provides an
interactive menu for launching Automaker in different modes:

- [1] Web Browser mode (localhost:3007)
- [2] Desktop App (Electron)
- [3] Desktop + Debug (Electron with DevTools)
- [Q] Exit

Features:
- ASCII art logo with gradient colors
- Centered, responsive layout that adapts to terminal size
- Animated spinner during launch sequence
- Cross-shell compatibility (bash/zsh)
- Clean exit handling with cursor restoration

This provides a more user-friendly alternative to remembering
npm commands, especially for new users getting started with
the project.
@coderabbitai
Copy link

coderabbitai bot commented Jan 16, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Note

Other AI code review bot(s) detected

CodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @JZilla808, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly improves the developer and user experience by introducing a new TUI-based launcher script for the Automaker application. The script provides an intuitive, interactive menu that allows users to easily start the application in various modes (web, desktop, or debug) without needing to recall specific npm commands. This change streamlines the startup process and enhances overall usability with visual feedback and robust shell compatibility.

Highlights

  • New TUI Launcher Script: Introduces a new shell script, start automaker.sh, which provides an interactive Terminal User Interface (TUI) for launching the Automaker application.
  • Multiple Launch Modes: The TUI offers three distinct launch options: 'Web Browser' (localhost:3007), 'Desktop App' (Electron), and 'Desktop + Debug' (Electron with DevTools), simplifying application startup.
  • Enhanced User Experience: The launcher features a stylized ASCII art logo with gradient colors, a centered and responsive layout, an animated spinner during launch, and clean exit handling for a polished user experience.
  • Cross-Shell Compatibility: The script is designed to be compatible with both bash and zsh shells, ensuring broad usability across different environments.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces an excellent TUI launcher script, which greatly improves the developer experience for starting the application. The script is well-structured and makes effective use of terminal capabilities. My review focuses on enhancing its robustness, maintainability, and user flow. I've suggested adding dependency checks, removing unused code, replacing hardcoded values with dynamic calculations for better centering, and refining the launch sequence for a cleaner UI transition.

#!/bin/bash
set -e
cd "$(dirname "$0")"

Copy link
Contributor

Choose a reason for hiding this comment

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

high

To improve robustness, it's best to verify that required dependencies like node, npm, and tput are available before executing the main script logic. This prevents unexpected errors and provides clear feedback to the user if their environment is not set up correctly.

Suggested change
# Check for required dependencies
for cmd in node npm tput; do
if ! command -v "$cmd" &> /dev/null; then
echo "Error: Required command '$cmd' not found. Please install it and ensure it's in your PATH." >&2
exit 1
fi
done


APP_NAME="Automaker"
VERSION="v0.11"
NODE_VER=$(node -v)
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

This variable NODE_VER is defined but never used within the script. It should be removed to keep the code clean and maintainable.

Comment on lines 68 to 72
local sub="Autonomous AI Development Studio │ ${VERSION}"
local sub_display_len=46
local sub_pad=$(( (TERM_COLS - sub_display_len) / 2 ))
printf "%${sub_pad}s" ""
echo -e "${C_MUTE}Autonomous AI Development Studio${RESET} ${C_GRAY}│${RESET} ${C_GREEN}${VERSION}${RESET}"
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

The sub variable is unused and can be removed. More importantly, sub_display_len is a hardcoded 'magic number' (46), which is also incorrect for the current text (the actual visible length is 42). This makes the centering fragile to any text changes. It's better to calculate the length dynamically.

Suggested change
local sub="Autonomous AI Development Studio │ ${VERSION}"
local sub_display_len=46
local sub_pad=$(( (TERM_COLS - sub_display_len) / 2 ))
printf "%${sub_pad}s" ""
echo -e "${C_MUTE}Autonomous AI Development Studio${RESET} ${C_GRAY}${RESET} ${C_GREEN}${VERSION}${RESET}"
local subtitle_text="Autonomous AI Development Studio │ ${VERSION}"
local sub_pad=$(( (TERM_COLS - ${#subtitle_text}) / 2 ))
printf "%${sub_pad}s" ""
echo -e "${C_MUTE}Autonomous AI Development Studio${RESET} ${C_GRAY}${RESET} ${C_GREEN}${VERSION}${RESET}"

Comment on lines 104 to 107
local footer_text="Use keys [1-3] or [Q] to select"
local f_pad=$(( (TERM_COLS - 31) / 2 ))
printf "%${f_pad}s" ""
echo -e "${DIM}${footer_text}${RESET}"
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

The length of the footer text is hardcoded as 31. This is a 'magic number' and makes the script brittle. If the footer text changes, this value would need to be manually updated. It's better to calculate the length dynamically from the variable itself. This pattern of using hardcoded lengths for centering appears in several other places (e.g., lines 142, 147, 174) and should be refactored throughout the script for better maintainability.

Suggested change
local footer_text="Use keys [1-3] or [Q] to select"
local f_pad=$(( (TERM_COLS - 31) / 2 ))
printf "%${f_pad}s" ""
echo -e "${DIM}${footer_text}${RESET}"
local footer_text="Use keys [1-3] or [Q] to select"
local f_pad=$(( (TERM_COLS - ${#footer_text}) / 2 ))
printf "%${f_pad}s" ""
echo -e "${DIM}${footer_text}${RESET}"

Comment on lines 134 to 135
echo ""
echo ""
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

The launch sequence currently prints below the menu, which can create a cluttered UI before the final npm command's output takes over. For a cleaner transition, it's better to clear the screen and redraw the header before showing the launch progress.

Suggested change
echo ""
echo ""
show_header

@Shironex Shironex added Enhancement Improvements to existing functionality or UI. Testers-Requested Request for others to test an enhancement or bug fix/etc. Do Not Merge Use this label if something should not be merged. labels Jan 16, 2026
DhanushSantosh and others added 3 commits January 16, 2026 20:27
…tation

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: AutoMaker-Org#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>
The 'local' keyword can only be used inside functions. Line 423 had
'local timeout_count=0' in the main script body which caused a bash error.
Removed the unused variable declaration.

Fixes: bash error 'local: can only be used in a function'

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
- Add 4 launch options matching dev.mjs (Web, Electron, Docker Dev, Electron+Docker)
- Add arrow key navigation in menu with visual selection indicator
- Add cross-platform port conflict detection and resolution (Windows/Unix)
- Add Docker container detection with Stop/Restart/Attach/Cancel options
- Add Electron process detection when switching between modes
- Add centered, styled output for Docker build progress
- Add HUSKY=0 to docker-compose files to prevent permission errors
- Fix Windows/Git Bash compatibility (platform detection, netstat/taskkill)
- Fix bash arithmetic issue with set -e causing script to hang

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@Shironex Shironex added Ready-To-Merge A feature or bug has been improved/fixed and a final review is requested before merging. and removed Testers-Requested Request for others to test an enhancement or bug fix/etc. Do Not Merge Use this label if something should not be merged. labels Jan 16, 2026
@webdevcody webdevcody merged commit 30c50d9 into AutoMaker-Org:v0.12.0rc Jan 16, 2026
4 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Enhancement Improvements to existing functionality or UI. Ready-To-Merge A feature or bug has been improved/fixed and a final review is requested before merging.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants