The CLI
One command, punk, from generation to deployment.
punk new
punk new MyApp
punk new MyApp --api ./openapi.json
punk new MyApp --dir ./apps/my-app --force
Writes a running application: routes, a controller, Stencil views,
config/punk.yml, a psgi entry point, and a test that boots the app and
requests a page. With --api, the spec is mounted and a controller of
operation stubs is generated per tag.
punk dev
punk dev
Serves on Hyperman with restart-on-change. Together with a markdown
mount's reload option, editing anything - code, templates, docs - is
save-and-refresh.
punk routes
punk routes
Prints the compiled routing table - methods, paths, targets, guards -
exactly as to_app froze it. What you see is what dispatches.
punk doctor
punk doctor
Reports the environment: Perl and module versions, which C ABIs are live (Hyperman, DBIx::Loop, File::Raw::JSON, Open::API, Template::Stencil), and whether the application compiles.
punk config check
punk config check
PUNK_ENV=production punk config check
Resolves the layered configuration and every secret - $env, $file
and $exec references included - and reports what failed and why.
Run it in CI and at deploy time; a secret that cannot resolve should
stop a deploy, not a request.
punk console
punk console
A REPL with the application compiled: the registry, models and helpers are live, so you can call what your handlers call.
punk api
punk api sync
For spec-first applications: writes controller stubs for operations that exist in the OpenAPI document but not yet in the code.