> ## Documentation Index
> Fetch the complete documentation index at: https://docs.polygon.technology/llms.txt
> Use this file to discover all available pages before exploring further.

# Commands

> Complete reference for all dApp Launchpad CLI commands and their options.

## `init`

Initializes a new project in a new directory. If no project name is provided, a random name is chosen.

```bash theme={null}
dapp-launchpad init [PROJECT-NAME]
```

| Option                  | Description                                                                                                                            |
| ----------------------- | -------------------------------------------------------------------------------------------------------------------------------------- |
| `-t, --template [NAME]` | Name of the scaffold template to use. To get the list of available templates, run `list scaffold-templates`. (default: `"javascript"`) |
| `-h, --help`            | Display help for command                                                                                                               |

```bash theme={null}
dapp-launchpad init -h
```

***

## `dev`

Starts a local development environment: a local Hardhat blockchain and a local Next.js frontend server.

```bash theme={null}
dapp-launchpad dev [options]
```

| Option                                 | Description                                                                                                                                                                                         |
| -------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `-n, --fork-network-name [NAME]`       | Name of the network to fork. By default, starts a new chain from genesis block. (choices: `"ethereum"`, `"goerli"`, `"polygonPos"`, `"polygonAmoy"`, `"polygonZkevm"`, `"polygonZkevmTestnet"`)     |
| `-b, --fork-block-num [number]`        | Block number to fork at. Defaults to the latest block.                                                                                                                                              |
| `-r, --reset-on-change`                | Resets the entire local blockchain when any code changes. For forked mode, resets back to the forked block number. Not enabled by default.                                                          |
| `--only-smart-contracts`               | Deploys only smart contracts and updates smart contract configs for the frontend. Does not start the frontend dev environment.                                                                      |
| `--only-frontend`                      | Starts only the frontend dev server. Does not start the local blockchain. Smart contract data is read from pre-existing configs. To generate these manually, use `generate smart-contracts-config`. |
| `-e, --enable-explorer`                | Sets up a chain explorer for the local test blockchain. Not enabled by default. Requires a free account at [https://app.tryethernal.com/](https://app.tryethernal.com/).                            |
| `--ethernal-login-email [EMAIL]`       | Ethernal login email. Required only when `--enable-explorer` is set. Overrides the `ETHERNAL_EMAIL` environment variable.                                                                           |
| `--ethernal-login-password [PASSWORD]` | Ethernal login password. Required only when `--enable-explorer` is set. Overrides the `ETHERNAL_PASSWORD` environment variable.                                                                     |
| `--ethernal-workspace [WORKSPACE]`     | Ethernal workspace name. Required only when `--enable-explorer` is set. Overrides the `ETHERNAL_WORKSPACE` environment variable.                                                                    |
| `-h, --help`                           | Display help for command                                                                                                                                                                            |

```bash theme={null}
dapp-launchpad dev -h
```

***

## `deploy`

Deploys smart contracts and the frontend app to production.

```bash theme={null}
dapp-launchpad deploy -n CHAIN_NAME
```

| Option                   | Description                                                                                                                                                                       |
| ------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `-n, --network-name`     | Name of the network to deploy smart contracts to. (choices: `"ethereum"`, `"goerli"`, `"polygonPos"`, `"polygonAmoy"`, `"polygonZkevm"`, `"polygonZkevmTestnet"`)                 |
| `--only-smart-contracts` | Deploys only smart contracts and updates the smart contracts config for the frontend.                                                                                             |
| `--only-frontend`        | Deploys only the frontend. Smart contract data is read from the smart contracts config, which must exist already. To generate it manually, use `generate smart-contracts-config`. |
| `-h, --help`             | Display help for command                                                                                                                                                          |

```bash theme={null}
dapp-launchpad deploy -h
```

***

## `list`

Lists available options for a given category.

```bash theme={null}
dapp-launchpad list <WHAT TO LIST>
```

### `scaffold-templates`

Lists the available scaffold template languages.

```bash theme={null}
dapp-launchpad list scaffold-templates
```

***

## `generate`

Generates the specified configuration or artifact.

```bash theme={null}
dapp-launchpad generate <WHAT TO GENERATE>
```

### `smart-contracts-config`

Generates the smart contract configuration used by the frontend to locate deployed contracts.

```bash theme={null}
dapp-launchpad generate smart-contracts-config
```

| Option                    | Description                                                                                                                                                 |
| ------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `-e, --environment <ENV>` | Environment where this config will be used. (choices: `"development"`, `"production"`, default: `"development"`)                                            |
| `-n, --network-name`      | Name of the network to generate config for. (choices: `"ethereum"`, `"goerli"`, `"polygonPos"`, `"polygonAmoy"`, `"polygonZkevm"`, `"polygonZkevmTestnet"`) |
| `-h, --help`              | Display help for command                                                                                                                                    |
