PHP.GT

Gt commands

This page is the command reference for the gt CLI. For the conceptual overview, see gt command overview.

Command reference structure

Each command below is listed with a short summary and the most common use case. The detailed help output from the command line remains the best source for the exact flags available in your installed version.

Core commands

gt create

Creates a new WebEngine project.

Typical use:

gt create my-app

Optional arguments:

  • --namespace or -n - The application’s root namespace
  • --blueprint or -b - A template project to build on
  • --empty or -e - To force using the empty blueprint, with the default App namespace.

gt run

Starts the local development environment, including the server and any supporting watchers the project needs.

gt run

Optional arguments:

  • --port or -p (default 8080)
  • --bind or -b (default 0.0.0.0 for all addresses)
  • --debug or -d
  • --no-build to disable the build watcher
  • --no-cron to disable the cron tasks

gt serve

Starts only the local PHP development server.

gt serve
  • --port or -p (default 8080)
  • --bind or -b (default 0.0.0.0 for all addresses)
  • --debug or -d

gt build

Runs the build system once, or in watch mode if supported by the project’s setup.

gt build

Optional arguments:

  • --watch or -w to continue the build runner after first build
  • --config or -c defaults to ./build.ini
  • --default or -d path to a default build.ini
  • --mode or -m to define production or development mode

gt test

Runs the project’s test suite.

gt test

gt cron

Runs the scheduled task watcher locally.

gt cron

Optional arguments:

  • --watch or -w to continue running cron commands as they become due. Without this flag, cron will only run the commands that are due at the point of executing the command
  • --validate to check the syntax of the crontab file without running anything
  • --now or -n to run all tasks once now. Useful when using --watch for when developing locally
  • --file to read a crontab file other than ./crontab

gt deploy

Work in progress.


Check out the configuration reference page next.