Arcade Serve (#274)

Co-authored-by: Sam Partee <sam@arcade-ai.com>
This commit is contained in:
Sterling Dreyer 2025-03-07 18:40:26 -08:00 committed by GitHub
parent 16db170b2c
commit eed4c0181b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -420,7 +420,37 @@ def evals(
asyncio.run(run_evaluations())
@cli.command(help="Launch Arcade locally for tool dev", rich_help_panel="Launch")
@cli.command(
help="Start Arcade Worker serving tools installed in the current python environment",
rich_help_panel="Launch",
)
def serve(
host: str = typer.Option(
"127.0.0.1",
help="Host for the app, from settings by default.",
show_default=True,
),
port: int = typer.Option(
"8002", "-p", "--port", help="Port for the app, defaults to ", show_default=True
),
disable_auth: bool = typer.Option(
False,
"--no-auth",
help="Disable authentication for the worker. Not recommended for production.",
show_default=True,
),
otel_enable: bool = typer.Option(
False, "--otel-enable", help="Send logs to OpenTelemetry", show_default=True
),
debug: bool = typer.Option(False, "--debug", "-d", help="Show debug information"),
) -> None:
"""
Start a local Arcade Worker server.
"""
workerup(host, port, disable_auth, otel_enable, debug)
@cli.command(help="Launch Arcade Worker and Engine locally", rich_help_panel="Launch")
def dev(
host: str = typer.Option("127.0.0.1", help="Host for the worker server.", show_default=True),
port: int = typer.Option(
@ -445,6 +475,7 @@ def dev(
typer.Exit(code=1)
# TODO: deprecate this next major version
@cli.command(help="Start a local Arcade Worker server", rich_help_panel="Launch", hidden=True)
def workerup(
host: str = typer.Option(