yera.cli.commands.run

Run commands: run Yera apps.

Symbols

def run — Run a single app from a Python file and serve the dev UI.

run

run(
    app_path: Annotated[str, Parameter(help='Path to the Python file defining the app.')],
    app_id: Annotated[str | None, Parameter(help='app id to run when the file defines multiple apps.')] = None,
    port: Annotated[int, Parameter(help='Bind port.')] = 8991,
    host: Annotated[str, Parameter(help='Bind address (not a URL).')] = '127.0.0.1',
    hub: Annotated[str | None, Parameter(help='Hub name override for deploy.')] = None,
    log_events: Annotated[bool, Parameter(help='Stream raw events to stdout.')] = False,
    browser: Annotated[bool, Parameter(help='Open the dev UI in a browser on startup.')] = True,
    dev_ui: Annotated[bool, Parameter(help='Enable the experimental dev UI.')] = False,
    ctx: Annotated[AppContext, Parameter(parse=False, show=False)],
) → None

Run a single app from a Python file and serve the dev UI.

Loads one app from app_path and starts the Yera dev server, opening the UI directly on that app's chat page. The server runs until interrupted (Ctrl-C).

When app_path defines multiple apps, use --app-id to select the one to run.

Parameters

app_path
type: Annotated[str, Parameter(help='Path to the Python file defining the app.')]

Path to the Python file containing the app definition.

app_id
type: Annotated[str | None, Parameter(help='app id to run when the file defines multiple apps.')] = None

app id to select when the file defines more than one app. If omitted and the file contains exactly one app, that app is used automatically.

port
type: Annotated[int, Parameter(help='Bind port.')] = 8991

Port to bind the dev server on.

host
type: Annotated[str, Parameter(help='Bind address (not a URL).')] = '127.0.0.1'

Address to bind the dev server on (not a URL — just the hostname or IP, e.g. 127.0.0.1 or 0.0.0.0).

hub
type: Annotated[str | None, Parameter(help='Hub name override for deploy.')] = None

Hub name override used for deploy-from-UI. Resolution order: this flag, then pyproject.toml [tool.yera] hub, then yera.toml [hubs] default.

log_events
type: Annotated[bool, Parameter(help='Stream raw events to stdout.')] = False

Stream raw output events to stdout as they arrive from the app.

browser
type: Annotated[bool, Parameter(help='Open the dev UI in a browser on startup.')] = True

Open the dev UI in the default browser on startup. Pass --no-browser to suppress.

dev_ui
type: Annotated[bool, Parameter(help='Enable the experimental dev UI.')] = False

Enable the experimental dev UI. When set, the server expects a separately running UI dev server at http://localhost:3000 instead of serving the bundled UI itself.