Command line
elcapture-cli controls a running elcapture from the terminal, a script, Raycast or an AI agent. It talks to the app's local API on 127.0.0.1; the port and token are read from elcapture's data folder, so only the same user on the same Mac can use it. The app must be running.
Commands
| Command | Does |
|---|---|
elcapture-cli status | Proxy address, request count, whether recording. |
elcapture-cli flows [FILTER] [-n N] | List captured requests (alias ls); same filter language as the app. |
elcapture-cli get ID [--secrets] | One request as a HAR entry. Credentials are redacted unless you pass --secrets. |
elcapture-cli har [FILTER] [--secrets] | Export matching requests as HAR to stdout. |
elcapture-cli clear | Clear the session. |
elcapture-cli send FILE|- | Send a raw HTTP request through the proxy. |
elcapture-cli rules | Print the current rules as JSON. |
elcapture-cli rules set FILE|- | Replace all rules with a JSON array. |
elcapture-cli record on|off | Pause or resume recording. |
elcapture-cli proxy on|off | Turn the system proxy on or off. |
elcapture-cli mcp | Run as an MCP server for AI agents. |
Example
elcapture-cli flows "host:api.dev status:>=400 method:POST" -n 20
elcapture-cli get 42 --secrets > login.har
elcapture-cli rules set rules.json < rules.json