# CLI reference Run commands from a directory containing `browserlayer.config.ts`, or pass `--project-dir`. | Task | Command | | ---------------------- | ------------------------------------------------------------------------------ | | Create project | `browserlayer init --name ` | | Open local Studio | `browserlayer start` | | Inspect local service | `browserlayer status` | | Stop local service | `browserlayer stop` | | Service logs | `browserlayer logs --follow` | | Capture | `browserlayer capture start ` / `capture stop` | | Inspect capture | `browserlayer capture inspect ` | | Offline tests | `browserlayer test [integration]` | | Connect account | `browserlayer connections create --local --wait` | | Invoke endpoint | `browserlayer run --local --input @input.json --wait` | | Inspect run | `browserlayer runs inspect --local` | | Submit input | `browserlayer runs input --local --input @answer.json` | | Cancel | `browserlayer runs cancel --local` | | Inspect schedules | `browserlayer syncs list --local` | | Read sync changes | `browserlayer syncs records --local` | | Control sync | `browserlayer syncs trigger --local` | | Deploy | `browserlayer deploy --env development` | | Promote | `browserlayer promote --version --env production` | | Authoring instructions | `browserlayer guide` | ## Targets | Flag | Runs against | | ------------------- | ------------------------------------------- | | `--local` | Local Chrome and SQLite | | `--env development` | Your installation's Development environment | | `--env production` | Your installation's Production environment | Live resource commands require a target. Switching the UI environment does not change CLI targets. ## Input and output ```sh browserlayer run example page-title --local --input @input.json --wait --json ``` `--input` accepts inline JSON, `@file` or `-` for stdin. JSON results use `{ "ok": true, "data": ... }`; diagnostics go to stderr. `--wait` stops on completion, failure or input required. `--timeout` is in seconds. Interrupting a wait does not cancel the run. `--json` and `--no-open` prevent automatic Link/Studio opening. | Exit code | Meaning | | --------- | --------------------------------------- | | 0 | Success | | 1 | Command or execution failed | | 2 | Invalid arguments/configuration | | 3 | Authentication required | | 4 | Run needs user input | | 5 | Wait timed out; run may still be active | Resource lists use `--limit` and `--cursor`. Sync records return `changes`, `cursor` and `hasMore` instead of the resource-list envelope. Use `browserlayer --help` for the complete command list.