Basic usage
./kong_output/.

TUI vs headless mode
By default, Kong runs with a terminal UI that shows real-time progress — current phase, function count, confidence distribution, and running cost. For CI pipelines, Docker containers, or environments without a terminal, use--headless:
Choosing a provider and model
Kong uses your default provider (set duringkong setup). Override at runtime:
Output control
Directory
Results go to./kong_output by default. Override with --output:
Formats
Kong supports three output formats. The CLI default issource + json. Specify explicitly with -f:
| Format | What it produces |
|---|---|
source | Annotated C file with recovered names and JSDoc comments |
json | Structured analysis.json with full metadata |
ghidra | Writes results back into the Ghidra program database |
Advanced flags
| Flag | Description |
|---|---|
--ghidra-dir | Override Ghidra installation path (normally auto-detected) |
--verbose / -v | Enable debug logging |
--max-prompt-chars | Override maximum prompt size in characters |
--max-chunk-functions | Override maximum functions per LLM batch |
--max-output-tokens | Override maximum output tokens |
--max-* flags are mainly useful for custom endpoints where local models may have smaller context windows.
Common workflows
What to expect
Analysis time and cost scale with function count and binary complexity:| Binary size | Typical time | Typical cost (Claude Opus) |
|---|---|---|
| ~300 functions | 5-15 min | $10-50 |
| ~1000 functions | 20-60 min | $40-150 |
| ~3000+ functions | 1-3 hours | $150-500+ |
Further reading
- Pipeline Overview — understand what each phase does
- CLI Reference:
kong analyze— full flag reference - Output Formats — details on each output format

