Creating Projects from Templates

Create new Dart and Flutter projects quickly using predefined templates with the globe create command, supporting various frameworks and project types.

globe create

Creates a new Dart project based on a predefined template. This can significantly speed up the initial setup for common project types.

Usage

globe create -t <TEMPLATE_NAME> [project-name] [flags]

Flags

  • -t, --template: Required. The name of the template to use
  • [project-name]: Optional. The name of your new project directory. If omitted, the template name will be used

Example

# Create a new project using the 'shelf-basic' template, named 'my-api'
globe create -t shelf-basic my-api

# Create a new project using the 'flutter-web-basic' template, using the default name
globe create -t flutter-web-basic

The CLI downloads the specified template, creates a new directory with the project name (or the template name if no project name is provided), and initializes the project (e.g., runs pub get).

Related Topics