{
  "description": "Build, test and initialize Solidity projects with Foundry's forge. Only a few common options of forge build, forge test and forge init are covered; fuzzing, invariant, fork, debugger and watch options are left out.",
  "name": "forge",
  "aliases": [
    "cast",
    "anvil",
    "chisel"
  ],
  "subcommands": [
    {
      "name": "build",
      "description": "Compile the project's smart contracts.",
      "options": [
        {
          "names": [
            "--sizes"
          ],
          "description": "Print contract sizes"
        },
        {
          "names": [
            "--names"
          ],
          "description": "Print contract names"
        },
        {
          "names": [
            "--force"
          ],
          "description": "Clear the cache and artifacts folder, then recompile everything.",
          "isDangerous": true
        },
        {
          "names": [
            "--use"
          ],
          "description": "A version such as 0.8.28, a path, or an executable name.",
          "args": {
            "name": "solc",
            "description": "A version such as 0.8.28, a path, or an executable name.",
            "isOptional": false
          }
        },
        {
          "names": [
            "--via-ir"
          ],
          "description": "Use Yul IR pipeline"
        },
        {
          "names": [
            "--evm-version"
          ],
          "description": "EVM version",
          "args": {
            "name": "evm_version",
            "isOptional": false
          }
        },
        {
          "names": [
            "--out",
            "-o"
          ],
          "description": "Artifacts folder",
          "args": {
            "name": "out",
            "isOptional": false,
            "template": "folders"
          }
        },
        {
          "names": [
            "--root"
          ],
          "description": "Project root",
          "args": {
            "name": "root",
            "isOptional": false,
            "template": "folders"
          }
        },
        {
          "names": [
            "--offline"
          ],
          "description": "Do not access the network; missing solc versions are not installed."
        }
      ],
      "args": [
        {
          "name": "paths",
          "description": "Files or directories to build; empty builds the whole project.",
          "isOptional": true,
          "isVariadic": true,
          "template": "filepaths"
        }
      ]
    },
    {
      "name": "test",
      "description": "Run the project's tests, optionally filtered by test, contract or path.",
      "options": [
        {
          "names": [
            "--match-test"
          ],
          "description": "Regex of test function names to run.",
          "args": {
            "name": "match_test",
            "description": "Regex of test function names to run.",
            "isOptional": false
          }
        },
        {
          "names": [
            "--no-match-test"
          ],
          "description": "Regex of test function names to skip.",
          "args": {
            "name": "no_match_test",
            "description": "Regex of test function names to skip.",
            "isOptional": false
          }
        },
        {
          "names": [
            "--match-contract"
          ],
          "description": "Regex of contract names to run.",
          "args": {
            "name": "match_contract",
            "description": "Regex of contract names to run.",
            "isOptional": false
          }
        },
        {
          "names": [
            "--no-match-contract"
          ],
          "description": "Exclude contract",
          "args": {
            "name": "no_match_contract",
            "isOptional": false
          }
        },
        {
          "names": [
            "--match-path"
          ],
          "description": "Glob of source files to run.",
          "args": {
            "name": "match_path",
            "description": "Glob of source files to run.",
            "isOptional": false
          }
        },
        {
          "names": [
            "-v"
          ],
          "description": "Repeat -v to show more detail, e.g. -vvvv for traces.",
          "isRepeatable": true
        },
        {
          "names": [
            "--gas-report"
          ],
          "description": "Gas report"
        },
        {
          "names": [
            "--fuzz-runs"
          ],
          "description": "Fuzz runs",
          "args": {
            "name": "fuzz_runs",
            "isOptional": false
          }
        },
        {
          "names": [
            "--fail-fast"
          ],
          "description": "Stop at first failure"
        },
        {
          "names": [
            "--list",
            "-l"
          ],
          "description": "List tests only"
        },
        {
          "names": [
            "--json"
          ],
          "description": "JSON output"
        }
      ]
    },
    {
      "name": "init",
      "description": "Create a new Forge project.",
      "options": [
        {
          "names": [
            "--template",
            "-t"
          ],
          "description": "A template repository to start from.",
          "args": {
            "name": "template",
            "description": "A template repository to start from.",
            "isOptional": false
          }
        },
        {
          "names": [
            "--empty"
          ],
          "description": "No example contracts"
        },
        {
          "names": [
            "--vscode"
          ],
          "description": "VS Code settings"
        },
        {
          "names": [
            "--vyper"
          ],
          "description": "Vyper template"
        },
        {
          "names": [
            "--offline"
          ],
          "description": "Do not install dependencies from the network."
        },
        {
          "names": [
            "--no-git"
          ],
          "description": "Skip git submodule"
        },
        {
          "names": [
            "--force"
          ],
          "description": "Allow non-empty directory",
          "isDangerous": true
        }
      ],
      "args": [
        {
          "name": "path",
          "isOptional": true,
          "template": "folders"
        }
      ]
    }
  ]
}
