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

CommandDoes
elcapture-cli statusProxy 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 clearClear the session.
elcapture-cli send FILE|-Send a raw HTTP request through the proxy.
elcapture-cli rulesPrint the current rules as JSON.
elcapture-cli rules set FILE|-Replace all rules with a JSON array.
elcapture-cli record on|offPause or resume recording.
elcapture-cli proxy on|offTurn the system proxy on or off.
elcapture-cli mcpRun 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

The CLI is a thin client over the local HTTP API — call that directly from any language.