CLI & project console
PAM is the only global executable an application needs. It discovers the
nearest pam.json and routes the same short command to the active target, much
like Artisan is the console for a Laravel application.
pam doctor --fixpam devpam make:component ProfileCardpam formatpam lintpam testpam buildpam packageRun pam without arguments for the guided launcher. Every command also has a
stable non-interactive form for scripts and CI.
Command groups
Section titled “Command groups”| Group | Commands |
|---|---|
| Project | new, init, info, doctor |
| Develop | dev, run, logs, devices, devtools, console, commands |
| Generate | make:screen, make:component, make:native-view, Laravel make:* |
| Ecosystem | packages, add, remove, outdated, composer, artisan |
| Quality | format, lint, test, benchmark, profile |
| Ship | build, sign, package, release |
| Runtime | start, exec, inspect, routes, diagnostics, top |
| Tooling | completion, editor:install, self-update, docs:generate |
Explicit namespaces such as pam mobile ... and pam desktop ... expose the
same operations for cross-project automation.
Context changes the implementation
Section titled “Context changes the implementation”| Command | API | Laravel | PAM Native | Desktop |
|---|---|---|---|---|
pam dev |
PHP hot reload | Laravel host | device hot reload | desktop host |
pam console |
app command | Tinker | app command | app command |
pam make:* |
extension command | Artisan generator | screen/component/view | extension command |
pam format |
installed PHP formatter | Pint | .pam formatter |
installed PHP formatter |
pam build |
production bundle | production bundle | APK | desktop build |
pam package |
archive + SHA-256 | archive + SHA-256 | signed APK/AAB | platform package |
Composer, Artisan, and custom commands
Section titled “Composer, Artisan, and custom commands”Composer and Artisan keep their normal arguments, streams, and exit codes:
pam composer require vendor/packagepam artisan migratepam make:model Post --migrationApplications and Composer packages can register their own bounded commands.
Inspect the resolved surface with pam commands; built-in names cannot be
shadowed.
Machine-readable contracts
Section titled “Machine-readable contracts”pam info --jsonpam doctor --jsonpam packages --jsonpam commands --jsonAutomation must use the exit code and reject a JSON schema it does not
understand. Generate shell completion with pam completion bash, zsh,
fish, or powershell.
Core runtime commands
Section titled “Core runtime commands”The contextual project console above may add generators and package commands. The core executable always provides these runtime operations:
| Command | Purpose |
|---|---|
pam dev [script.php] |
Watch PHP, Composer, and environment files and restart on change. |
pam start [script.php] |
Run a supervised multi-worker cluster with zero-downtime reloads. |
pam exec <script.php> |
Execute one PHP script explicitly through PAM’s Embed SAPI. |
pam artisan [args...] |
Run Laravel console work inside the Embed SAPI. |
pam composer [args...] |
Run the embedded Composer toolchain. |
pam test [path] |
Resolve and run Pest or PHPUnit inside PAM. |
pam <script.php> [args...] |
Execute a PHP entry directly; if it registers a server, start serving it. |
Supervised production start
Section titled “Supervised production start”pam start public/index.php \ --workers 8 \ --max-requests 10000 \ --admin-address 127.0.0.1:3010 \ --admin-token-env PAM_ADMIN_TOKEN \ --graceful-timeout 30000 \ --startup-timeout 10000Additional restart controls are --restart-backoff and --watchdog-grace, in
milliseconds. Put script arguments after -- so they cannot be parsed as PAM
options.
Observe and diagnose
Section titled “Observe and diagnose”| Command | Output or action |
|---|---|
pam doctor [path] |
Validate PHP, Composer, extension, and runtime compatibility. |
pam inspect [index.php] |
Print resolved runtime capabilities as JSON. |
pam routes [index.php] |
Print registered routes as JSON. |
pam diagnostics [index.php] |
Print the complete bounded runtime snapshot. |
pam heap |
Inspect heap and memory diagnostics. |
pam fibers |
Inspect active fiber diagnostics. |
pam connections |
Inspect runtime connection diagnostics. |
pam profile |
Capture a runtime profiling report. |
pam trace |
Capture trace diagnostics. |
pam top [admin-url] |
Stream live metrics from the admin endpoint. |
pam benchmark <url> |
Measure throughput and latency. |
Examples:
pam diagnostics public/index.phppam top http://127.0.0.1:3010The focused diagnostics commands select one section of the same bounded
snapshot. profile and trace enable their capture mode before booting the
selected application entry.
Laravel operations
Section titled “Laravel operations”Core Laravel commands run through pam artisan. The optional
pushinbr/pam-laravel package registers its production commands with Artisan:
pam artisan pam:check-productionpam artisan pam:process statuspam artisan pam:healthpam artisan pam:deploy productionSee the Laravel command reference. PAM 1.0 does
not create unnamespaced aliases such as pam health or pam deploy; scripts
must use the explicit pam artisan pam:* form.
Ship commands
Section titled “Ship commands”pam init hello-api --template apipam build --entry public/index.php --output distpam release --checkpam package --entry public/index.php --output artifacts| Command | Contract |
|---|---|
pam init [directory] |
Create raw, api, laravel, desktop, mobile, or mobile-ui. |
pam build [directory] |
Produce a new self-contained bundle plus integrity manifest. |
pam package |
Create the target-specific distributable and checksum. |
pam release [--check] |
Run doctor, lint and tests; package unless check-only. |
pam sign |
Validate Native release-signing configuration. |
pam desktop <command> |
Route development, diagnosis, plugins, and packaging to Desktop. |
pam mobile <command> |
Route prepare/dev/run/build/profile/plugins/runtime operations to Native. |
pam build defaults to the current project and dist; it never needs a
trailing .. Use a directory argument only for another project.
Focused help is authoritative
Section titled “Focused help is authoritative”pam help startpam help buildpam help packagepam --versionFocused help prints accepted options and runnable examples for the installed version. Scripts should prefer stable flags and exit codes over parsing the human-oriented root launcher.