Keryxdocs

CLI

keryx is a thin client of the same HTTP + SSE API that Slack, the MCP server and the web surfaces use. Anything the CLI can do, the API can do.

Commands

CommandDoes
keryx auth loginDevice-code flow; the token lands in the OS keychain, never a dotfile
keryx investigateStart an investigation from an alert payload or a free-text query
keryx investigationsList investigations, newest first
keryx trace <id>Render the full evidence-cited trace
keryx trace <id> --followStream trace steps live over SSE
keryx resolve <id>Close an investigation with a resolution
keryx feedback <id>๐Ÿ‘/๐Ÿ‘Ž on a finding; feeds retrieval scoring
keryx doctorDiagnose the install โ€” API, migrations, MCP servers, RBAC, provider key
keryx support-bundleExport redacted logs, config and versions for an issue report
keryx mcpRun the MCP server over stdio

Output

Every command that prints a result takes --json. The human format is for reading; the JSON format is the contract, and it is the same shape the REST API returns.

Exit codes are meaningful: 0 success, 1 a real failure, 2 a usage error. A command that could not reach the API exits non-zero rather than printing an empty list.

Authentication

The CLI holds an API key in the OS keychain and sends it as Authorization: Bearer. Keys are class-separated โ€” a worker key is refused on public routes rather than silently accepted โ€” hashed at rest with argon2id, and revocable.

The CLI authenticates against core-api's own API-key table, not against the web app's Better Auth instance. Two identity systems, deliberately: one authenticates a program, the other authenticates a person at a keyboard.