mega init
Theinit
command creates a new project with boilerplate code configured for MegaETH.
Usage
Arguments
Argument | Description |
---|---|
project-name | Name of the project directory to create (optional, will prompt if not provided) |
Options
Option | Description |
---|---|
--frontend | Create a frontend-only project (NextJS + WalletConnect) |
--foundry | Create a Foundry-only project configured for Mega testnet |
Description
This command scaffolds a new project with predefined templates and configurations for working with MegaETH. By default, it creates a full-stack project that includes both Foundry for smart contract development and NextJS for frontend development. The command:- Creates a new directory with the specified project name
- Clones the appropriate template repository
- Initializes a new git repository
- Installs dependencies
Templates and Contributing
Theinit
command uses the following template repositories. If you have suggestions for improving any of these templates, you can submit pull requests to the respective GitHub repositories:
Project Type | Template Repository |
---|---|
Full-stack (default) | github.com/awesamarth/mega-starter-full |
Frontend-only | github.com/awesamarth/mega-starter-frontend |
Foundry-only | github.com/awesamarth/mega-starter-foundry |