Preview a request with --dry-run
Print the request that would be sent without contacting the API:
- HTTP method and URL.
- Request headers (sensitive values redacted).
- A preview of the request body (sensitive fields redacted).
--body, and stdin combine into the final body, and to verify which headers are attached before running for real.
Trace live traffic with --debug
Run the command normally and log the full request / response exchange to stderr:
- Request method, URL, headers, and body preview.
- Response status, headers, and body preview.
- Transport errors (DNS, TLS, timeouts, and so on).
--debug with --output-format json or a --jq filter without the two streams colliding:
--dry-run and --debug, --dry-run wins and no network call is made.
Redaction in diagnostic output
The CLI redacts secrets it can detect before printing:- Headers —
Authorization,Cookie,Set-Cookie,X-API-Key, and other security headers are shown as[REDACTED]. - Body — JSON fields named
password,secret,token,api_key,client_secret, and similar are shown as[REDACTED].
Explore the command tree
Launch the interactive terminal UI to browse every command group and execute one without leaving the shell:mka1 --usage prints the full command schema in KDL so you can machine-process it.
Agent mode
--agent-mode changes the CLI’s defaults to be friendlier to AI coding tools:
- Errors are returned as structured objects instead of free-form prose.
- The default output format becomes
toon(compact, token-efficient).
CLAUDE_CODE or CURSOR_AGENT is set. Pass --agent-mode=false to opt out, or set it explicitly to force it on in unknown environments:
Timeouts, custom servers, and extra headers
A few more inherited flags are worth knowing about:--timeout 30s— cap the HTTP request duration. Acceptsms,s, ormsuffixes.--server-url https://custom-api.example.com— override the base URL entirely.--server <name|index>— pick a named or indexed server from the CLI’s built-in list.-H 'Header-Name: value'— attach an arbitrary header. Repeatable.--no-interactive— disable every interactive prompt (auto-prompting, explorer auto-launch, TUI forms). Use this in CI.
Troubleshooting recipe
When a command behaves unexpectedly, this order usually gets you to the answer fastest:- Run with
--dry-runto confirm the URL, headers, and body. - Run
mka1 auth whoamito confirm which credential is in effect and where it came from. - Re-run with
--debug 2> debug.logto capture the full request and response. - If the response is non-obvious, re-run with
--include-headers --output-format json --jq '.'so the full payload and headers are printed together.