Commands
init
Create a new Mega project with boilerplate code
mega init
The init
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
The init
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 |
Your contributions help improve the experience for all MegaETH developers!
Examples
Create a full-stack project
Create a frontend-only project
Create a Foundry-only project
Related
Was this page helpful?