Init Command
The init
command helps you bootstrap a new Balius project with the necessary structure and configuration files.
Usage
cargo balius init <project-name>
The project name will be sanitized automatically (converted to lowercase, spaces replaced with hyphens, etc.).
Arguments
- project-name - The name for your new Balius project
- The name will be automatically sanitized to be a valid Rust package name
- Special characters will be removed or replaced with hyphens
- If the sanitized name is different from your input, you'll be informed of the change
Examples
Create a new project
cargo balius init my awesome dapp
# Result: Package name will be: my-awesome-dapp
Create a project with a complex name
cargo balius init My.Cool_Project!
# Result: Package name will be: my-cool_project
Project Structure
After running the init
command, your project will have the following structure:
my-awesome-dapp/
├── Cargo.toml # Project manifest with appropriate dependencies
└── src/
└── lib.rs # Main library file with boilerplate code
Next Steps
After initializing your project, you can:
- Navigate to your project directory:
cd my-awesome-dapp
- Build your project:
cargo balius build
- Test your project:
cargo balius test