The PAM CLI
pam is the only global executable a PAM application needs. It runs PHP scripts, starts servers and clusters, runs Composer and your test suite, generates code, builds bundles and operates applications in production. If you know Laravel, think of it as Artisan, PHP’s CLI and a process manager in one binary.
This page is a tour. Every command, option and output format is listed in the CLI Reference, and the installed binary is always the final authority:
pam --help # the grouped command overviewpam help start # focused help with options and examplespam --version # pam 2.2.27Running PHP
Section titled “Running PHP”Because PAM does not put a php executable on your PATH, you run PHP through pam. The flags you know from PHP’s CLI work the same way:
pam script.php arg1 arg2 # run a script; if it calls listen(), serve itpam exec script.php # run a script explicitlypam -r 'echo PHP_VERSION, PHP_EOL;' # run inline codepam -d memory_limit=256M script.php # set a php.ini directivepam -c config/php.ini script.php # use another php.inipam -n script.php # ignore php.ini and conf.dInside a project, pam -r and scripts see the project’s vendor/autoload.php, so pam -r 'var_dump(class_exists(Nimbus\App::class));' prints bool(true).
Command Groups
Section titled “Command Groups”pam --help groups commands by what you are doing:
| Group | Commands | Use them to |
|---|---|---|
| Runtime | dev, start, exec, composer, extensions, test, up, plan, apply, ps, logs, monit |
Run applications in development and production. |
| Observe | doctor, inspect, routes, diagnostics, support, heap, fibers, connections, profile, trace, top, dashboard, monit:history, benchmark |
Look inside a running or booting application. |
| Project | new, init, info, packages, add, remove, make:*, format, lint, outdated, commands, editor:install |
Create and maintain a project. |
| Ship | build, package, sign, release, production certify, distribution:verify, distribution:sign, desktop, mobile |
Produce and verify release artifacts. |
The machine-readable catalog (pam catalog --json) also lists the process-manager and release commands that the overview folds together, such as status, describe, reload, restart, stop, delete, scale, deploy, deploy:remote, rollback and the traffic:* family.
Development
Section titled “Development”pam dev index.php # one process, restarts on PHP, composer.json, composer.lock or .env changespam test # PHPUnit or Pest, inside PAM's PHPpam test --filter GreetingTest # runner arguments pass throughpam routes index.php # registered routes as JSONProduction
Section titled “Production”pam start index.php --workers 8 --admin-address 127.0.0.1:3010 # supervised cluster in the foregroundpam up index.php --name api --workers 8 # detached, managed by pamdpam ps # list managed applicationspam logs api --follow # follow their logspam reload api # zero-downtime reloadSee Clustering and Process Management.
Composer
Section titled “Composer”pam composer runs a verified Composer PHAR inside PAM’s embedded PHP. Arguments, output and exit codes are Composer’s own:
pam composer require pushinbr/nimbuspam composer install --no-dev --optimize-autoloaderpam composer testpam packages lists the project’s direct requirements, and pam outdated shows available updates. See Composer Integration.
Project Awareness
Section titled “Project Awareness”PAM looks for the nearest pam.json from the current directory. That file tells it what kind of project you are in, and the same short command does the right thing for each kind. You never need to pass the current directory: pam build, pam doctor and pam test all default to it. Pass a path only to target another project.
pam info describes the active project:
pam infoPAM / PROJECT────────────────────────────────────────────────────────────
Type API Root /home/alice/hello-api Manifest pam.json PAM 2.2.27 Name hello-api Version 0.1.0
DEVELOPMENT Artifacts 205 B across 2 files Dev budget 8.0 GiB · state code 1
NEXT pam doctor pam dev pam test pam build| Command | API / web | Laravel | PAM Native | PAM Desktop |
|---|---|---|---|---|
pam dev |
Hot-reloading server | Laravel host | Device hot reload | Desktop host |
pam make:* |
Built-in API generators | Registered commands | Screens, components, native views | Registered commands |
pam build |
Production bundle | Production bundle | Native build | Desktop build |
Generators
Section titled “Generators”In API and web projects, make:* commands create source files from templates and never overwrite existing ones:
pam make:controller ProductController # app/Controllers/ProductController.phppam make:request StoreProductRequest # app/Requests/StoreProductRequest.phppam make:resource ProductResource # app/Resources/ProductResource.phppam make:model Product # app/Models/Product.phppam make:migration CreateProducts # database/migrations/<timestamp>_0_0_default_create_products.phppam make:factory ProductFactory # database/factories/ProductFactory.phppam make:seeder ProductSeeder # database/seeders/ProductSeeder.phppam make:service ProductService # app/Services/ProductService.phppam make:repository ProductRepository # app/Repositories/ProductRepository.phppam make:job SendInvoice # app/Jobs/SendInvoice.phppam make:test ProductTest # tests/ProductTest.phppam make:admin Product # app/Admin/ProductAdmin.phppam make:view products.index # resources/views/products/index.nim.phpNames must start with an uppercase letter and use only ASCII letters and digits. In other project kinds, make:* runs a command registered in pam.json, or a package-provided one; PAM Native generators come from pushinbr/pam-native.
Project Commands
Section titled “Project Commands”List the commands your application and its packages add with pam commands. You can declare your own in pam.json:
{ "commands": { "greet": { "script": "scripts/greet.php", "description": "Print a greeting" } }}pam commandspam greet Alicegreet Print a greetingHello from a project command: AlicePackage Commands explains the rules, including how Composer packages register commands and which names they cannot shadow.
Formatting and Linting
Section titled “Formatting and Linting”pam format runs the formatter the project has installed: pam-native-format, Laravel Pint, PHP-CS-Fixer or PHPCBF, in that order. pam lint runs the formatter in check mode, composer validate --strict, and PHPStan when vendor/bin/phpstan exists.
pam format app routes.php tests # format these pathspam format --check app routes.php tests # report without changing filespam lintOutput for Scripts and CI
Section titled “Output for Scripts and CI”Most inspection commands accept --json and emit a versioned document with a schema or schemaVersion field:
pam info --jsonpam doctor --jsonpam commands --jsonpam catalog --jsonPut --json-errors before the command to receive failures as a JSON document on standard output instead of the colored message:
pam --json-errors deploi{ "errorCode": 1, "exitCode": 66, "message": "cannot open deploi: No such file or directory (os error 2)", "remediation": "check that the path exists and points to the intended file", "schema": 1, "verificationCommand": "pam doctor"}Human-readable errors carry a stable code, a fix and a verification command:
× ERROR [PAM-E005] completion requires bash, zsh, fish, or powershell Fix: run `pam --help` or `pam help <command>` for valid usage Verify: pam --helpAutomation should rely on exit codes and reject a schema version it does not understand. The Error Codes reference lists every PAM-E### code. Disable colors with NO_COLOR=1 or PAM_COLOR=never.
Shell Completion and Editors
Section titled “Shell Completion and Editors”pam completion bash > ~/.local/share/bash-completion/completions/pampam completion zshpam completion fishpam completion powershellCompletions include your project commands, because they call pam commands --names at completion time.
pam editor:install vscode, neovim or helix installs or prints PAM language support for your editor.
Staying Up to Date
Section titled “Staying Up to Date”pam self-update --checkpam self-updateSee Installation for signed updates and downgrades.
Next Steps
Section titled “Next Steps”- CLI Reference: every command and option.
- Configuration: what the CLI reads from your project.
- Deployment:
build,start,up,planandapplyin context.