Skip to content

Preview a service frontend

Find the address a running service's web frontend answers at, and let your coding agent open it in the browser its own tools drive, so you both look at the same page.

Prerequisites

  • The service running locally.
  • An agent with browser tools: Claude Code with Claude in Chrome, Codex with its browser, or any agent with a Playwright MCP.

Steps

  1. Start the service:

    alis run
    

    It loads the product's .alis/.env and runs the Makefile run target, else the Go main package, else the first component it detects: a Go server in a subfolder, else a frontend app. Ctrl-C stops it.

  2. Ask the agent to open the page. It runs:

    alis preview --json
    

    The address is chosen in order: --url, --port, ALIS_APP_URL, the port in the service's .claude/launch.json, the Makefile's APP_URL, a Vite app's server.port (else 5173), else localhost:8080. Nothing is launched: the agent opens the result's url with its browser tools and drives the page there (navigate, snapshot, click, read the console), in your own browser on the machine.

  3. Point at a different address when needed:

    Shell
    alis preview --port 5173
    alis preview --url http://localhost:5173/checkout
    

The result carries the port's public address (workstation_url), behind your sign-in. Open it in your own browser: every page has the Alis toolbar, and the agent drives your tab through the workstation's page_* tools, or its own Playwright browser with the sign-in you share from the toolbar. See Annotate your app and let agents test it.

Run alis preview --json on the workstation to get the port's public address, and open that.

Never use the preview for logs or operation status: use alis logs and alis operations.

Related: alis preview, alis run.