> ## Documentation Index
> Fetch the complete documentation index at: https://seilabs-docs-evm-cookbook.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Scaffold Sei

> Create a Next.js dApp with wallet integration and Sei network configuration

`@sei-js/create-sei` creates a Next.js dApp with TypeScript, wallet integration, and Sei network configuration.

```bash theme={null}
npx @sei-js/create-sei app -n my-sei-app
```

The generated project includes wagmi, viem, RainbowKit, TypeScript, Tailwind CSS, Mantine UI, and Biome. It pins `@sei-js/precompiles` 3.x.

## Quick start

You do not need to install `@sei-js/create-sei` globally. `-n` and `--name` are the same option.

<Tabs>
  <Tab title="npx">
    ```bash theme={null}
    npx @sei-js/create-sei app -n my-sei-app
    ```
  </Tab>

  <Tab title="bunx">
    ```bash theme={null}
    bunx @sei-js/create-sei app -n my-sei-app
    ```
  </Tab>
</Tabs>

The project name must be an unscoped lowercase npm package name, for example `my-sei-app`. The CLI rejects scoped names, spaces, and most punctuation.

## Interactive setup

<Steps>
  <Step title="Run the CLI">
    To enter the project name interactively, run the command without `-n`:

    ```bash theme={null}
    npx @sei-js/create-sei app
    ```
  </Step>

  <Step title="Install and run">
    ```bash theme={null}
    cd my-sei-app
    bun install
    bun run dev
    ```
  </Step>

  <Step title="Start building">
    Open `http://localhost:3000`. If `NEXT_PUBLIC_CHAIN` is not set, the generated dApp connects to Sei Mainnet. To use Sei Testnet, set `NEXT_PUBLIC_CHAIN=testnet` in `.env.local`. The template's `.env.example` already sets that value. If you copy it to `.env.local`, the dApp uses Sei Testnet.
  </Step>
</Steps>

### CLI options

| Command | Description |
| - | - |
| `app` | Create a new Sei dApp |
| `app -n <name>` | Specify a project name (`--name` is the same flag) |
| `app --extension <ext>` | Add an optional extension to your project |
| `list-extensions` | List available extensions |

## Default template

The default template is a Next.js EVM dApp. It uses wagmi and viem for typed blockchain interactions. RainbowKit handles wallet connections. It defaults to the generic injected connector, not a MetaMask-only setup.

The template pins Next.js 15, React 19, wagmi 2, viem 2, RainbowKit 2, and TanStack Query 5. It also pins Tailwind CSS 4, Mantine 8, Biome 2, and `@sei-js/precompiles` 3.x. The exact versions are in the generated `package.json`.

```bash theme={null}
npx @sei-js/create-sei app -n my-sei-app
```

The template declares `packageManager: bun@1.3.14`. Use Bun 1.3.14 or newer for `bun install` and `bun run dev`. Its `overrides` block pins patched transitive dependencies in the npm and Bun format. Yarn reads `resolutions`, and pnpm reads `pnpm.overrides`. Both skip those pins and resolve a different, unverified dependency graph.

WalletConnect-based wallets need `NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID` in `.env.local`. The injected connector works without it.

The template disables Next.js image optimization because of a Sharp version conflict. As a result, `next/image` serves unoptimized images.

## Extensions

Use an extension to add an example to the base template.

### List available extensions

```bash theme={null}
npx @sei-js/create-sei list-extensions
```

### Precompiles extension

Add a Bank precompile example that queries the native SEI supply:

```bash theme={null}
npx @sei-js/create-sei app -n my-sei-precompile-app --extension precompiles
```

## Included configuration

* Next.js App Router project structure
* Wallet connections through wagmi, RainbowKit, and the injected browser-wallet connector
* Sei Mainnet and Sei Testnet configuration through `NEXT_PUBLIC_CHAIN`
* TypeScript, Biome, Mantine UI, and Tailwind CSS

<Info>
  To run the CLI with `npx`, install [Node.js](https://nodejs.org/) 20 or newer. The generated project's `.nvmrc` pins that version. To install and run the generated project, install [Bun](https://bun.sh/docs/installation) 1.3.14 or newer.
</Info>

## Troubleshooting

* If `bun install` fails, confirm that `bun --version` reports 1.3.14 or newer.
* If you get a Node.js version conflict when you run `npx`, use `nvm` to switch to Node 20 or newer.
* If you get npm permission errors, do not use `sudo`. Use `nvm` or fix your npm permissions.
* If the registry times out, run `npm config set registry https://registry.npmjs.org/` before you run `npx` again.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.