Skip to content

Automate browser based workflows with AI

Add CLI stop all command (#2777)

Prakash Maheshwaran7ce183c78707
diff --git a/skyvern/cli/stop_commands.py b/skyvern/cli/stop_commands.py
index d58198ef5..87df0c41f 100644
--- a/skyvern/cli/stop_commands.py
+++ b/skyvern/cli/stop_commands.py
@@ -63,6 +63,29 @@ def kill_pids(pids: List[int], service_name: str) -> bool:
return killed_any
+@stop_app.command(name="all")
+def stop_all() -> None:
+ """Stop all Skyvern services running on ports 8000, 8080, and 9090."""
+ console.print(Panel("[bold red]Stopping All Skyvern Services...[/bold red]", border_style="red"))
+
+ # Stop processes on port 8000 (API server)
+ pids_8000 = get_pids_on_port(8000)
+ killed_8000 = kill_pids(pids_8000, "Skyvern API server (port 8000)")
+
+ # Stop processes on port 8080 (UI server)
+ pids_8080 = get_pids_on_port(8080)
+ killed_8080 = kill_pids(pids_8080, "Skyvern UI server (port 8080)")
+
+ # Stop processes on port 9090 (UI server)
+ pids_9090 = get_pids_on_port(9090)
+ killed_9090 = kill_pids(pids_9090, "Skyvern UI server (port 9090)")
+
+ if killed_8000 or killed_8080 or killed_9090:
+ console.print("[green]🛑 All Skyvern services stopped successfully.[/green]")
+ else:
+ console.print("[yellow]No Skyvern services found running on ports 8000, 8080, or 9090.[/yellow]")
+
+
@stop_app.command(name="ui")
def stop_ui() -> None:
"""Stop the Skyvern UI servers running on ports 8080 and 9090."""