Output Contract
This page documents the current CLI output behavior as implemented in the repo.Core Rules
- Most commands print pretty-formatted JSON to stdout on success.
kagi search,kagi batch, andkagi quicksupport human-readable output via format flags.- Errors are plain text on stderr and exit with status code
1. - Output shapes differ by command. There is no single universal response envelope.
Success Shapes
kagi search
kagi batch
Default JSON output uses a structured envelope:
kagi summarize
Public API mode:
kagi news
kagi news --list-categories and kagi news --chaos return different JSON shapes with category metadata or chaos metadata.
kagi assistant
kagi quick
kagi fastgpt
kagi enrich
kagi smallweb
Pretty Search Output
kagi search --format pretty renders results like this:
Pretty Quick Output
kagi quick --format pretty renders: