Overview
Themage init command creates a new Mage project with the necessary directory structure and configuration files.
Signature
Arguments
Path of the Mage project to be created. This is relative to the current working directory.
Options
Type of project to create. Options are:
main- Main project for multi-project setupssub- Sub-project that connects to a main projectstandalone- Independent project (default)
Type of instance to create for workspace management.
Project UUID for the new project. If not specified, one will be generated automatically.
Examples
Behavior
When you runmage init, the command:
- Creates the project directory at the specified path (relative to current directory)
- Initializes the repository with the specified project type
- Sets up the basic directory structure and configuration files
- Prints a confirmation message with the absolute path to the created project
Implementation Details
The command is implemented inmage_ai/cli/main.py:99-118: