PHP is the application
Commands are ordinary typed methods or invokable classes. DTOs, enums, services, return values, and exceptions retain familiar PHP semantics.
PHP-FIRST · NATIVE LINUX · NO NODE RUNTIME
Desktop software that reads like your application—not like host plumbing. PAM Desktop keeps product logic in typed PHP, renders trusted local HTML and CSS directly with Servo, and puts Rust in charge of every operating-system boundary.
#[Desktop(id: 'com.acme.notes', name: 'Notes')]final class NotesApp extends App{ #[Command] public function save( DocumentData $document, DocumentRepository $documents, WindowHandle $window, ): DocumentResource { $saved = $documents->save($document); $window->title("Saved · {$saved->title}");
return new DocumentResource($saved); }}No payload parsing. No hand-built response envelope. No effect tree in the use case. PHP types describe the command; PAM hydrates input, resolves services, collects native effects, and returns the result.
PAM Desktop is a Composer ecosystem product running on the PAM runtime. Install the runtime first; then create the project and install the desktop package with PAM’s Composer passthrough.
Install and verify PAM.
curl -fsSL https://github.com/push-in/pam/releases/latest/download/install.sh | shpam doctorCreate the application and install PAM Desktop.
pam init notes --template desktopcd notespam composer require pushinbr/pam-desktopValidate the machine and project contract.
pam desktop doctorStart the persistent development session.
pam desktop devEdit PHP, HTML, CSS, or JavaScript and save. PAM safely replaces the affected worker or rendering generation. You now have a native Linux window, hot reload, typed PHP commands, frontend events, and no application-level Node runtime.
PHP is the application
Commands are ordinary typed methods or invokable classes. DTOs, enums, services, return values, and exceptions retain familiar PHP semantics.
Rust owns authority
Files, SQLite, HTTP, processes, secrets, portals, clipboard, notifications, plugins, and updates are capability-scoped and denied by default.
Servo owns the document
Your local HTML, CSS, and JavaScript render directly in an independent native window. There is no bundled Chromium-plus-Node application runtime.
Production is part of the design
Reproducible bundles, integrity metadata, supervised workers, signed updates, rollback, diagnostics, and compatibility fixtures ship together.
Use App, #[Desktop], #[Command], typed DTOs, injected services,
window classes, and event classes. This is the default for product code.
Use immutable Application, Capabilities, Shell, Window, and
CommandResult builders when infrastructure or framework code needs exact
protocol-level policy.
Both APIs compile into the same versioned runtime contracts. The elegant layer is not a wrapper around a second engine, and the advanced layer is never taken away.
I want my first win
Follow the five-minute tutorial from scaffold to package.
I want the mental model
Understand how PHP, Servo, Rust, and the bridge fit.
I need working patterns
Copy focused solutions from the desktop cookbook.
I am evaluating the stack
Read the honest PAM Desktop vs Electron guide.