docs/Reference
CLI
Every command, option, request profile and exit code.
#Commands
| Command | What it does |
|---|---|
kagicyber audit <domain or url> | Audit a live website with passive checks |
kagicyber scan [dir] | Scan a project: secrets in the tree and git history, dependencies, code patterns, CI/CD, infrastructure as code |
kagicyber rules [--json] | List the jurisdictions and checklists in the rule base |
kagicyber serve [--port 8787] | Start the self-hosted HTTP API |
kagicyber --version, --help | Version and help |
#Audit options
| Option | What it does |
|---|---|
--browser | Real-browser test with Playwright: cookies and requests before any click, banner buttons, rendered pages, LCP and CLS |
--profile <name> | Request pacing: quiet, balanced (default) or fast |
--country <code> | Jurisdiction for maximum penalties, for example PL, DE, FR or GB (default: detected) |
--include <codes> | Also apply these jurisdiction modules, for example DE,FR,US |
--type <types> | Add site-type checklists: shop, saas, fintech (default: detected) |
--subdomains | Certificate-transparency subdomain discovery and takeover check |
--no-dns | Skip the deep DNS checks (DKIM, MTA-STS, TLS-RPT, DNSSEC) |
--repo <dir> | Also scan the site's repository and merge the findings |
--md <file> | Write the Markdown report |
--html <file> | Write a self-contained HTML report |
--prompt <file> | Write the fix prompt alone |
--json [file] | Print JSON, or write it to a file |
--sarif <file> | Write SARIF 2.1.0 for GitHub code scanning |
--junit <file> | Write JUnit XML for CI dashboards |
--out <dir> | Write the Markdown, HTML, JSON, SARIF and fix prompt into one directory |
--baseline <file> | Compare with an earlier --json result: new and fixed findings |
--ignore <ids> | Comma-separated check IDs or fingerprints to ignore (also read from .kagicyberignore) |
--badge | Print a README badge for the security grade |
--fail-on <level> | Exit 1 if a finding is at or above critical, high, medium or low (with a baseline: only new findings) |
--fail-under <n> | Exit 1 if the compliance score is below n |
--max-requests <n> | Request budget (default depends on the profile) |
--timeout <ms> | Per-request timeout |
--verbose | Show passing rows and INFO findings in the terminal |
--quiet | No progress output |
#Scan options
| Option | What it does |
|---|---|
--quick | Working tree only: skip git history, dependencies, code, CI/CD and IaC |
--prompt <file> | Write a fix prompt for the findings, with file and line |
--json, --sarif, --junit, --fail-on | As for audit |
#Request profiles
| Profile | In flight per host | Requests per second | Use it for |
|---|---|---|---|
quiet | 1 | 2 | Fragile or rate-limited servers |
balanced | 6 | 12 | Most sites (default) |
fast | 10 | 25 | Your own sites and CDNs |
#Exit codes
| Code | Meaning |
|---|---|
0 | The audit or scan finished and nothing crossed --fail-on or --fail-under. |
1 | A finding reached --fail-on, or the compliance score is below --fail-under. |
2 | Usage error (unknown command, missing target) or the run failed. |
#Environment
| Variable | Purpose |
|---|---|
KAGICYBER_CHROME_PATH | Use a specific Chrome or Chromium binary for --browser |
KAGICYBER_API_KEYS | Comma-separated API keys for kagicyber serve |
HOST, PORT | Listen address and port for kagicyber serve |
KAGICYBER_DEBUG | Print stack traces on errors |
#Examples
terminal
npx kagicyber audit example.comnpx kagicyber audit https://shop.example.de --browser --md audit.md --html audit.htmlnpx kagicyber audit my-site.com --repo ./my-sitenpx kagicyber audit example.com --json today.json --baseline last-month.jsonnpx kagicyber scan . --fail-on high --sarif kagicyber.sarif