CLI
Start a separate development runtime when another checkout is already running. The command selects an available port and records the instance so you can find it again.
yarn dev:ephemeral starts Open Mercato development mode on a free local port with a dedicated ephemeral PostgreSQL container, prints the runtime URLs, and opens the same splash status screen used by the regular dev flow so startup progress stays visible until the app is reachable.
The command performs these steps automatically:
24.x (fails early with fix instructions when incompatible).apps/mercato/.env from apps/mercato/.env.example only when missing.yarn install.yarn build:packages to ensure CLI generators are up to date.yarn generate to prepare .mercato/generated files.DATABASE_URL.yarn initialize -- --reinstall against that ephemeral database.5000-65535 range.PORT=<selected-port> and ephemeral DATABASE_URL, forwarding status into the splash screen..ai/dev-ephemeral-envs.json.yarn dev:ephemeral
When setup finishes, the command prints:
Ephemeral URL: http://127.0.0.1:<port>Backend URL: http://127.0.0.1:<port>/backendEphemeral PostgreSQL URL: postgresql://[email protected]:<port>/<db>Opened browser at http://127.0.0.1:<port>/backendUse that URL for browser testing or MCP tooling.
If auto-open is enabled, the browser opens the local splash status page first. Once runtime warmup finishes, use the ready actions there or navigate directly to the printed backend URL.
yarn dev:ephemeral writes active instances to .ai/dev-ephemeral-envs.json.
Run the command from multiple worktrees to keep isolated app processes on different ports:
# In worktree A
yarn dev:ephemeral
# In worktree B
yarn dev:ephemeral
Each process auto-selects its own free port.
| Variable | Description |
|---|---|
DEV_EPHEMERAL_PREFERRED_PORT | Optional fixed port override. Must be in 5000-65535; otherwise it is ignored and a random free port is used. |
DEV_EPHEMERAL_POSTGRES_IMAGE | Optional Docker image for ephemeral PostgreSQL. Default: postgres:16. |
DEV_EPHEMERAL_POSTGRES_USER | Optional PostgreSQL user for ephemeral DB. Default: postgres. |
DEV_EPHEMERAL_POSTGRES_PASSWORD | Set a password for the temporary PostgreSQL instance. |
yarn dev:ephemeral:verbose
This keeps the app runtime in raw passthrough mode while still using the splash screen for the ephemeral setup stages.
yarn dev:ephemeral:classic
This disables the splash screen entirely and keeps the full ephemeral startup flow in raw passthrough mode for backward-compatible terminal output.