Open-source AI penetration testing tool to find and fix your app’s vulnerabilities.
Python agentsai-hackingai-penetration-testingai-pentestingai-securityartificial-intelligencebug-bountycode-qualityctf-toolscybersecuritycybersecurity-toolsethical-hackinghackingllm-securityoffensive-securitypenetration-testingpentesting-toolsred-teamingsecuritysecurity-automation
Improving CLI tool components
Ahmed Allam9adbd03ff1e9
diff --git a/strix/cli/app.py b/strix/cli/app.pyindex 286c9ed9..b1c2d8b8 100644--- a/strix/cli/app.py+++ b/strix/cli/app.py@@ -556,7 +556,9 @@ class StrixCLIApp(App): # type: ignore[misc]current_verb = self._get_agent_verb(self.selected_agent_id)animated_text = self._get_animated_verb_text(self.selected_agent_id, current_verb)self._safe_widget_operation(status_text.update, animated_text)- self._safe_widget_operation(keymap_indicator.update, "[dim]ESC to stop agent[/dim]")+ self._safe_widget_operation(+ keymap_indicator.update, "[dim]ESC to stop | CTRL-C to quit and save[/dim]"+ )self._safe_widget_operation(status_display.remove_class, "hidden")self._start_dot_animation()else:diff --git a/strix/cli/main.py b/strix/cli/main.pyindex 60f7f253..7a10821d 100644--- a/strix/cli/main.py+++ b/strix/cli/main.py@@ -577,10 +577,8 @@ def pull_docker_image() -> None:returnconsole.print()- console.print(f"[bold cyan]🐳 Pulling Docker image:[/bold cyan] {STRIX_IMAGE}")- console.print(- "[dim yellow]This only happens on first run and may take a few minutes...[/dim yellow]"- )+ console.print(f"[bold cyan]🐳 Pulling Docker image:[/] {STRIX_IMAGE}")+ console.print("[dim yellow]This only happens on first run and may take a few minutes...[/]")console.print()with console.status("[bold cyan]Downloading image layers...", spinner="dots") as status:diff --git a/strix/cli/tool_components/python_renderer.py b/strix/cli/tool_components/python_renderer.pyindex 5ec6a6cd..9cb8cc0c 100644--- a/strix/cli/tool_components/python_renderer.py+++ b/strix/cli/tool_components/python_renderer.py@@ -21,7 +21,7 @@ class PythonRenderer(BaseToolRenderer):header = "</> [bold #3b82f6]Python[/]"if code and action in ["new_session", "execute"]:- code_display = code[:250] + "..." if len(code) > 250 else code+ code_display = code[:600] + "..." if len(code) > 600 else codecontent_text = f"{header}\n [italic white]{cls.escape_markup(code_display)}[/]"elif action == "close":content_text = f"{header}\n [dim]Closing session...[/]"diff --git a/strix/cli/tool_components/scan_info_renderer.py b/strix/cli/tool_components/scan_info_renderer.pyindex 161145e8..8bd168cc 100644--- a/strix/cli/tool_components/scan_info_renderer.py+++ b/strix/cli/tool_components/scan_info_renderer.py@@ -28,11 +28,11 @@ class ScanStartInfoRenderer(BaseToolRenderer):@classmethoddef _build_target_display(cls, target: dict[str, Any]) -> str:if target_url := target.get("target_url"):- return f"[bold #22c55e]{target_url}[/bold #22c55e]"+ return f"[bold #22c55e]{target_url}[/]"if target_repo := target.get("target_repo"):- return f"[bold #22c55e]{target_repo}[/bold #22c55e]"+ return f"[bold #22c55e]{target_repo}[/]"if target_path := target.get("target_path"):- return f"[bold #22c55e]{target_path}[/bold #22c55e]"+ return f"[bold #22c55e]{target_path}[/]"return "[dim]unknown target[/dim]"@@ -49,7 +49,7 @@ class SubagentStartInfoRenderer(BaseToolRenderer):name = args.get("name", "Unknown Agent")task = args.get("task", "")- content = f"🤖 Spawned subagent [bold #22c55e]{name}[/bold #22c55e]"+ content = f"🤖 Spawned subagent [bold #22c55e]{name}[/]"if task:content += f"\n Task: [dim]{task}[/dim]"diff --git a/strix/cli/tool_components/terminal_renderer.py b/strix/cli/tool_components/terminal_renderer.pyindex 2902376d..8114f16d 100644--- a/strix/cli/tool_components/terminal_renderer.py+++ b/strix/cli/tool_components/terminal_renderer.py@@ -125,7 +125,7 @@ class TerminalRenderer(BaseToolRenderer):if not command:return ""- if len(command) > 200:- command = command[:197] + "..."+ if len(command) > 400:+ command = command[:397] + "..."return cls.escape_markup(command)diff --git a/strix/cli/tool_components/thinking_renderer.py b/strix/cli/tool_components/thinking_renderer.pyindex 04a5f844..74e1595a 100644--- a/strix/cli/tool_components/thinking_renderer.py+++ b/strix/cli/tool_components/thinking_renderer.py@@ -20,7 +20,7 @@ class ThinkRenderer(BaseToolRenderer):header = "🧠 [bold #a855f7]Thinking[/]"if thought:- thought_display = thought[:200] + "..." if len(thought) > 200 else thought+ thought_display = thought[:600] + "..." if len(thought) > 600 else thoughtcontent = f"{header}\n [italic dim]{cls.escape_markup(thought_display)}[/]"else:content = f"{header}\n [italic dim]Thinking...[/]"