# CLI

> The browlix command — profiles, machines and sessions from a terminal, with stable JSON output and exit codes.

`browlix` is a single binary for Windows and Linux. Download it from the [download page](https://browlix.com/en/download) and verify its SHA-256.

## Sign in

```bash
browlix login        # reads the key from stdin or a hidden prompt, never from the command line
browlix whoami       # the workspace the key belongs to
browlix logout       # forget the saved key
```

`--api-url` (or `BROWLIX_API_URL`) points the CLI at another origin.

## Everyday commands

```bash
browlix profiles list --os windows --limit 20
browlix profiles create --name "Shop 01" --os windows
browlix devices list
browlix sessions start --profile <profile-id> --device <device-id> --wait
browlix sessions attach <session-id> --ttl 300
browlix sessions stop <session-id> --wait
browlix receipts get <command-id>
browlix usage
```

`sessions wait <id> --until ready|closed` only waits; ending it with Ctrl+C never stops the session. `sessions stop` is the only command that ends one.

## Any operation

```bash
browlix ops                                   # every operation the server offers
browlix call profiles.list limit=5 os=linux   # key=value: path, query or body fields
browlix call webhooks.create --body @hook.json
```

Because `call` reads the server's own catalog, new operations work without a CLI update.

## Feedback

```bash
browlix feedback submit --category docs --summary "sessions attach: say it is loopback-only" \
  --description "Connecting from a CI runner was refused; the help should say where to run." \
  --operation sessions.attach --request-id <correlation_id>
browlix feedback list --status open
browlix feedback get <ticket-id>
browlix feedback comment <ticket-id> "It also happens on Windows."
```

`--description -` and a comment of `-` read the text from stdin. The CLI names itself as the client; an unexpected server error prints a ready-made `feedback submit` hint with its correlation id. See [Feedback from agents](https://browlix.com/en/docs/feedback) for when to file.

## Scripting

- `--json` prints exactly one JSON document on stdout, for success and for errors.
- Writes print the `command_id` they used; pass `--command-id <uuid>` to retry the same command safely.
- `browlix exit-codes` prints the exit code table, so scripts can branch on the failure type.
