CLI — Execute
Run governed HTTP proxy execution from the command line.
bash
korclaw execute \
--input '{"action":"tool.invoke","tool":"read_file","resource":"https://api.example.com/v1/data"}' \
--execution '{"mode":"http_proxy","method":"GET","url":"https://api.example.com/v1/data"}'
korclaw execute --input '{"action":"deploy"}' --execution '{"mode":"http_proxy","method":"POST","url":"https://api.example.com/deploy"}' --agent-key ka_secret
korclaw execute --input '{"action":"deploy"}' --execution '{"mode":"http_proxy","method":"POST","url":"https://api.example.com/deploy"}' --approval-id appr_xyz| Option | Required | Description |
|---|---|---|
| --input <json> | Yes | Policy evaluation input object |
| --execution <json> | Yes | Governed execution payload (http_proxy) |
| --agent-key <key> | No | Sent as x-korclaw-agent-key |
| --approval-id <id> | No | Replay an approved approval (valid for 15 minutes after decision) |
On success, prints the runtime result JSON to stdout. Policy blocks and approval requirements return { "error": { "code", "message" } } to stderr with exit code 1. Codes include policy_blocked, approval_required, and approval_required for invalid or expired approval replays.
MCP runtime endpoints are available via the REST API and SDK. The CLI does not include MCP-specific commands.