forge install


forge-install - Install one or more dependencies.


forge install [options] [deps…]


Install one or more dependencies.

Dependencies are installed as git submodules. If you do not want this behavior, pass --no-git.

If no arguments are provided, then existing dependencies are installed.

Dependencies can be a raw URL (, an SSH URL ([email protected]:owner/repo), or the path to a GitHub repository (owner/repo). Additionally, a ref can be added to the dependency path to install a specific version of a dependency.

A ref can be:

The ref defaults to master.

You can also choose the name of the folder the dependency will be in. By default, the folder name is the name of the repository. If you want to change the name of the folder, prepend <folder>= to the dependency.


Project Options

--root path
    The project’s root path. By default, this is the root directory of the current git repository, or the current working directory.

VCS Options

    Do not create a commit.

    Install without adding the dependency as a submodule.

Display Options

    Do not print any messages.

Common Options

    Prints help information.


  1. Install a dependency:

    forge install transmissions11/solmate
  2. Install a specific version of a dependency:

    forge install transmissions11/solmate@v7
  3. Install multiple dependencies:

    forge install transmissions11/solmate@v7 OpenZeppelin/openzeppelin-contracts
  4. Install a dependency without creating a submodule:

    forge install --no-git transmissions11/solmate
  5. Install a dependency in a specific folder:

    forge install soulmate=transmissions11/solmate


forge, forge update, forge remove