Completed new latest CLI (#2426)

This commit is contained in:
Prakash Maheshwaran
2025-05-22 03:12:32 -04:00
committed by GitHub
parent 74cd8f7b45
commit 2216ce66d3
9 changed files with 260 additions and 46 deletions

View File

@@ -2,24 +2,32 @@ import typer
from dotenv import load_dotenv
from .docs import docs_app
from .init_command import init, init_browser, init_mcp
from .init_command import init, init_browser
from .run_commands import run_app
from .setup_commands import setup_mcp_command
from .status import status_app
from .tasks import tasks_app
from .workflow import workflow_app
cli_app = typer.Typer()
cli_app.add_typer(run_app, name="run")
cli_app.add_typer(workflow_app, name="workflow")
cli_app.add_typer(tasks_app, name="tasks")
cli_app.add_typer(docs_app, name="docs")
setup_app = typer.Typer()
cli_app.add_typer(setup_app, name="setup")
init_app = typer.Typer(invoke_without_command=True)
cli_app = typer.Typer(
help=("""[bold]Skyvern CLI[/bold]\nManage and run your local Skyvern environment."""),
no_args_is_help=True,
rich_markup_mode="rich",
)
cli_app.add_typer(
run_app,
name="run",
help="Run Skyvern services like the API server, UI, and MCP.",
)
cli_app.add_typer(workflow_app, name="workflow", help="Workflow management commands.")
cli_app.add_typer(tasks_app, name="tasks", help="Task management commands.")
cli_app.add_typer(docs_app, name="docs", help="Open Skyvern documentation.")
cli_app.add_typer(status_app, name="status", help="Check if Skyvern services are running.")
init_app = typer.Typer(
invoke_without_command=True,
help="Interactively configure Skyvern and its dependencies.",
)
cli_app.add_typer(init_app, name="init")
setup_app.command(name="mcp")(setup_mcp_command)
@init_app.callback()
def init_callback(
@@ -37,12 +45,6 @@ def init_browser_command() -> None:
init_browser()
@init_app.command(name="mcp")
def init_mcp_command() -> None:
"""Initialize only the MCP server configuration."""
init_mcp()
if __name__ == "__main__": # pragma: no cover - manual CLI invocation
load_dotenv()
cli_app()