CLI reference
Run commands from a directory containing browserlayer.config.ts, or pass --project-dir.
| Task | Command |
|---|---|
| Create project | browserlayer init <directory> --name <integration> |
| Open local Studio | browserlayer start |
| Inspect local service | browserlayer status |
| Stop local service | browserlayer stop |
| Service logs | browserlayer logs --follow |
| Capture | browserlayer capture start <url> / capture stop |
| Inspect capture | browserlayer capture inspect <id> |
| Offline tests | browserlayer test [integration] |
| Connect account | browserlayer connections create <integration> --local --wait |
| Invoke endpoint | browserlayer run <integration> <endpoint> --local --input @input.json --wait |
| Inspect run | browserlayer runs inspect <id> --local |
| Submit input | browserlayer runs input <id> --local --input @answer.json |
| Cancel | browserlayer runs cancel <id> --local |
| Inspect schedules | browserlayer syncs list <connection> --local |
| Read sync changes | browserlayer syncs records <connection> <sync> --local |
| Control sync | browserlayer syncs trigger <connection> <sync> --local |
| Deploy | browserlayer deploy <integration> --env development |
| Promote | browserlayer promote <integration> --version <digest> --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
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.