Configuration

Sunya is configured via sunya.config.json in your project root. Works the same on Linux, macOS, and Windows.

sunya.config.json

{
  "contractsDir": "./src",
  "output": {
    "format": "table",
    "file": "sunya-report.json"
  }
}

Use ./src for Foundry projects, ./contracts for Hardhat or standard layouts.

contractsDir

Directory to scan recursively for Solidity files. Use ./src for Foundry projects, ./contracts for Hardhat or standard layouts. Default is ./contracts.

output

  • formattable for console output
  • file — Optional path for JSON output (future)

Environment

  • SUNYA_CONFIG — Config file path (default: sunya.config.json)
  • SUNYA_CONTRACTS_DIR — Directory to scan (overrides config)

Run sunya install to install or update Slither.