Skip to content

Creating a new WebEngine application

Greg Bowler edited this page Apr 20, 2026 · 1 revision

gt create starts a complete WebEngine application from a blueprint. It is the fastest way to go from an empty directory to a runnable project.

Basic usage

gt create [projectName] [--namespace|-n NAMESPACE] [--blueprint|-b BLUEPRINT]

Example:

gt create blog --namespace Blog --blueprint hello-world

If projectName, --namespace, or --blueprint are omitted, the command can ask for them interactively.

Step by step

Internally, the command:

  1. validates the project directory name
  2. validates the PHP namespace
  3. chooses a blueprint
  4. runs composer create-project for that blueprint
  5. runs composer update inside the new project directory
  6. offers to run the new application immediately

That means the command is more than a file copier: it is a guided project bootstrap process.

Available blueprints

At the time of writing, the built-in blueprint list is:

  • empty
  • hello-world
  • hello-you
  • todo-list
  • More coming soon...

These are shown interactively with titles and descriptions if you do not pass --blueprint.

Choosing a project name

The project name becomes the directory name created in the current working directory.

Valid names may contain:

  • letters
  • numbers
  • underscores
  • hyphens

If a file or directory with that name already exists, the command stops before doing any work.

Choosing a namespace

The namespace is the root PHP namespace for the generated application.

Example:

gt create blog --namespace Blog

That keeps the project's classes under Blog\... rather than a generic default.

If you omit the namespace interactively, the command suggests App.

Running the new application straight away

After the blueprint has been installed successfully, gt create asks whether you would like to run the new application immediately.

If you answer yes, it changes into the new project directory and runs the same local development flow as gt run.

If you answer no, it leaves the new application on disk and prints the WebEngine getting-started link.

When to use a blueprint

Blueprints are most useful when:

  • you are learning WebEngine and want a working example to start from
  • your team has settled on a common starting point for new applications
  • you want a more guided introduction than a completely empty project gives

The empty blueprint is a good option when you want the framework structure without any extra demonstration code.


To see what happens after the project is created, move on to Running a project locally.