Skip to main content
CodeGate supports five output formats. The default is terminal. Use --format to select a format and --output to write to a file instead of stdout.
codegate scan . --format <type>
codegate scan . --format <type> --output <path>
You can also set a persistent default in ~/.codegate/config.json:
{
  "output_format": "json"
}

Formats

The default format. Renders an interactive TUI (terminal user interface) when a TTY is available. The TUI presents findings grouped by severity, supports keyboard navigation, and shows inline remediation guidance.Disable the TUI to get plain text output suitable for log capture:
codegate scan . --no-tui
Add --verbose for extended output including additional finding fields:
codegate scan . --verbose
The terminal format is always used by codegate run. Machine-readable formats are only available from codegate scan.

Format comparison

FormatUse caseInteractiveMachine-readableFile output
terminalLocal developmentYes (TUI)NoNo
jsonPipelines and toolingNoYesOptional
sarifGitHub Code ScanningNoYesRecommended
markdownPR comments, wikisNoNoOptional
htmlShareable reportsNoNoOptional

Exit codes

All formats produce the same exit code regardless of which format is selected.
CodeMeaning
0No unsuppressed findings.
1Findings exist below the configured severity_threshold.
2Findings at or above the configured severity_threshold.
3Scanner or runtime error.