{
  "id": "forge",
  "name": "Foundry",
  "homepage": "https://getfoundry.sh",
  "description": "A blazing fast, portable and modular toolkit for Ethereum application development written in Rust.",
  "icon": "https://getfoundry.sh/foundry-logo.png",
  "executables": [
    "forge",
    "cast",
    "anvil",
    "chisel"
  ],
  "dotfiles": {
    "paths": [
      "~/.foundry/foundry.toml"
    ],
    "exclude": [
      "~/.foundry/cache/",
      "~/.foundry/bin/"
    ],
    "secret": [
      "~/.foundry/keystores/"
    ],
    "side_effect": false,
    "secret_paths": [
      {
        "file": "~/.foundry/foundry.toml",
        "match": {
          "key_path": [
            "profile.*.etherscan_api_key",
            "etherscan.*.key",
            "rpc_endpoints.*"
          ]
        }
      }
    ]
  },
  "commands": {
    "format": 1,
    "label": "Foundry forge",
    "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.",
    "quality": "ai-draft",
    "parser": {
      "end_of_options": "--",
      "interleave": "permute",
      "long_equals": true,
      "short_attached": true,
      "short_bundles": false
    },
    "subcommand": [
      {
        "path": [
          "build"
        ],
        "label": "Build contracts",
        "description": "Compile the project's smart contracts.",
        "source": [
          {
            "id": "help",
            "kind": "help",
            "url": "https://www.getfoundry.sh/reference/forge/build",
            "revision": "2026-10-27",
            "evidence": "Usage: forge build [OPTIONS] [PATHS]...\n      --names\n          Print compiled contract names\n      --sizes\n          Print compiled contract sizes. Constructor argument length is not\n      --force\n          Clear the cache and artifacts folder and recompile\n      --use <SOLC_VERSION>\n          Specify the solc version, path, or executable name on `PATH` to build\n      --offline\n          Do not access the network.\n      --via-ir\n          Use the Yul intermediate representation compilation pipeline\n      --evm-version <VERSION>\n          The target EVM version\n  -o, --out <PATH>\n          The path to the contract artifacts folder\n      --root <PATH>\n          The project's root path.\n"
          }
        ],
        "field": [
          {
            "id": "paths",
            "label": "Paths",
            "description": "Files or directories to build; empty builds the whole project.",
            "type": "path",
            "path": {
              "kind": "any",
              "role": "input"
            },
            "position": 0,
            "multiple": true,
            "sources": [
              "help"
            ]
          },
          {
            "id": "sizes",
            "label": "Print contract sizes",
            "type": "boolean",
            "option": [
              "--sizes"
            ],
            "sources": [
              "help"
            ]
          },
          {
            "id": "names",
            "label": "Print contract names",
            "type": "boolean",
            "option": [
              "--names"
            ],
            "sources": [
              "help"
            ]
          },
          {
            "id": "force",
            "label": "Clean and recompile",
            "description": "Clear the cache and artifacts folder, then recompile everything.",
            "type": "boolean",
            "option": [
              "--force"
            ],
            "effect": "delete",
            "sources": [
              "help"
            ]
          },
          {
            "id": "solc",
            "label": "Solc version",
            "description": "A version such as 0.8.28, a path, or an executable name.",
            "type": "string",
            "option": [
              "--use"
            ],
            "sources": [
              "help"
            ]
          },
          {
            "id": "via_ir",
            "label": "Use Yul IR pipeline",
            "type": "boolean",
            "option": [
              "--via-ir"
            ],
            "sources": [
              "help"
            ]
          },
          {
            "id": "evm_version",
            "label": "EVM version",
            "type": "string",
            "option": [
              "--evm-version"
            ],
            "sources": [
              "help"
            ]
          },
          {
            "id": "out",
            "label": "Artifacts folder",
            "type": "path",
            "path": {
              "kind": "directory",
              "role": "output"
            },
            "option": [
              "--out",
              "-o"
            ],
            "sources": [
              "help"
            ]
          },
          {
            "id": "root",
            "label": "Project root",
            "type": "path",
            "path": {
              "kind": "directory",
              "role": "input"
            },
            "option": [
              "--root"
            ],
            "sources": [
              "help"
            ]
          },
          {
            "id": "offline",
            "label": "Offline",
            "description": "Do not access the network; missing solc versions are not installed.",
            "type": "boolean",
            "option": [
              "--offline"
            ],
            "sources": [
              "help"
            ]
          }
        ],
        "task": [
          {
            "id": "build",
            "label": "Build project",
            "fields": []
          },
          {
            "id": "sizes",
            "label": "Build and print sizes",
            "fields": [
              "sizes"
            ],
            "set": {
              "sizes": [
                true
              ]
            }
          },
          {
            "id": "clean_build",
            "label": "Clean rebuild",
            "fields": [
              "force"
            ],
            "set": {
              "force": [
                true
              ]
            }
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "paths",
              "sizes",
              "names",
              "force"
            ]
          },
          {
            "id": "advanced",
            "label": "Advanced",
            "fields": [
              "solc",
              "via_ir",
              "evm_version",
              "out",
              "root",
              "offline"
            ]
          }
        ]
      },
      {
        "path": [
          "test"
        ],
        "label": "Run tests",
        "description": "Run the project's tests, optionally filtered by test, contract or path.",
        "source": [
          {
            "id": "help",
            "kind": "help",
            "url": "https://www.getfoundry.sh/reference/forge/test",
            "revision": "2026-10-27",
            "evidence": "Usage: forge test [OPTIONS] [PATH]\n  -v, --verbosity...\n  -l, --list\n          List tests instead of running them\n      --gas-report\n          Print a gas report\n      --allow-failure\n          Exit with code 0 even if a test fails\n      --fail-fast\n          Stop running tests after the first failure\n      --fuzz-runs <RUNS>\n      --match-test <REGEX>\n          Only run test functions matching the specified regex pattern\n      --no-match-test <REGEX>\n          Only run test functions that do not match the specified regex pattern\n      --match-contract <REGEX>\n          Only run tests in contracts matching the specified regex pattern\n      --no-match-contract <REGEX>\n          Only run tests in contracts that do not match the specified regex\n      --match-path <GLOB>\n          Only run tests in source files matching the specified glob pattern\n      --json\n          Format log messages as JSON\n"
          }
        ],
        "field": [
          {
            "id": "match_test",
            "label": "Match test",
            "description": "Regex of test function names to run.",
            "type": "string",
            "option": [
              "--match-test"
            ],
            "sources": [
              "help"
            ]
          },
          {
            "id": "no_match_test",
            "label": "Exclude test",
            "description": "Regex of test function names to skip.",
            "type": "string",
            "option": [
              "--no-match-test"
            ],
            "sources": [
              "help"
            ]
          },
          {
            "id": "match_contract",
            "label": "Match contract",
            "description": "Regex of contract names to run.",
            "type": "string",
            "option": [
              "--match-contract"
            ],
            "sources": [
              "help"
            ]
          },
          {
            "id": "no_match_contract",
            "label": "Exclude contract",
            "type": "string",
            "option": [
              "--no-match-contract"
            ],
            "sources": [
              "help"
            ]
          },
          {
            "id": "match_path",
            "label": "Match path",
            "description": "Glob of source files to run.",
            "type": "string",
            "option": [
              "--match-path"
            ],
            "sources": [
              "help"
            ]
          },
          {
            "id": "verbosity",
            "label": "Verbosity",
            "description": "Repeat -v to show more detail, e.g. -vvvv for traces.",
            "type": "count",
            "option": [
              "-v"
            ],
            "sources": [
              "help"
            ]
          },
          {
            "id": "gas_report",
            "label": "Gas report",
            "type": "boolean",
            "option": [
              "--gas-report"
            ],
            "sources": [
              "help"
            ]
          },
          {
            "id": "fuzz_runs",
            "label": "Fuzz runs",
            "type": "integer",
            "option": [
              "--fuzz-runs"
            ],
            "sources": [
              "help"
            ]
          },
          {
            "id": "fail_fast",
            "label": "Stop at first failure",
            "type": "boolean",
            "option": [
              "--fail-fast"
            ],
            "sources": [
              "help"
            ]
          },
          {
            "id": "list",
            "label": "List tests only",
            "type": "boolean",
            "option": [
              "--list",
              "-l"
            ],
            "sources": [
              "help"
            ]
          },
          {
            "id": "json",
            "label": "JSON output",
            "type": "boolean",
            "option": [
              "--json"
            ],
            "sources": [
              "help"
            ]
          }
        ],
        "task": [
          {
            "id": "all",
            "label": "Run all tests",
            "fields": []
          },
          {
            "id": "one_test",
            "label": "Run one test with traces",
            "fields": [
              "match_test",
              "verbosity"
            ],
            "required": [
              "match_test"
            ],
            "set": {
              "verbosity": [
                4
              ]
            }
          },
          {
            "id": "one_contract",
            "label": "Run one contract",
            "fields": [
              "match_contract"
            ],
            "required": [
              "match_contract"
            ]
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "match_test",
              "match_contract",
              "match_path",
              "verbosity",
              "gas_report",
              "fail_fast"
            ]
          },
          {
            "id": "advanced",
            "label": "Advanced",
            "fields": [
              "no_match_test",
              "no_match_contract",
              "fuzz_runs",
              "list",
              "json"
            ]
          }
        ]
      },
      {
        "path": [
          "init"
        ],
        "label": "Create a project",
        "description": "Create a new Forge project.",
        "source": [
          {
            "id": "help",
            "kind": "help",
            "url": "https://www.getfoundry.sh/reference/forge/init",
            "revision": "2026-10-27",
            "evidence": "  [PATH]\n          The root directory of the new project\n  -t, --template <TEMPLATE>\n          The template to start from\n      --offline\n          Do not install dependencies from the network\n      --force\n          Create the project even if the specified root directory is not empty\n      --vscode\n          Create a .vscode/settings.json file with Solidity settings, and\n      --vyper\n          Initialize a Vyper project template\n      --empty\n          Do not create example contracts (Counter.sol, Counter.t.sol,\n      --no-git\n          Install without adding the dependency as a submodule\n"
          }
        ],
        "field": [
          {
            "id": "path",
            "label": "Project directory",
            "type": "path",
            "path": {
              "kind": "directory",
              "role": "output"
            },
            "position": 0,
            "sources": [
              "help"
            ]
          },
          {
            "id": "template",
            "label": "Template",
            "description": "A template repository to start from.",
            "type": "string",
            "option": [
              "--template",
              "-t"
            ],
            "sources": [
              "help"
            ]
          },
          {
            "id": "empty",
            "label": "No example contracts",
            "type": "boolean",
            "option": [
              "--empty"
            ],
            "sources": [
              "help"
            ]
          },
          {
            "id": "vscode",
            "label": "VS Code settings",
            "type": "boolean",
            "option": [
              "--vscode"
            ],
            "sources": [
              "help"
            ]
          },
          {
            "id": "vyper",
            "label": "Vyper template",
            "type": "boolean",
            "option": [
              "--vyper"
            ],
            "sources": [
              "help"
            ]
          },
          {
            "id": "offline",
            "label": "Offline",
            "description": "Do not install dependencies from the network.",
            "type": "boolean",
            "option": [
              "--offline"
            ],
            "sources": [
              "help"
            ]
          },
          {
            "id": "no_git",
            "label": "Skip git submodule",
            "type": "boolean",
            "option": [
              "--no-git"
            ],
            "sources": [
              "help"
            ]
          },
          {
            "id": "force",
            "label": "Allow non-empty directory",
            "type": "boolean",
            "option": [
              "--force"
            ],
            "effect": "overwrite",
            "sources": [
              "help"
            ]
          }
        ],
        "task": [
          {
            "id": "new",
            "label": "New project",
            "fields": [
              "path"
            ],
            "required": [
              "path"
            ]
          },
          {
            "id": "empty",
            "label": "New project without examples",
            "fields": [
              "path",
              "empty"
            ],
            "required": [
              "path"
            ],
            "set": {
              "empty": [
                true
              ]
            }
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "path",
              "template",
              "empty",
              "vscode"
            ]
          },
          {
            "id": "advanced",
            "label": "Advanced",
            "fields": [
              "vyper",
              "offline",
              "no_git",
              "force"
            ]
          }
        ]
      }
    ]
  }
}
