Files

32 lines
858 B
Python
Raw Permalink Normal View History

"""Documentation-related CLI helpers."""
2025-05-22 03:12:32 -04:00
import webbrowser
import typer
2025-05-22 03:12:32 -04:00
from rich.panel import Panel
from .console import console
DOCS_URL = "https://www.skyvern.com/docs"
2025-05-22 03:12:32 -04:00
docs_app = typer.Typer(
invoke_without_command=True,
help="Open Skyvern documentation in your browser.",
)
2025-05-22 03:12:32 -04:00
@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]")