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).

Available Templates

Some commonly used templates:

TemplateDescription
crud_rest_api_dartfrogDart Frog REST API with CRUD operations
crud_rest_api_shelfDart Shelf REST API with CRUD operations
crud_flutter_webFlutter Web frontend for CRUD APIs
notes_api_dartfrog_globedbNotes API with Dart Frog and Globe DB

Browse the full list at globe.dev/templates.

Related Topics