Hawk-i Docs
Documentation/CORE WORKFLOW

CLI Reference

The base command is hawki. Every capability is a subcommand.

Command overview

CommandWhat it does
scanPrimary pipeline: index, static rules, optional AI and sandbox, deps, score, report.
deepAutonomous agent that invents and runs novel exploits.
verifyCompare deployed bytecode against local source.
depsDependency vulnerability scanning.
upgradeProxy storage-collision safety for upgradeable contracts.
proveFormal verification via SMTChecker.
registryLocal record of what you have scanned.
reportRe-render a report from a saved findings JSON.
scorePrint the security score for a findings file.
exportExport findings to structured formats.
monitorWatch a repo or contract and rescan on change.
metricsShow your local scan statistics.
doctorPreflight health check.

hawki scan

Run a security scan on a local directory, a Git URL, or a deployed contract address.

hawki scan <path> [options]
hawki scan --address <0x...> --chain <chain> [options]

Options:

  • -v, --verbose - Enable debug logging.
  • -o, --output-dir <dir> - Directory for reports (default: ./hawki_reports).
  • --ai - Enable LLM reasoning (requires an API key).
  • --ai-model <model> - LLM model, e.g. gemini/gemini-1.5-flash, openai/gpt-4.
  • --api-key <key> - API key for the chosen LLM (or set the matching env var).
  • --sandbox - Run the Docker exploit sandbox.
  • --address <0x...> - Scan a deployed contract instead of a path.
  • --chain <name> - Target chain for address scans (ethereum, polygon, arbitrum, ...).
  • --rpc-url <url> - Override the default RPC endpoint.
  • --explorer-key <key> - Block-explorer API key for source retrieval.
  • --format {md,json,html,pdf} - Report format (default: md).

hawki deep

Run the autonomous Deep agent against a target. See the Deep agent page for the full model.

hawki deep <path> [--sandbox] [--max-attempts N] [--max-tokens N] [--continuous]

hawki report

Re-render an audit-grade report from a saved findings JSON.

hawki report [--input findings.json] [--format md|json|html|pdf] [--style audit|immunefi] [--output report.pdf]

hawki score

Compute and print the deterministic security score (0-100) for a findings file.

hawki score findings.json

Examples

# Basic local scan
hawki scan ./my-project
 
# Scan with LLM reasoning
hawki scan ./my-project --ai --ai-model openai/gpt-4
 
# Full audit with sandbox and a PDF report
hawki scan ./my-project --ai --sandbox --format pdf
 
# Scan a deployed contract on Arbitrum
hawki scan --address 0xYourContract --chain arbitrum
 
# Hunt for novel exploits autonomously
hawki deep ./my-project --sandbox --max-attempts 25
 
# Re-render an Immunefi-style submission
hawki report --input findings.json --style immunefi --format md