leo new command creates a new Leo project with the standard directory structure and template files.
Syntax
Arguments
The name of the package to create. This will be used as the program name and directory name.
Options
Name of the network to use. Options:
mainnet, testnet, canary.Endpoint to retrieve network state from.
Examples
Create a New Project
Create with Network Configuration
Project Structure
program.json
The manifest file contains project metadata:src/main.leo
The main program file includes a template:.env
Environment variables for development:The
.env file is automatically added to .gitignore to prevent committing sensitive information.After Creating a Project
Best Practices
- Use lowercase with underscores for project names (e.g.,
my_program) - The project name becomes the program identifier with
.aleosuffix - Review the generated
program.jsonand update the description and license - Add your private key to
.envfor development (never commit this file)