NAME

Punk::Command - the subcommands behind the punk tool

SYNOPSIS

punk routes                 # the compiled routing table
punk api sync               # stubs for operations added to the spec
punk config check           # resolve configuration and every secret
punk doctor                 # versions, C ABIs, application health
punk console                # a REPL with the application compiled
punk dev                    # Hyperman with restart-on-change

DESCRIPTION

Punk resolves and freezes everything at to_app, which makes a running application fast and opaque in equal measure. These commands open it up - what the router holds, what the specification maps to, what the configuration resolved to, and which C ABIs are in play.

Each finds the application by walking up from the current directory looking for app.psgi, and takes the class from that file's Class->to_app.

COMMANDS

routes

Prints method, path, target and guard count for every route, including API operations (from their mount, since the specification is the routing table there), websocket routes and mounted applications. Targets are recovered from the compiled coderef, so what you see is what the route resolved to rather than what was declared.

api_sync

Adds a stub for every operation the specification declares that the controllers do not implement, and leaves everything else alone. Methods with no matching operation are reported, never removed. dry_run reports without writing.

config_check

Resolves config/punk.yml for an environment, reporting every $env, $file and $exec reference independently - so one missing secret does not hide the others - then loads it properly to apply the guardrail. Exits non-zero when anything failed, which makes it usable as a deployment gate.

doctor

Versions, C ABI resolution and, if run inside an application, its route and configuration counts.

console

A REPL with $app (the registrar), $psgi and $c (a throwaway context) in scope.

dev

Runs the application under Hyperman and restarts it when anything under lib/, config/ or root/templates/ changes. A compiled-at-boot application cannot hot-reload - there is no live structure to patch - so restarting is the honest implementation.

SEE ALSO

Punk, Punk::Generate.

AUTHOR

LNATION <email@lnation.org>

LICENSE AND COPYRIGHT

This software is Copyright (c) 2026 by LNATION <email@lnation.org>.

This is free software, licensed under:

The Artistic License 2.0 (GPL Compatible)