phpgt / gtcommand
Provides the `gt` command for automating WebEngine development.
Fund package maintenance!
Requires
- php: >=8.2
- phpgt/build: ^1.0
- phpgt/cli: ^1.3
- phpgt/cron: ^1.0
- phpgt/database: ^1.6
- phpgt/server: ^1.1
Requires (Dev)
- phpmd/phpmd: ^2.13
- phpstan/phpstan: ^v1.10
- squizlabs/php_codesniffer: ^3.7
- dev-master
- v1.1.1
- v1.1.0
- v1.0.1
- v1.0.0
- v0.1.0
- dev-dependabot/composer/phpgt/cli-1.3.5
- dev-dependabot/composer/phpgt/server-1.1.6
- dev-dependabot/composer/phpstan/phpstan-2.1.40
- dev-dependabot/composer/squizlabs/php_codesniffer-4.0.1
- dev-54-add-command
- dev-ci-2025-sec
- dev-dependabot/composer/phpstan/phpstan-1.10.6
- dev-dependabot/composer/phpunit/phpunit-9.6.5
- dev-blueprint-dev-stability
This package is auto-updated.
Last update: 2026-03-12 23:20:25 UTC
README
This repository holds the CLI functionality for PHP.Gt/WebEngine, exposed via the gt command line.
The following commands are exposed:
gt add- add a page, API endpoint or cron script from a templategt create- create a new WebEngine applicationgt serve- run the inbuilt development servergt build- compile client-side assetsgt cron- invoke scripts or static functions at regular intervalsgt run- run all background scripts at once - a combination ofserve,build --watchandcron --watch --nowgt deploy- instantly deploy your application to the internet
gt add
Use gt add type name [template] to create new files in the current project.
Supported types:
pageapicron
Examples:
gt add page aboutgt add api usersgt add cron cleanupgt add page about multi-column
type and name are required. template is optional.
Built-in templates
If no template name is provided, gt add copies the built-in templates from this package:
src/Template/page/template.html->page/<name>.htmlsrc/Template/page/template.php->page/<name>.phpsrc/Template/api/template.php->api/<name>.phpsrc/Template/api/template.json->api/<name>.jsonsrc/Template/cron/template.php->cron/<name>.php
If a template file contains {{name}}, it is replaced with the provided name.
Project templates
If a template name is provided, files are loaded from the current working directory instead:
<type>/_template/<template>.*
For example:
gt add page about multi-column
This will copy:
page/_template/multi-column.html->page/about.htmlpage/_template/multi-column.php->page/about.php
The same lookup rule applies for api, cron, and future types that may be added later.