Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion rogue/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,12 @@ def common_parser() -> ArgumentParser:
default="localhost",
help="Host for the example agent (default: localhost)",
)
parent_parser.add_argument(
"--reinstall-tui",
action="store_true",
default=False,
help="Force reinstallation of the TUI.",
)
parent_parser.add_argument(
"--example-port",
type=int,
Expand Down Expand Up @@ -199,7 +205,9 @@ def main() -> None:
logger.info("Starting rogue-ai...")

# Step 1: Install rogue-tui if needed
if not RogueTuiInstaller().install_rogue_tui():
if not RogueTuiInstaller().install_rogue_tui(
reinstall=args.reinstall_tui
):
logger.error("Failed to install rogue-tui. Exiting.")
if example_process:
example_process.terminate()
Expand Down
3 changes: 2 additions & 1 deletion rogue/common/tui_installer.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,11 +168,12 @@ def _is_rogue_tui_installed(self) -> bool:
def install_rogue_tui(
self,
upgrade: bool = False,
reinstall: bool = False,
) -> bool:
"""Install rogue-tui from GitHub releases if not already installed."""
console = Console()
# Check if rogue-tui is already available
if self._is_rogue_tui_installed() and not upgrade:
if self._is_rogue_tui_installed() and not upgrade and not reinstall:
console.print("[green]✅ rogue-tui is already installed.[/green]")
return True

Expand Down