Skip to content

Automate browser based workflows with AI

Add CLI stop ui command (#2776)

Prakash Maheshwarana4bc814ef4f0
diff --git a/skyvern/cli/stop_commands.py b/skyvern/cli/stop_commands.py
index dda02f358..d58198ef5 100644
--- a/skyvern/cli/stop_commands.py
+++ b/skyvern/cli/stop_commands.py
@@ -63,6 +63,25 @@ def kill_pids(pids: List[int], service_name: str) -> bool:
return killed_any
+@stop_app.command(name="ui")
+def stop_ui() -> None:
+ """Stop the Skyvern UI servers running on ports 8080 and 9090."""
+ console.print(Panel("[bold red]Stopping Skyvern UI Servers...[/bold red]", border_style="red"))
+
+ # Stop processes on port 8080
+ pids_8080 = get_pids_on_port(8080)
+ killed_8080 = kill_pids(pids_8080, "Skyvern UI server (port 8080)")
+
+ # Stop processes on port 9090
+ pids_9090 = get_pids_on_port(9090)
+ killed_9090 = kill_pids(pids_9090, "Skyvern UI server (port 9090)")
+
+ if killed_8080 or killed_9090:
+ console.print("[green]🛑 Skyvern UI servers stopped successfully.[/green]")
+ else:
+ console.print("[yellow]No Skyvern UI servers found running on ports 8080 or 9090.[/yellow]")
+
+
@stop_app.command(name="server")
def stop_server(port: int = typer.Option(8000, "--port", "-p", help="Port number for the Skyvern API server")) -> None:
"""Stop the Skyvern API server running on the specified port (default: 8000)."""