---
description: "Build, test, fuzz, debug and deploy Solidity contracts"
---

_Generated from `forge --help`; see [CLI reference versions](/reference/versions). Regenerate this page instead of editing it directly._

## forge

:::note[Generated CLI reference]
This reference is generated from the installed command's `--help` output. See [CLI reference versions](/reference/versions) for the exact binaries used.
:::

Build, test, fuzz, debug and deploy Solidity contracts

:::terminal

```bash
$ forge --help
```

```txt
Usage: forge [OPTIONS] <COMMAND>

Commands:
  bind             Generate Rust bindings for smart contracts
  bind-json        Generate bindings for serialization/deserialization of
                   project structs via JSON cheatcodes
  build            Build the project's smart contracts [aliases: b, compile]
  cache            Manage the Foundry cache
  clean            Remove the build artifacts and cache directories [alias: cl]
  clone            Clone a contract from Etherscan
  compiler         Compiler utilities
  completions      Generate shell completions script [alias: com]
  config           Display the current config [alias: co]
  coverage         Generate coverage reports
  create           Deploy a smart contract [alias: c]
  doc              Generate documentation for the project
  eip712           Generate EIP-712 struct encodings for structs from a given
                   file
  flatten          Flatten a source file and all of its imports into one file
                   [alias: f]
  fmt              Format Solidity source files
  fuzz             Run and manage Forge fuzzing corpora
  geiger           DEPRECATED: Detects usage of unsafe cheat codes in a project
                   and its dependencies
  help             Print this message or the help of the given subcommand(s)
  init             Create a new Forge project
  inspect          Get specialized information about a smart contract [alias:
                   in]
  install          Install one or multiple dependencies [aliases: i, add]
  lint             Lint Solidity source files [alias: l]
  remappings       Get the automatically inferred remappings for the project
                   [alias: re]
  remove           Remove one or multiple dependencies [alias: rm]
  script           Run a smart contract as a script, building transactions that
                   can be sent onchain
  selectors        Function selector utilities [alias: se]
  snapshot         Create a gas snapshot of each test's gas usage [alias: s]
  soldeer          Soldeer dependency manager
  test             Run the project's tests [alias: t]
  tree             Display a tree visualization of the project's dependency
                   graph [alias: tr]
  update           Update one or multiple dependencies [alias: u]
  verify-bytecode  Verify the deployed bytecode against its source on Etherscan
                   [alias: vb]
  verify-check     Check verification status on the selected verifier [alias:
                   vc]
  verify-contract  Verify smart contracts on Etherscan and Sourcify [alias: v]

Options:
  -h, --help
          Print help (see a summary with '-h')

  -j, --threads <THREADS>
          Number of threads to use. Specifying 0 defaults to the number of
          logical cores
          
          [alias: --jobs]

      --profile <PROFILE>
          The configuration profile to use

  -V, --version
          Print version

Display options:
      --color <COLOR>
          The color of the log messages

          Possible values:
          - auto:   Intelligently guess whether to use color output (default)
          - always: Force color output
          - never:  Force disable color output

      --json
          Format log messages as JSON

      --md
          Format log messages as Markdown

  -q, --quiet
          Do not print log messages

  -v, --verbosity...
          Verbosity level of the log messages.
          
          Pass multiple times to increase the verbosity (e.g. -v, -vv, -vvv).
          
          Depending on the context the verbosity levels have different meanings.
          
          For example, the verbosity levels of the EVM are:
          - 2 (-vv): Print logs for all tests.
          - 3 (-vvv): Print execution traces for failing tests.
          - 4 (-vvvv): Print execution traces for all tests, and setup traces
          for failing tests.
          - 5 (-vvvvv): Print execution and setup traces for all tests,
          including storage changes and
            backtraces with line numbers.

Find more information in the book: https://getfoundry.sh/forge/overview
```

:::