Use the Smart Accounts Kit CLI
Use the @metamask/create-gator-app interactive CLI to bootstrap a project with the Smart Accounts Kit in under two minutes.
The CLI automatically installs the required dependencies and sets up a project structure using a selected template,
allowing you to focus on building your dapp.
Run the CLI
Run the following command to automatically install the @metamask/create-gator-app package:
npx @metamask/create-gator-app@latest
Upon installation, you'll be asked the following prompts:
? What is your project named? (my-gator-app)
? Pick a framework: (Use arrow keys)
❯ nextjs
vite-react
? Pick a template: (Use arrow keys)
❯ MetaMask Smart Accounts Starter
MetaMask Smart Accounts & Delegation Starter
Farcaster Mini App Delegation Starter
Advanced Permissions (ERC-7715) Starter
? Pick a package manager: (Use arrow keys)
❯ npm
yarn
pnpm
Once you've answered the prompts with the required configuration and selected a template, the CLI will create the project using the specified name and settings. See the following section to learn more about available CLI configurations.
Options
The CLI provides the following options to display CLI details, and further customize the template configuration.
| Option | Description |
|---|---|
-v or --version | Check the current version of the @metamask/create-gator-app CLI. |
-h or --help | Display the available options. |
--skip-install | Skip the installation of dependencies. |
--add-web3auth | Add MetaMask Embedded Wallets (previously Web3Auth) as a signer for the delegator account. Supported templates: - MetaMask Smart Accounts Starter - MetaMask Smart Accounts & Delegation Starter |
Examples
MetaMask Embedded Wallets configuration
To create a project that uses MetaMask Embedded Wallets as the signer for your delegator
account, use the --add-web3auth option with @metamask/create-gator-app:
npx @metamask/create-gator-app --add-web3auth
You'll be prompted to provide additional Web3Auth configuration details:
? Which Web3Auth network do you want to use? (Use arrow keys)
❯ Sapphire Devnet
Sapphire Mainnet
Supported templates
| Template | Next.js | Vite React |
|---|---|---|
| MetaMask Smart Accounts Starter | ✅ | ✅ |
| MetaMask Smart Accounts & Delegation Starter | ✅ | ✅ |
| Farcaster Mini App Delegation Starter | ✅ | |
| Advanced Permissions (ERC-7715) Starter | ✅ |