The pad command
apps/cli/pad is the command-line tool: a new application or page, a server without Apache, a page rendered to the terminal, and a strict check of every page. Link it into your PATH once as pad.
pad new shop # apps/shop/ and www/shop/index.php
pad new shop/orders/list # list.php + list.pad in apps/shop/orders/
pad serve # http://127.0.0.1:8000/<app>/
pad render demo clock # a page to stdout
pad render shop search q=shoes # with request values
pad lint shop # every page under the strict check
pad export demo out/ # a static copy (see the static export page)
pad help
A first application
$ pad new shop
made apps/shop/index.php
made apps/shop/index.pad
made apps/shop/README.md
made www/shop/index.php
$ pad render shop
<h1>Hello from Shop!</h1>
pad new never overwrites: an application or a page that exists is refused. pad serve runs PHP's built-in server over www/, so every application is at http://127.0.0.1:8000/<app>/; --mount=pad serves them under /pad/ instead, the way an Apache setup may mount them.
Checking every page
pad lint renders each page of an application in a process of its own, with the strict syntax check on, and lists what failed with its place in the template - the same position an error page shows (see Template errors):
$ pad lint shop
ok index
FAIL orders/list Field '$totl' not found
apps/shop/orders/list.pad:3:10 {$totl} - did you mean $total?
2 pages, 1 failed
Every command answers with its exit status - 0 when all is well, 1 when not - so a script or a git hook can use it: pad lint shop || exit 1.