Create your first app
Create an API project and start its development server:
pam init hello-pam --template apicd hello-pampam dev index.phpThe generated project exposes GET /api/ping on port 3000.
curl http://127.0.0.1:3000/api/ping{"message":"pong"}This is already a persistent PHP application. PAM loaded the Composer autoloader and application once; subsequent requests execute inside isolated Fibers.
What pam init does
Section titled “What pam init does”The initializer creates a normal Composer project, selects the first-party packages required by the preset, and installs them using Composer inside PAM’s Embed SAPI. There is no PAM-specific dependency lockfile.
Use --no-install when you want source generation without dependency resolution:
pam init hello-pam --template api --no-installAdd WebSockets
Section titled “Add WebSockets”The socket preset enables PAM’s native WebSocket transport on the same listener:
pam init realtime-api --template api --socketTry another target
Section titled “Try another target”pam init my-laravel-app --template laravelpam init native-core --template mobilepam init native-ui --template mobile-uipam init my-desktop-app --template desktopRead Choose a target before committing to native mobile or desktop: their platform support differs from the server runtime.