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

@@ -1,13 +1,31 @@
"""Documentation-related CLI helpers."""
import webbrowser
import typer
from rich.panel import Panel
from .console import console
docs_app = typer.Typer()
DOCS_URL = "https://docs.skyvern.com"
docs_app = typer.Typer(
invoke_without_command=True,
help="Open Skyvern documentation in your browser.",
)
@docs_app.command()
def placeholder() -> None:
"""Placeholder command for documentation actions."""
console.print("Documentation commands are not yet implemented.")
@docs_app.callback()
def docs_callback(ctx: typer.Context) -> None:
"""Open the Skyvern documentation in a browser."""
if ctx.invoked_subcommand is None:
console.print(
Panel(
f"[bold blue]Opening Skyvern docs at [link={DOCS_URL}]{DOCS_URL}[/link][/bold blue]",
border_style="cyan",
)
)
try:
webbrowser.open(DOCS_URL)
except Exception as exc: # pragma: no cover - CLI safeguard
console.print(f"[red]Failed to open documentation: {exc}[/red]")