Command reference
This page collects the current gt commands in one place.
Where a command is mainly a wrapper around another PHP.GT component, the command here is still documented from the point of view of someone using gt day to day in a WebEngine project.
Available commands
gt add
Description:
Add a page, API endpoint or cron script from a template
Usage:
gt add type name [template]
gt create
Description:
Create a new WebEngine application
Usage:
gt create [projectName] [--namespace|-n NAMESPACE] [--blueprint|-b BLUEPRINT] [--empty|-e]
--empty is a shortcut for --blueprint empty and forces the namespace to App.
See Creating a new WebEngine application.
gt test
Description:
Run configured PHP and JavaScript test suites
Usage:
gt test
gt test looks for a test script in composer.json and package.json, then runs composer test and npm run test for the suites it finds.
See Testing a project.
gt run
Description:
Run all background scripts at once (serve, build, cron)
Usage:
gt run [--port|-p PORT] [--bind|-b BIND] [--debug|-d] [--no-build] [--no-cron]
See Running a project locally.
gt serve
Description:
Start the inbuilt web server
Usage:
gt serve [--port|-p PORT] [--bind|-b BIND] [--threads|-t THREADS] [--debug|-d]
See Running a project locally.
gt build
Description:
Compile client-side assets
Usage:
gt build [--watch|-w] [--config|-c CONFIG] [--default|-d DEFAULT] [--mode|-m MODE]
See Build, cron, and migrate commands.
gt cron
Description:
Start a long-running process to execute each job when it is due
Usage:
gt cron [file] [--watch|-w] [--validate] [--now]
See Build, cron, and migrate commands.
gt migrate
Description:
Perform a database migration
Usage:
gt migrate [--base-directory BASE-DIRECTORY] [--driver DRIVER] [--database DATABASE] [--host HOST] [--port PORT] [--username USERNAME] [--password PASSWORD] [--force|-f] [--reset|-r RESET]
See Build, cron, and migrate commands.
gt deploy
Description:
Not yet implemented
Usage:
gt deploy
At present this command is a placeholder only.