# cloakctl command-line tool

> Every cloakctl command and flag: run a headless proxy, replay captured requests, and run collections, flows, monitors, mocks and load tests from Terminal.

Source: https://docs.subcloak.com/cloak-proxy/automation/cloakctl/

`cloakctl` is the command-line tool that ships inside Cloak Proxy. It does three jobs: it talks to the running app (list, show, replay and export captured requests), it runs a capture proxy on its own with no app window (for scripts and CI), and it runs the [API client](https://docs.subcloak.com/cloak-proxy/api-client/overview/) workspace from Terminal, like Newman or the Postman CLI. It is also the [MCP server](https://docs.subcloak.com/cloak-proxy/automation/mcp-server/) that AI assistants use.

## Put cloakctl on your PATH

The tool lives inside the app bundle at:

```text
/Applications/Cloak Proxy.app/Contents/Resources/cloakctl
```

You can run it from there, but a link on your `PATH` lets you type `cloakctl`. The app shows the exact path and a ready-made command in **Settings › Advanced › Command line**.

*[Screenshot: Settings, Advanced tab: TLS key logging, the Command line section with the cloakctl path and a Link to /usr/local/bin command, and the AI assistants (MCP) section. Settings › Advanced shows where cloakctl is and copies the commands that link it and connect AI assistants.]*

1. Open **Settings › Advanced** and click **Copy** next to **Link to /usr/local/bin**.

2. Paste the command into Terminal and press <kbd>Return</kbd>. macOS asks for your password because `/usr/local/bin` belongs to the system.

   ```bash title="Terminal"
   sudo mkdir -p /usr/local/bin
   sudo ln -sf "/Applications/Cloak Proxy.app/Contents/Resources/cloakctl" /usr/local/bin/cloakctl
   ```

   The first line only matters on a Mac where `/usr/local/bin` doesn't exist yet.

3. Check that it works:

   ```bash title="Terminal"
   cloakctl status
   ```

The link points into the app, so it keeps working after you update Cloak Proxy. Remove it with `sudo rm /usr/local/bin/cloakctl`.

> **Tip:**
> Run `cloakctl` with no arguments (or an unknown command) to print the built-in usage text. On Linux, `man cloakctl` (added in Cloak Proxy 0.4.2) has every command and option, with exit codes and examples.

## Commands at a glance

| Command | What it does | Needs the app running |
|---|---|---|
| `cloakctl run` | Runs a headless capture proxy and prints each exchange. Can record, report and fail a CI job. | No |
| `cloakctl ca` | Prints the path of the root certificate, creating it if needed. | No |
| `cloakctl status` | Port, request count and active debugging tools. | Yes, or `cloakctl run` |
| `cloakctl list` | Captured requests, one per line. | Yes, or `cloakctl run` |
| `cloakctl show ID` | Headers and bodies of one request, as JSON. | Yes, or `cloakctl run` |
| `cloakctl curl ID` | One request as a cURL command. | Yes, or `cloakctl run` |
| `cloakctl replay ID` | Sends a captured request again. | Yes, or `cloakctl run` |
| `cloakctl export` | Every captured request as HAR. | Yes, or `cloakctl run` |
| `cloakctl events ID` (added in Cloak Proxy 0.4.0) | A streamed response one event per line, optionally following it live, or from a session file. See [Streaming responses](https://docs.subcloak.com/cloak-proxy/inspect/streams/#from-the-command-line). | Yes, or a session file with `--session` |
| `cloakctl llm` (added in Cloak Proxy 0.4.0) | Model calls in a saved session or the running app: tokens, cost and speed by model; `--max-cost` fails CI over a budget. See [LLM Inspector](https://docs.subcloak.com/cloak-proxy/inspect/llm-inspector/#in-ci). | No with `--session`; otherwise yes |
| `cloakctl mcp` | The Model Context Protocol server, on standard input and output. (added in Cloak Proxy 0.5.1) `--app`, `--host`, `--scope` and `--metadata-only` narrow the [assistant scope](https://docs.subcloak.com/cloak-proxy/automation/assistant-scope/) for that connection. | For traffic and proxy tools |
| `cloakctl collection list` | Collections, requests and environments in the workspace. | No |
| `cloakctl collection run` | Runs a collection, or a `.http` file (added in Cloak Proxy 0.4.1), with its tests and reporters. | No |
| `cloakctl collection import`, `export` (added in Cloak Proxy 0.4.1) | Adds a Postman, OpenAPI, HAR, Insomnia or `.http` file to the workspace, or writes a collection as a `.http` file. | No |
| `cloakctl query 'EXPR' [FILE]` (added in Cloak Proxy 0.4.1) | Requests matching a [typed query](https://docs.subcloak.com/cloak-proxy/inspect/query-language/), from a HAR or session file or the running app. `--fail-if-any` for CI. | Without a file |
| `cloakctl mock` | Serves a collection's saved examples on localhost. | No |
| `cloakctl perf` | Load tests a collection. | No |
| `cloakctl spec` | Lints, imports and syncs OpenAPI specs. | No |
| `cloakctl docs` | Writes a collection's API documentation as one HTML file. | No |
| `cloakctl flow` (added in Cloak Proxy 0.2.0) | Lists flows, or runs one with inputs. | No |
| `cloakctl monitor` (added in Cloak Proxy 0.2.0) | Lists monitors, or runs one now and adds the run to its history. | No |
| `cloakctl sdk` (added in Cloak Proxy 0.2.0) | Generates a TypeScript, Python or Swift client SDK from a collection. | No |
| `cloakctl mcp-server` (added in Cloak Proxy 0.2.0) | Generates a Node.js MCP server from a collection. | No |
| `cloakctl contract` (added in Cloak Proxy 0.4.0) | Checks a saved session against an OpenAPI spec (Markdown, JSON or JUnit), or drafts a spec from it. See [Contract checking](https://docs.subcloak.com/cloak-proxy/testing/contract-checking/#in-ci). | No |
| `cloakctl diff` (added in Cloak Proxy 0.4.0) | Compares two recordings of the same journey (Markdown or JSON) and fails on the differences you choose. See [Release diff](https://docs.subcloak.com/cloak-proxy/testing/release-diff/#in-ci). | No |
| `cloakctl tests` (added in Cloak Proxy 0.4.0) | Makes a test collection (Postman v2.1) from a recording, to run with `cloakctl collection run`; `--run` runs it at once. See [Make tests from traffic](https://docs.subcloak.com/cloak-proxy/testing/make-tests/#in-ci). | No |
| `cloakctl compare-envs` (added in Cloak Proxy 0.4.0) | Sends a recording's requests to another environment and reports what differs (Markdown or JSON). See [Compare environments](https://docs.subcloak.com/cloak-proxy/testing/compare-environments/#in-ci). | No |
| `cloakctl report` (added in Cloak Proxy 0.4.0) | Builds a bug-report bundle (summary, redacted HAR and session, replayable flow, cURL repros) from a HAR, a session or the running app. See [Report Bug](https://docs.subcloak.com/cloak-proxy/sessions/report-bug/#ai-assistants-and-the-command-line). | No (`--from-app` needs it) |
| `cloakctl authz` (added in Cloak Proxy 0.4.0) | Replays a saved session as other users and reports which endpoints leak data. See [Authorization matrix](https://docs.subcloak.com/cloak-proxy/testing/authorization-matrix/#from-the-command-line). | No |
| `cloakctl trace` (added in Cloak Proxy 0.4.0) | Checks trace propagation in a saved session (Markdown or JSON), or lists the requests in one trace. See [Distributed tracing](https://docs.subcloak.com/cloak-proxy/inspect/distributed-tracing/#ai-assistants-and-the-command-line). | No |
| `cloakctl rules TOOL …` (added in Cloak Proxy 0.4.0) | List, read, create, change, delete, enable and disable one tool's rules; switch the tool on or off. See [Manage rules from the command line](#manage-rules-from-the-command-line). | Yes |
| `cloakctl rules folders`, `sets`, … (added in Cloak Proxy 0.4.0) | Rule folders and sets: list, switch on and off, export, import. See [Rule folders and sets](#rule-folders-and-sets). | Yes |
| `cloakctl cert` (added in Cloak Proxy 0.4.0) | The root certificate: whether this Mac trusts it, its PEM, its file. | Yes |
| `cloakctl external-proxy` (added in Cloak Proxy 0.4.0) | Show, set or turn off the upstream proxy. | Yes |
| `cloakctl app-capture` (added in Cloak Proxy 0.5.0) | [App Capture](https://docs.subcloak.com/cloak-proxy/capture/capture-apps-that-ignore-the-proxy/): its state and picked apps; ask to capture an app, which you allow in Cloak Proxy. See [App Capture](#app-capture). | Yes |
| `cloakctl mcp on\|off\|status` (added in Cloak Proxy 0.4.0) | Let AI assistants use the app, or lock them out. | Yes |
| `cloakctl toxiproxy on\|off\|status` (added in Cloak Proxy 0.4.0) | The [Toxiproxy-compatible API](https://docs.subcloak.com/cloak-proxy/automation/toxiproxy/). | Yes |
| `cloakctl scenarios` (added in Cloak Proxy 0.4.0) | Lists failure scenarios, switches them on and off, creates one from a template, and reads the log of what they did. See [Failure scenarios](#failure-scenarios). | Yes |
| `cloakctl skills` (added in Cloak Proxy 0.4.0) | Lists, installs, updates, removes or exports the agent skills for Claude Code, Codex or a folder. See [Agent skills](https://docs.subcloak.com/cloak-proxy/automation/agent-skills/#from-the-command-line). | No |
| `cloakctl setup` (added in Cloak Proxy 0.4.0) | Prints the guided capture checklist for a target and applies steps, such as installing the certificate in booted simulators. | No (asks the app when it's running) |
| `cloakctl browser` (added in Cloak Proxy 0.4.0) | Opens a capturing browser (Chrome, Chromium, Edge, Brave or Firefox in its own proxied profile), or lists them. See [Capture targets](#capture-targets). | No |
| `cloakctl electron` (added in Cloak Proxy 0.4.0) | Starts an Electron app with capture, or lists them. | No |
| `cloakctl capture-config` (added in Cloak Proxy 0.4.0) | Generates or writes a Docker Compose override, `docker run` flags, an env file, a Flutter proxy file or an Android network security config. | No |
| `cloakctl env` (added in Cloak Proxy 0.4.0) | Prints the proxy variables for zsh, bash, fish or PowerShell: `eval "$(cloakctl env)"`. | No |
| `cloakctl docs-search` (added in Cloak Proxy 0.4.0) | Searches these docs offline. | No |
| `cloakctl scope` (added in Cloak Proxy 0.5.1) | The active [scope](https://docs.subcloak.com/cloak-proxy/security/scope/): check URLs, create, import, include, exclude and activate scopes. See [Security testing](#security-testing). | Yes |
| `cloakctl tokens` (added in Cloak Proxy 0.5.1) | Tokens and sign-in flows in the captured traffic, with their findings. See [Tokens and sign-in](https://docs.subcloak.com/cloak-proxy/security/tokens-and-sign-in/). | Yes |
| `cloakctl fuzz` (added in Cloak Proxy 0.5.1) | Runs the [request fuzzer](https://docs.subcloak.com/cloak-proxy/security/request-fuzzer/) against hosts you pass with `--scope`; a dry run without `--confirm`. | No |
| `cloakctl ai-scan`, `mcp-pins`, `guard` (added in Cloak Proxy 0.5.1) | Prompt injection and leaked secrets in a session, MCP tool pins and the AI Guard. See [AI security](https://docs.subcloak.com/cloak-proxy/security/ai-security/#from-the-command-line). | No with `--session`; otherwise yes |
| `cloakctl team` (added in Cloak Proxy 0.7.0) | [Team Cloud](https://docs.subcloak.com/cloak-proxy/team/overview/): `whoami` and `pull` a team set with a CI token, `ci create` a CI token on an admin's Mac, and `audit verify` an exported audit log. See [Team Cloud](#team-cloud). | No |
| `cloakctl mcp-exec` (added in Cloak Proxy 0.7.0) | Starts a [shared team MCP server](https://docs.subcloak.com/cloak-proxy/team/agent-setups/) with its vault references filled in for you. Agent configs that Cloak Proxy installs run it; you don't run it yourself. | No |
| `cloakctl findings` (added in Cloak Proxy 0.5.1) | Lists, shows, exports, creates, imports and checks an engagement's [findings](https://docs.subcloak.com/cloak-proxy/security/findings/). | No |

## Run a headless proxy

`cloakctl run` starts a capture proxy without the app. It uses the same engine, the same root certificate and the same debugging-tool rules format as the app, and prints one line per finished request. Use it on a Mac where you don't want the app open, in scripts, or to wrap a test command in CI. The CI options are covered in depth in [Headless runs and CI](https://docs.subcloak.com/cloak-proxy/automation/headless-and-ci/).

```bash title="Terminal"
cloakctl run --port 9091 --ssl 'api.example.com' --ssl '*.example.com'
```

On start it writes the listening address and the certificate path to standard error:

```text
Cloak Proxy listening on 127.0.0.1:9091
CA: /Users/ada/Library/Application Support/CloakProxy/cloak-proxy-ca.pem
```

### Proxy options

| Flag | Value | What it does |
|---|---|---|
| `--port` | Number | Port to listen on. Default `9090`. Pick another port, such as `9091`, while the app is running on `9090`. |
| `--ssl` | Host pattern | Decrypts HTTPS for hosts matching the pattern. Repeat for several. Wildcards work: `*.example.com`, or `'*'` for everything. Without it, HTTPS passes through as encrypted tunnels. |
| `--ssl-app` | App name | Decrypts every HTTPS connection from that app. Repeat for several. From 0.4.2, a browser's name (Google Chrome, Firefox, Safari…) prints a warning to stderr: decrypting all of a browser's traffic breaks sign-ins and bot-protected sites, and `cloakctl browser` opens a Capturing Browser instead. (added in Cloak Proxy 0.4.2) |
| `--tools` | Path to a JSON file | Loads debugging-tool rules, and which tools are on, from a file made with **Tools › Export Rules…** (Map Local, Map Remote, Scripting, Block List and the rest). |
| `--keylog` | Path | Writes TLS session keys in `SSLKEYLOGFILE` format for Wireshark. |
| `--all-interfaces` | None | Listens on `0.0.0.0` so other devices can connect. By default it listens on `127.0.0.1` only. |
| `--scope` (added in Cloak Proxy 0.5.1) | Path to a `.cloakscope.json` file | Holds the run to a [scope](https://docs.subcloak.com/cloak-proxy/security/scope/): traffic outside it isn't recorded. |
| `--out-of-scope` (added in Cloak Proxy 0.5.1) | `dontRecord`, `block` or `record` | With `--scope`: what happens to traffic outside it. `dontRecord` is the default; `block` answers 403 and closes tunnels. |

### Recording and CI options

| Flag | Value | What it does |
|---|---|---|
| `--record` | Path | Saves the traffic when the run ends: HAR if the file ends in `.har`, otherwise a Cloak Proxy session (`.cloaksession`). |
| `--redact` | None | Removes tokens, cookies, passwords and keys from the recording. |
| `--report` | Path | Writes a Markdown report: endpoints with calls, errors, p50 and p95; possible secrets (masked); security header grades; performance findings; and schema changes. When the run made model calls, the report has an AI section (tokens, cost, failures by model). |
| `--mock` | Path to a `.har` or `.cloaksession` | Answers requests from a recording instead of the network, for offline tests. Unrecorded requests to a recorded host get a `404`. |
| `--trace HOST_PATTERN` (added in Cloak Proxy 0.4.0) | Adds a sampled W3C `traceparent` to requests for matching hosts, so each one gets a backend trace. Repeatable. `--trace-unsampled` clears the sampled flag. |
| `--duration` | Seconds | Stops after this long. |
| `--quiet` | None | Doesn't print each request. |
| `--fail-on-5xx` | None | Exits with `1` if any response was a server error. |
| `--fail-on-error` | None | Exits with `1` on any 4xx, 5xx or failed request. |
| `--fail-on-secrets` | None | Exits with `1` if high-severity secrets were found. |
| `--fail-on-schema-change` | None | Exits with `1` if an endpoint's JSON shape changed during the run. |
| `--` | A command and its arguments | Runs the command with the proxy and certificate environment set, and stops the proxy when it exits. Must come last. |

The run stops on <kbd>Control</kbd> <kbd>C</kbd>, on `SIGTERM`, after `--duration`, or when the command after `--` exits. Then it writes the recording and the report, and prints a one-line summary to standard error:

```text
42 requests, 9 endpoints, 1 errors, 0 possible secrets, 0 schema changes
```

### What each output line shows

Each finished request prints as one line:

| Part | Example | Meaning |
|---|---|---|
| Id | `#12` | The request's number in this run. |
| App | `[node]` | The app that sent it, or `?` when it can't be identified. |
| Status | `200`, `TUN`, `ERR` | The response status, `TUN` for an HTTPS connection passed through without decrypting, or `ERR` for a failure. |
| Method and URL | `GET https://api.example.com/v1/users` | The request. |
| Duration and size | `84ms 2 KB` | Time to complete and response body size. |

Decrypted requests end with a lock symbol. Failed requests print the error message on an indented second line.

### Print the certificate path

```bash title="Terminal"
cloakctl ca
```

Prints the path of the Cloak Proxy root certificate (`~/Library/Application Support/CloakProxy/cloak-proxy-ca.pem`). If no certificate exists yet, it creates one first. Use it to point a runtime at the certificate, for example `export NODE_EXTRA_CA_CERTS="$(cloakctl ca)"`.

## Read traffic from the running app

These commands ask the running app (or a running `cloakctl run`) for what it captured, through the local [control API](https://docs.subcloak.com/cloak-proxy/automation/control-api/). They find the app's port in its saved settings. If the proxy listens somewhere else, add `--port N`.

```bash title="Terminal"
cloakctl status
cloakctl list --host api.example.com --errors --limit 20
cloakctl list --query 'status:5xx app:MyApp'
cloakctl show 12
cloakctl curl 12
cloakctl replay 12
cloakctl export --out session.har
```

| Command | Options | Output |
|---|---|---|
| `cloakctl status` | `--port N` | JSON: `app`, `port`, `recording`, `flowCount` and `activeTools`. |
| `cloakctl list` | `--search TEXT` (URL or app name contains it), `--host HOST` (host contains it), `--graphql OPERATION` (GraphQL requests whose operation contains it) (added in Cloak Proxy 0.4.0), `--query 'EXPR'` (a [typed query](https://docs.subcloak.com/cloak-proxy/inspect/query-language/)) (added in Cloak Proxy 0.4.1), `--errors` (only failures, 4xx/5xx and GraphQL errors), `--limit N` (default `50`), `--port N` | One line per request, newest last: `#12 200 GET [Safari] https://api.example.com/v1/users 84ms`. Tunnels show `TUN`, failures `ERR`. GraphQL requests add the operation in braces and any errors: `#52 200 POST [ShopApp] https://api.shopapp.example/graphql {mutation CreateOrder} 410ms GraphQL errors: PAYMENT_DECLINED: Your card was declined.` |
| `cloakctl show ID` | `--port N` | Pretty JSON with the summary fields, request and response headers and bodies, and WebSocket messages. |
| `cloakctl curl ID` | `--port N` | The request as a `curl` command. |
| `cloakctl replay ID` | `--port N` | Sends the request again, unchanged, through the proxy, and prints the new request and response as JSON. The replay also appears in the app. |
| `cloakctl export` | `--out FILE`, `--since ID\|ISO8601-TIME` (added in Cloak Proxy 0.4.0), `--port N` | Every request the proxy remembers, as HAR. Without `--out` it writes to standard output. `--since` exports only requests newer than a request id, or started at or after a time. |

These commands see the proxy engine's own list of the most recent 5,000 requests. That list starts empty each time the proxy restarts, isn't emptied by **Clear Session**, and doesn't include sessions you open from files.

> **Exports contain secrets:**
> `cloakctl export` and `cloakctl show` print cookies, tokens and bodies exactly as captured. Treat the output like a password file. To share traffic, export from the app with **Redact secrets** turned on, or record with `cloakctl run --redact`. See [Redaction](https://docs.subcloak.com/cloak-proxy/sessions/redaction/).

If the app isn't running, these commands stop with:

```text
error: Couldn't reach Cloak Proxy on port 9090. Is the app (or `cloakctl run`) running? (…)
```

### Filter a recording with a query

(added in Cloak Proxy 0.4.1)

`cloakctl query` prints the requests that match a [typed query](https://docs.subcloak.com/cloak-proxy/inspect/query-language/), from a HAR or session file, or from the running app when you don't give a file.

```bash title="Terminal"
cloakctl query 'status:5xx -host:*.example.net' run.har --fail-if-any
cloakctl query 'app:ShopApp dur:>1s' --count
cloakctl query --explain 'status:5xx app:ShopApp'
```

See [Query language › command line](https://docs.subcloak.com/cloak-proxy/inspect/query-language/#use-queries-from-the-command-line) for every option.

### Manage rules from the command line

(added in Cloak Proxy 0.4.0)

`cloakctl rules TOOL` lists, creates and changes one tool's rules in the running app, so a script or CI job can set up mocks and breakpoints. `TOOL` is `mapLocal`, `mapRemote`, `rewrite`, `breakpoint`, `scripting`, `blockList`, `allowList`, `networkConditions`, `dnsSpoofing`, `mockSets` or `alerts`.

```bash title="Terminal"
cloakctl rules mapLocal create --url 'api.example.com/v1/cart' --name "Empty cart" --status 200 --body '{"items":[]}'
cloakctl rules mapLocal list
cloakctl rules mapRemote test 6F1C2A3B-0000-4000-8000-00000000AB12 --url 'https://api.example.com/v1/orders?page=2'
cloakctl rules mapLocal disable 6F1C2A3B-0000-4000-8000-00000000AB12
cloakctl rules rewrite create --json rule.json      # fields as in `cloakctl rules rewrite example`
cloakctl rules breakpoint off
```

| Command | What it does |
|---|---|
| `cloakctl rules TOOL [list]` | The tool's rules |
| `cloakctl rules TOOL get ID` | One rule as JSON |
| `cloakctl rules TOOL create --json FILE` | A new rule from a JSON file, or `-` for standard input. Fields as in `cloakctl rules TOOL example`. |
| `cloakctl rules TOOL create --url PATTERN [--name NAME] [--method GET] [--folder "A › B"] [--status N --body TEXT]` | A new rule from flags. `--folder` puts it in a folder, created when needed. |
| `cloakctl rules TOOL update ID --json FILE` | Changes the given fields |
| `cloakctl rules TOOL delete ID`, `enable ID`, `disable ID` | Deletes a rule, or turns it on or off |
| `cloakctl rules TOOL on`, `off` | Switches the whole tool |
| `cloakctl rules TOOL example` | Every field a rule of the tool has |
| `cloakctl rules TOOL test ID\|--json FILE --url URL [--method GET]`, or `--request ID` (added in Cloak Proxy 0.5.1) | Whether a saved rule (or rule fields; with both, that rule with those fields changed) matches a URL or a captured request, the first reason it doesn't, and what the tool does with it, such as the URL Map Remote sends it to. Changes nothing; exits 1 when it doesn't match, so a script can check a rule before relying on it. |

```text title="Terminal"
$ cloakctl rules mapRemote test --json remote.json --url 'https://api.example.com/v1/orders?page=2'
Matches   https://api.example.com/v1/orders?page=2
  Sent here instead
  → http://localhost:8080/orders?page=2
```

### Certificate, upstream proxy and assistants

(added in Cloak Proxy 0.4.0)

| Command | What it does |
|---|---|
| `cloakctl cert [info\|pem\|path]` | The root certificate: whether this Mac trusts it, its PEM text, or its file |
| `cloakctl external-proxy [show]` | The upstream proxy every request goes through |
| `cloakctl external-proxy set HOST:PORT [--socks] [--user NAME --password-env VAR]` | Sets the upstream proxy. The password is read from the environment variable `VAR`, so it never appears in your shell history. Up to 0.4.1 a SOCKS5 proxy ignores the username and password; from 0.4.2 it uses them. (added in Cloak Proxy 0.4.2) |
| `cloakctl external-proxy off` | Turns the upstream proxy off |
| `cloakctl mcp on\|off\|status` | Lets AI assistants use the app, or locks them out. While it's off, `cloakctl mcp` (the MCP server assistants run) is refused with *MCP access to Cloak Proxy is turned off*; every other `cloakctl` command keeps working, including `cloakctl mcp on`. The setting is saved. |
| `cloakctl toxiproxy on [--api-port 8474]\|off\|status` | The [Toxiproxy-compatible API](https://docs.subcloak.com/cloak-proxy/automation/toxiproxy/) on `127.0.0.1` |

### Rule folders and sets

(added in Cloak Proxy 0.4.0)

`cloakctl rules` switches [rule folders and sets](https://docs.subcloak.com/cloak-proxy/tools/folders-and-sets/) in the running app, for example to turn a test scenario on before a UI test run and off after it.

| Command | What it does |
|---|---|
| `cloakctl rules folders [--tool TOOL]` | Every folder: tool, path, on or off, rule count and sets |
| `cloakctl rules folder enable NAME [--tool TOOL]` | Turns a folder on. `disable` turns it off. |
| `cloakctl rules folder create NAME --tool TOOL [--parent NAME]` | Creates a folder |
| `cloakctl rules folder delete NAME [--tool TOOL] [--delete-rules]` | Deletes a folder; its rules move up a level unless you add `--delete-rules` |
| `cloakctl rules sets` | Every set, the active one marked with `*` |
| `cloakctl rules set activate NAME` | Turns the set's folders on and every other set's folders off |
| `cloakctl rules set off` | Turns every set's folders off |
| `cloakctl rules set create NAME [--folders A,B]` | Creates a set from those folders, or from the folders that are on now |
| `cloakctl rules set delete NAME` | Deletes a set |
| `cloakctl rules export --set NAME` or `--folder NAME` `[--out FILE]` | Writes a set or a folder, with its rules, as a rules file |
| `cloakctl rules import FILE` | Adds a rules file, from `export` or **Tools › Export Rules…** |

`NAME` is a folder name, a `"Parent › Child"` path or an id; `TOOL` is a tool name such as `mapLocal`, `breakpoint`, `rewrite` or `blockList`.

```bash title="Terminal"
cloakctl rules set activate "Payment declined"
npm run test:e2e
cloakctl rules set off
```

### Failure scenarios

(added in Cloak Proxy 0.4.0)

`cloakctl scenarios` switches [failure scenarios](https://docs.subcloak.com/cloak-proxy/tools/failure-scenarios/) in the running app around a test run, and reads what they did.

| Command | What it does |
|---|---|
| `cloakctl scenarios` | Every scenario: on or off, its faults, and how many requests each broke |
| `cloakctl scenarios on NAME` | Switches a scenario on; its counts start again. `off` switches it off, `reset` resets its counts, `delete` deletes it. |
| `cloakctl scenarios templates` | The built-in templates |
| `cloakctl scenarios create --template NAME --url PATTERN [--operation GRAPHQL_NAME] [--name NAME] [--on]` | Creates a scenario from a template, for the requests matching the URL pattern (and GraphQL operation) |
| `cloakctl scenarios log [NAME] [--limit N] [--json]` | What each fault did to each request |

```bash title="Terminal"
cloakctl scenarios create --template "Flaky API" --url 'api.example.com/v1/orders*' --on
npm run test:e2e
cloakctl scenarios log "Flaky API"
cloakctl scenarios off "Flaky API"
```

### Focus, muting and retention

(added in Cloak Proxy 0.5.4)

Record only some apps and hosts, mute hosts, and set how much traffic the running app keeps. See [Focus mode and session size](https://docs.subcloak.com/cloak-proxy/capture/focus-and-retention/).

```
cloakctl focus                           What's in focus, and how many requests weren't recorded
cloakctl focus set [--app NAME]... [--host HOST]...
                                         Record only these apps and hosts (everything else passes through untouched)
cloakctl focus add|remove [--app NAME]... [--host HOST]...
cloakctl focus off                       Record everything again (the list is kept)
cloakctl focus on                        Focus on the last list again
Hosts: api.example.com, or *.example.com for the domain and every subdomain.
cloakctl mute                            Muted apps and hosts
cloakctl mute app NAME | host HOST [--domain]   Stop recording an app, a host or (--domain) its whole domain
cloakctl unmute app NAME | host HOST
cloakctl retention                       How many requests, and days of them, the session keeps
cloakctl retention [--requests 50000|100000|250000|500000] [--days 1|3|7|0]
Add --json for the raw reply.
```

### Share links

(added in Cloak Proxy 0.6.0)

Create, list and revoke [Personal Cloud share links](https://docs.subcloak.com/cloak-proxy/cloud/share-links/) through the running app. They need a Personal Cloud plan, and the app asks you before every link is made.

```
cloakctl share --ids 12,13 | --query 'host:api.example.com status:>=500' | --file SESSION.har
               [--name NAME] [--expires 1h|24h|7d|30d] [--max-views N] [--password-stdin] [--no-bodies] [--no-redact]
                                         Create a link (redacted unless --no-redact) and print it;
                                         --file shares a saved .cloaksession, .cloak or .har file instead
cloakctl share links [--activity]        Links this Mac made: status, expiry, views (not the links);
                                         --activity also lists when and from which country each was opened
cloakctl share revoke ID                 Revoke a link: it stops working and its data is deleted
Add --json for the raw reply.
```

## Team Cloud

(added in Cloak Proxy 0.7.0)

Commands for [Team Cloud](https://docs.subcloak.com/cloak-proxy/team/overview/). In CI they use a [CI token](https://docs.subcloak.com/cloak-proxy/team/ci/) from the `CLOAK_TEAM_TOKEN` environment variable (or `--token-file PATH`); on a member's Mac they use that Mac's team keys. {/* PLAN 7.9, 7.13, 7.15; T12; flags from cloakctl-team.md and Sources/cloakctl (R4D-L5). */}

```
cloakctl run --team-mocks ID --team-rules ID [--record FILE --upload --library ID --tag TAG] -- COMMAND
                                         Run COMMAND with team mock and rule sets applied; --upload
                                         sends the recording to the team library whose id --library names
cloakctl team whoami                     The CI token's team, its CI member id, and the sets it can read
cloakctl team pull --space ID --out DIR  Export a team set the token can read into a folder
cloakctl team ci create --label LABEL [--read SPACE]... [--upload SPACE] [--team TEAM_ID]
                                         Make a CI token (on an admin's Mac); it's shown once
cloakctl team audit verify FILE.jsonl --security-code CODE [--at-change N]
                                         Check an exported audit log against your team (or --unpinned)
cloakctl mcp-exec --team TEAM_ID --space SPACE_ID --server SERVER_ID --pin HASH
                                         Start a shared team MCP server for the person running it
```

See [CI with cloakctl](https://docs.subcloak.com/cloak-proxy/team/ci/) for a GitHub Actions example.

## Start the MCP server

```bash title="Terminal"
cloakctl mcp
```

Starts a Model Context Protocol server on standard input and output. You don't run this yourself; your AI assistant starts it. It accepts three options:

| Flag | What it does |
|---|---|
| `--port N` | Talks to a proxy on this port instead of the app's configured one. |
| `--workspace DIR` | Uses this API-client workspace folder instead of the app's. |
| `--no-redact` | Returns credentials in tool results as captured, whatever the app's **Redact sensitive data before sending to AI** setting. |
| `--app NAME`, `--host HOST`, `--scope QUERY`, `--metadata-only` (added in Cloak Proxy 0.5.1) | Narrow the [assistant scope](https://docs.subcloak.com/cloak-proxy/automation/assistant-scope/) for this connection: one app, a host, a typed query, or metadata only. They can't widen what the app allows. See [MCP server](https://docs.subcloak.com/cloak-proxy/automation/mcp-server/#options). |

Setup for Claude Code, Claude Desktop, Cursor and VS Code is on [MCP server](https://docs.subcloak.com/cloak-proxy/automation/mcp-server/).

## Security testing

(added in Cloak Proxy 0.5.1)

These commands work with the [Security testing](https://docs.subcloak.com/cloak-proxy/security/scope/) tools. Run any of them without arguments, or with `--help`, for every option.

```bash title="Terminal"
# Scope: the hosts and paths you may test
cloakctl scope                                    # the active scope and its rules
cloakctl scope check https://api.example.com/v1/orders cdn.example.com
cloakctl scope import engagement-scope.json       # Cloak Proxy, Burp Suite or a host list
cloakctl scope exclude payments.example.com

# Tokens and sign-in flows (passive)
cloakctl tokens --section findings

# The request fuzzer: a dry run, then the real run
cloakctl fuzz --request order.txt --numbers 1:1000 --scope api.example.com --grep forbidden
cloakctl fuzz --request order.txt --numbers 1:1000 --scope api.example.com --grep forbidden --rate 20 --confirm

# AI security
cloakctl ai-scan --session run.cloaksession --fail-on high
cloakctl mcp-pins check --session run.cloaksession --pins mcp-pins.json
cloakctl guard test "mail ada@example.com"

# Findings and reports
cloakctl findings list ./pentest
cloakctl findings export ./pentest --format pdf --out report.pdf
cloakctl findings check ./pentest --fail-on high
```

`cloakctl scope include` and `activate` widen what tools may reach, so Cloak Proxy asks you to allow them; `exclude` applies at once. `cloakctl tokens`, `mcp-pins list` and `guard log` read the running app. `fuzz`, `ai-scan --session`, `mcp-pins check` and `findings` work without it. See [Scope](https://docs.subcloak.com/cloak-proxy/security/scope/), [Tokens and sign-in](https://docs.subcloak.com/cloak-proxy/security/tokens-and-sign-in/), [Request fuzzer](https://docs.subcloak.com/cloak-proxy/security/request-fuzzer/), [AI security](https://docs.subcloak.com/cloak-proxy/security/ai-security/) and [Findings and reports](https://docs.subcloak.com/cloak-proxy/security/findings/).

## Run the API client workspace

The workspace commands read and write the API client's workspace folder directly, so they work without the app. If the app is open, it picks up changes.

Each command looks for the workspace in this order:

1. The folder given with `--workspace DIR`.
2. The folder chosen in the app's API client.
3. `~/Library/Application Support/CloakProxy/Workspace`.

Where a command takes a collection, you can pass its name, its id, or the path to a Postman collection or OpenAPI file. See [Workspace and Git](https://docs.subcloak.com/cloak-proxy/api-client/workspace-and-git/) for the folder layout.

### List collections

```bash title="Terminal"
cloakctl collection list --workspace ~/code/shop-api
```

Prints each collection with its request count and id, then each request's method (or protocol), folder path and URL, then the names of the environments.

### Import and export collections

(added in Cloak Proxy 0.4.1)

```bash title="Terminal"
cloakctl collection import requests.http --workspace ~/code/shop-api
cloakctl collection export "Shop API" --out shop.http --folder Orders
```

`collection import` adds a Postman collection, OpenAPI spec, HAR, Insomnia export or `.http`/`.rest` file to the workspace. `collection export` writes a collection, or one folder with `--folder`, as a `.http` file. See [.http files](https://docs.subcloak.com/cloak-proxy/api-client/http-files/).

### Run a collection

`cloakctl collection run` runs a collection with its scripts, tests, auth and variables, like Newman. It runs every request type the API client has: HTTP, GraphQL, gRPC, MCP, AI, SQL, WebSocket, Socket.IO, MQTT and TCP. See [Collection runner](https://docs.subcloak.com/cloak-proxy/api-client/run/collection-runner/) for how runs work.

```bash title="Terminal"
cloakctl collection run "Shop API" -e Staging -d users.csv -n 1 \
  -r cli,junit --reporter-junit-export results/api.xml
```

| Flag | Value | What it does |
|---|---|---|
| `-e`, `--environment` | Environment name, or a Postman environment `.json` file | The environment to use. Default: the workspace's active environment. |
| `-g`, `--globals` | Postman globals `.json` file | Globals to use instead of the workspace's. |
| `-d`, `--iteration-data` | `.csv` or `.json` file, or a dataset name | One iteration per row. Columns become variables. See [Datasets and data files](https://docs.subcloak.com/cloak-proxy/api-client/run/datasets-and-data-files/). |
| `-n`, `--iteration-count` | Number | How many times to run. Default `1`. |
| `--folder` | Folder name | Runs only that folder (found at any depth). |
| `--delay-request` | Milliseconds | Pause between requests. Default `0`. |
| `--bail` | None | Stops at the first request that errors or has a failing test. |
| `--timeout-request` | Milliseconds | Timeout for every request, overriding each request's own setting. |
| `--insecure`, `-k` | None | Doesn't verify TLS certificates for any request. |
| `--env-var` | `KEY=VALUE` | Adds a variable to the environment. Repeat for several. With no environment, creates one named `CLI`. |
| `-r`, `--reporters` | Comma-separated list: `cli`, `json`, `junit`, `html` | Which reports to produce. Default `cli`. |
| `--reporter-json-export` | Path | Where the JSON report goes. Default `cloak-run.json`. |
| `--reporter-junit-export` | Path | Where the JUnit XML report goes. Default `cloak-run.xml`. |
| `--reporter-html-export` | Path | Where the HTML report goes. Default `cloak-run.html`. |
| `--workspace` | Folder | The workspace to use. |

Instead of a collection, you can give the path to a `.http` or `.rest` file (added in Cloak Proxy 0.4.1). With `-e NAME`, the environment's values include those of the environment it's [based on](https://docs.subcloak.com/cloak-proxy/api-client/variables-and-environments/#environments-built-on-a-base) and its `.env` files.

The `cli` reporter prints each request's folder path, method, URL, status, size and time, then a check mark or cross per test, console output, and script errors. It ends with a summary:

```text
requests 12 (0 failed) · tests 31 (1 failed) · avg response 142ms · total 2310ms
```

The command exits with `0` when every request and test passed, and `1` otherwise.

### Serve mocks

```bash title="Terminal"
cloakctl mock "Shop API" --port 4010
```

Serves the collection's saved examples on `http://localhost:4010` until you press <kbd>Control</kbd> <kbd>C</kbd>. Without `--port`, it picks a free port and prints it. Each call prints as `GET /v1/users → 200 (Example name)`, or `(no example)` when nothing matched. Variables come from the active environment. See [Mock servers](https://docs.subcloak.com/cloak-proxy/api-client/run/mock-servers/).

### Load test

```bash title="Terminal"
cloakctl perf "Shop API" --vus 20 --duration 60 --profile rampUp -e Staging
```

| Flag | Value | What it does |
|---|---|---|
| `--vus` | Number | Virtual users. Default `10`. |
| `--duration` | Seconds | How long to run. Default `30`. |
| `--profile` | `fixed`, `rampUp`, `spike` or `peak` | Load shape. Default `fixed`. |
| `--think-time` | Milliseconds | Pause between each user's iterations. Default `0`. |
| `-e` | Environment name or file | The environment to use. |
| `--workspace` | Folder | The workspace to use. |

It prints one line per second (active users, requests per second, average and p95 latency, errors), then totals with p90, p95 and p99 and a line per request. It exits with `1` if any request failed. See [Load testing](https://docs.subcloak.com/cloak-proxy/api-client/run/load-testing/).

### Work with OpenAPI specs

| Command | What it does | Exit code |
|---|---|---|
| `cloakctl spec lint FILE.yaml` | Checks a spec and prints each problem with its severity, rule, message and location. | `1` if any problem is an error |
| `cloakctl spec import FILE.yaml` | Adds the spec to the workspace with a linked collection generated from it. | `0` |
| `cloakctl spec sync FILE.yaml` | Updates the workspace spec with the same title from the file, then syncs its linked collection. Add `--spec NAME` when the names differ. | `0` |
| `cloakctl spec sync SPEC_NAME` | Syncs a workspace spec's linked collection without changing the spec. | `0` |

Sync keeps your tests, scripts, auth and examples, and prints each added (`+`), updated (`~`) and removed (`-`) request. All three accept `--workspace DIR` except `lint`. See [Specs](https://docs.subcloak.com/cloak-proxy/api-client/run/specs/).

### Generate documentation

```bash title="Terminal"
cloakctl docs "Shop API" --out shop-api-docs.html
```

Writes the collection's documentation as one self-contained HTML file, with the active environment's values. See [Generate docs, SDKs and MCP servers](https://docs.subcloak.com/cloak-proxy/api-client/run/generate-docs-sdks-and-mcp-servers/).

### Run a flow

(added in Cloak Proxy 0.2.0)

```bash title="Terminal"
cloakctl flow list
cloakctl flow run "Create and fetch a pet" --input petName=Rex --input limit=5 -e Staging
```

`cloakctl flow list` prints each [flow](https://docs.subcloak.com/cloak-proxy/api-client/run/flows/) in the workspace with its number of blocks. `cloakctl flow run NAME` runs one, by name or id, the same way the **Run** button does.

| Flag | Value | What it does |
|---|---|---|
| `--input` | `KEY=VALUE` | Sets one of the flow's inputs for this run, replacing the saved value. Repeat for several. |
| `-e` | Environment name, or a Postman environment `.json` file | The environment to use. Default: the workspace's active environment. |
| `--workspace` | Folder | The workspace to use. |

It prints each block on its own line, indented like the flow, with `✓` for a block that passed, `✗` for one that failed and `·` for the rest, followed by any `output NAME = value` lines and a last line such as `Create and fetch a pet: passed in 412 ms`. The command exits with `0` when the flow passed and `1` when it failed, so a CI job or a cron entry can act on it.

### Run a monitor

(added in Cloak Proxy 0.2.0)

```bash title="Terminal"
cloakctl monitor list
cloakctl monitor run "Petstore health"
```

`cloakctl monitor list` prints each [monitor](https://docs.subcloak.com/cloak-proxy/api-client/run/monitors-and-webhooks/) with its interval and whether its last run passed, failed or never ran. `cloakctl monitor run NAME` runs the monitor's collection once, now, with the monitor's environment and your globals, prints the same summary as `collection run`, and adds the run to the monitor's history in the workspace, so it shows up in the app. It exits with `1` when a request or test failed. Both accept `--workspace DIR`.

Use it from cron or launchd to keep a monitor running while the app is closed.

### Generate an SDK

(added in Cloak Proxy 0.2.0)

```bash title="Terminal"
cloakctl sdk "Petstore" --language python --out ./petstore-python-sdk
```

Writes a client SDK for the collection straight into the `--out` folder, creating it if needed and replacing files with the same names, and prints how many files it wrote. (The app instead creates a `<collection>-<language>-sdk` folder inside the folder you choose.) `--language` is `typescript` (the default), `python` or `swift`. `--out` is required. Add `--workspace DIR` for a different workspace. See [Client SDKs](https://docs.subcloak.com/cloak-proxy/api-client/run/generate-docs-sdks-and-mcp-servers/#client-sdks).

### Generate an MCP server

(added in Cloak Proxy 0.2.0)

```bash title="Terminal"
cloakctl mcp-server "Petstore" --out ./petstore-mcp
cloakctl mcp-server "Petstore" --out petstore-mcp.zip
```

Writes a ready-to-run Node.js MCP server with one tool per request in the collection. When `--out` ends in `.zip`, it writes a zip with the project in a folder named after the collection, like the app does. Otherwise it writes the project's files straight into the `--out` folder, creating it if needed and replacing files with the same names. It prints the number of tools; run `npm install` and then `npm start` in the project. Add `--workspace DIR` for a different workspace. See [MCP servers](https://docs.subcloak.com/cloak-proxy/api-client/run/generate-docs-sdks-and-mcp-servers/#mcp-servers).

> **Generated servers send real requests:**
> Each tool in a generated MCP server sends its request with your credentials, including `DELETE` and `POST` requests. Remove tools you don't want an assistant to call before you connect one.

## Capture targets

(added in Cloak Proxy 0.4.0)

Start a browser or an Electron app with capture, or generate what gets a container, Flutter app or Android app's traffic in. They ask the app when it's running, and otherwise use the certificate on disk and the port (`--port`, default the app's port or `9090`).

```bash title="Terminal"
cloakctl browser [chrome|chromium|edge|brave|firefox] [--url URL] [--fresh] [--no-localhost] [--dry-run]
cloakctl browser --list
cloakctl electron APP [--relaunch] [--no-localhost] [--dry-run]
cloakctl electron --list
cloakctl capture-config docker-compose --project DIR [--service NAME]... [--write]
cloakctl capture-config docker-run [--service NAME]
cloakctl capture-config env-file [--service NAME]
cloakctl capture-config flutter [--project DIR] [--device ios_simulator|android_emulator|android_usb|device] [--write]
cloakctl capture-config android [--project DIR] [--trust bundled|user] [--domain D]... [--write]
cloakctl env [--shell zsh|bash|fish|powershell]
```

Without `--write`, `capture-config` prints what it would write. Add `--json` for the full result. `cloakctl setup` takes `--project` and `--relaunch` for the matching steps:

```bash title="Terminal"
cloakctl setup docker --apply compose-override --project .
cloakctl setup electron --app "Notes Studio" --apply launch-electron --relaunch
```

They exit with 1 on errors (an app that isn't installed, a folder without a compose file).

## App Capture

(added in Cloak Proxy 0.5.0)

From 0.5.0, [App Capture](https://docs.subcloak.com/cloak-proxy/capture/capture-apps-that-ignore-the-proxy/) in the running app (macOS). Asking to capture an app or turn App Capture on only shows the request in Cloak Proxy; you click **Allow** there.

```bash title="Terminal"
cloakctl app-capture [status] [--json]      # the extension's state and the picked apps
cloakctl app-capture capture APP            # ask to add an app (a name, or the path of an .app or a tool) and turn it on
cloakctl app-capture add|enable APP         # ask to add an app, or to capture one that's turned off
cloakctl app-capture on                     # ask to turn App Capture on
cloakctl app-capture remove|disable APP     # stop capturing an app (disable keeps it in the list)
cloakctl app-capture off                    # turn App Capture off
cloakctl app-capture quic on|off            # block captured apps' HTTP/3 so they use TCP (on by default)
```

All take `--port PORT` (default: the app's port, else 9090). A relative path to a file is made absolute, so the app can read the tool's signature. While a request waits, the command prints **Waiting for you to click Allow in Cloak Proxy (App Capture).** It exits with 1 on errors.

## Exit codes

| Command | `0` | `1` | Other |
|---|---|---|---|
| `run` | No `--fail-on-…` check failed and the wrapped command (if any) succeeded | A `--fail-on-…` check failed, or an option was wrong | The wrapped command's own exit code; `127` if it couldn't start |
| `collection run` | Every request and test passed | A request or test failed | |
| `perf` | No request failed | Any request failed | |
| `flow run` | The flow passed | The flow failed | |
| `monitor run` | Every request and test passed | A request or test failed | |
| `spec lint` | No errors (warnings are fine) | At least one error | |
| `contract check` | No request broke the contract | A usage error | `2`: a request had an error (or a warning, with `--fail-on warning`) |
| `diff` | No difference matched `--fail-on` | A usage error | `2`: a difference matched `--fail-on` |
| `compare-envs` | No request matched `--fail-on` | A usage error | `2`: a request matched `--fail-on` |
| `tests make` | The collection was made (with `--run`: every test passed) | A usage error, or with `--run` a failing test or request | |
| `authz` | The run finished with no leak (or without `--fail-on`) | An error, such as an unreadable session | `2`: with `--fail-on vulnerable`, an identity got the original user's data |
| `trace check` | No request broke propagation | A usage error | `2`: a request broke propagation (or carried none, with `--fail-on untraced`) |
| `events` | The stream ended cleanly, or is still live | The request isn't a stream, or a usage error | `2`: the server broke the stream, or its last event was cut off |
| `llm` | Under the budget, or no `--max-cost` | A usage error, or (with an id) the request isn't a model call | `2`: over `--max-cost`, or a model without a price |
| `setup` | Every required step is done | An error, or a step that needs the app when it isn't running | `2`: required steps are still to do |
| `docs-search` | Something matched | Nothing matched | |
| `query` | The command worked | With `--fail-if-any`, something matched; with `--fail-if-none`, nothing did | `2`: the query has a problem |
| `rules` | The command worked | The app isn't running, or a folder or set doesn't exist | |
| `scenarios` | The command worked | The app isn't running, or a scenario doesn't exist | |
| `rules TOOL test` (added in Cloak Proxy 0.5.1) | The rule matches | It doesn't match, or a usage error | |
| `fuzz` (added in Cloak Proxy 0.5.1) | The run (or dry run) finished | A usage error, or a target outside `--scope` | `2`: with `--fail-on-match`, a result matched a `--grep` term |
| `ai-scan`, `mcp-pins check` (added in Cloak Proxy 0.5.1) | Nothing at the `--fail-on` level; the tools match the pin file | A usage error | `2`: a finding at that level or a leak; a server's tools differ or are new |
| `findings check` (added in Cloak Proxy 0.5.1) | No open finding at or above `--fail-on` | A usage error | `2`: an open finding at or above `--fail-on` (default `high`) |
| `rules TOOL`, `cert`, `external-proxy`, `mcp on\|off`, `toxiproxy` | The command worked | The app isn't running, a usage error, or a rule that doesn't exist | |
| Any command | | Any error, printed as `error: …` on standard error | |

## Commands the app runs for you

The app starts some `cloakctl` commands itself. You don't need them, but you may see them in Activity Monitor.

| Command | What it's for |
|---|---|
| `cloakctl proxy-guard --pid PID --port PORT` | Started while the macOS proxy points at Cloak Proxy. If the app disappears without quitting (Force Quit, crash), it restores your previous proxy settings so the Mac stays online. `--dry-run` only reports what it would do. |
| `cloakctl dns-standby` | Started at login by a LaunchAgent while you [capture apps that ignore the proxy](https://docs.subcloak.com/cloak-proxy/capture/apps-that-ignore-the-proxy/). When the app isn't running, it answers DNS lookups for captured domains normally. |
| `cloakctl bypass-scan [--port N]` | Lists apps connecting straight to the internet instead of through the proxy on that port (default `9090`), with their direct connections. The app's **Not using the proxy** list uses the same scan. |
| `cloakctl render-icon --out DIR` | Builds the app icon. Used when building the app. |

## Related

  - [Headless runs and CI](https://docs.subcloak.com/cloak-proxy/automation/headless-and-ci/): Record, check and mock API traffic in CI with cloakctl run.
  - [Control API](https://docs.subcloak.com/cloak-proxy/automation/control-api/): The local REST API cloakctl talks to.
  - [MCP server](https://docs.subcloak.com/cloak-proxy/automation/mcp-server/): Let Claude, Cursor and other assistants drive Cloak Proxy.
  - [Run API tests in CI](https://docs.subcloak.com/cloak-proxy/guides/run-api-tests-in-ci/): A step-by-step guide with JUnit results.
