Skip to content

PAM Desktop

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.

app/NotesApp.php
#[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.

1.2.1current release
API 1stable PHP contract
Protocol 6versioned bridge
Linux x86-64supported target

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.

  1. Install and verify PAM.

    Terminal window
    curl -fsSL https://github.com/push-in/pam/releases/latest/download/install.sh | sh
    pam doctor
  2. Create the application and install PAM Desktop.

    Terminal window
    pam init notes --template desktop
    cd notes
    pam composer require pushinbr/pam-desktop
  3. Validate the machine and project contract.

    Terminal window
    pam desktop doctor
  4. Start the persistent development session.

    Terminal window
    pam desktop dev

Edit 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.

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.

  • focused productivity tools, internal operations apps, launchers, editors, dashboards, media utilities, and offline-first business software;
  • multi-window applications with menus, tray behavior, shortcuts, drag and drop, clipboard, notifications, native dialogs, and background jobs;
  • data-heavy local tools using capability-scoped SQLite, filesystem roots, binary streaming, native HTTP, secrets, authorized processes, and portals;
  • extensible products with composable PHP plugins or process-isolated Rust plugins behind versioned exports; and
  • distributable Linux applications with portable archives, Debian packages, per-file integrity, signed updates, atomic install, and rollback.