npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

pphlx

v1.1.7

Published

High-performance Monolithic Web Compiler and PHP Hydration CLI

Downloads

3,426

Readme

PPHLX Compiler

Official Node.js CLI launcher for PPHLX. Includes pre-compiled native binaries and WebAssembly fallback to run seamlessly across Windows, macOS, and Linux without external compiler dependencies.


Features

  • 🚀 High-performance compiler: Powered by Go and compiled natively.
  • ⚡ WebAssembly (WASI) powered: Run anywhere Node.js runs without native compiler dependencies.
  • 📦 Zero runtime in production: The generated output is standalone, with no node modules.
  • 🧩 Component-based layout: Build components using your favorite frontend workflows.
  • 🔥 Hot reload: Fast development server built-in.
  • 🌍 Cross-platform: Instant startup on Windows, macOS, and Linux.
  • 🐘 Generates pure PHP: Easily host your builds on any cheap PHP web hosting server.

Quick Start

Get your project up and running in seconds:

Recommended (1-Line Project Setup)

npm create pphlx@latest my-app
cd my-app
npm install
npm run dev

Manual Setup (Existing Project)

  1. Install PPHLX locally:

    npm install pphlx
  2. Initialize project configuration & template scaffolding:

    npx pphlx init
  3. Start local development server (with hot reload and background PHP routing):

    npm run dev
  4. Verify template diagnostics:

    npm run check
  5. Build and preview your production package:

    npm run build
    npm run preview

Usage

PPHLX compiles your components into dependency-free, production-ready PHP pages. The generated output requires no Node.js, JavaScript runtime, or PPHLX framework in production.

By default, the compiler looks for a configuration file (pphlx.config.json or pphlx.config.mjs) in the root of your project directory.

package.json Scripts

Upon installation, PPHLX automatically configures the following scripts in your project's package.json so you do not need to configure them manually:

{
  "scripts": {
    "dev": "pphlx dev",
    "start": "pphlx dev",
    "watch": "pphlx watch",
    "build": "pphlx",
    "preview": "pphlx preview",
    "check": "pphlx check"
  }
}

Then simply use the corresponding npm run <command>:

  • npm run dev: Launches active hot-reload compilation and dev server.
  • npm run check: Validates template syntax and component imports.
  • npm run build: Compiles layouts and assets into standalone .php production files.
  • npm run preview: Starts a local PHP server pointing directly to your compiled production directory.

Multi-Target Compilation

PPHLX supports compiling your application to multiple target formats. By default, it compiles to standard .php files. You can configure this inside pphlx.config.json or override it on the fly using CLI flags.

Configuration (pphlx.config.json)

To configure a default target, add the "output" block:

{
  "srcDir": "src",
  "outDir": "dist",
  "output": {
    "target": "desktop",
    "goos": "darwin",
    "goarch": "arm64"
  }
}
  • target: "php" (default), "standalone" (headless Go server binary), "desktop" (native desktop GUI app), "android" (scaffolded Android Studio Gradle project), "ios" (scaffolded Swift Xcode project), "ssg" (static HTML/JS/CSS), or "blade"/"twig" (framework-native template views).
  • goos / goarch: (Optional) Target cross-compilation OS (e.g. linux, darwin, windows) and architecture (e.g. amd64, arm64) when compiling standalone or desktop binaries.

CLI Overrides

Pass the --target (or -t) flag to temporarily customize the output target during a build:

# Compile to a Standalone Go Binary
npx pphlx build --target standalone

# Compile to a Native Desktop App
npx pphlx build --target desktop

# Compile to an Android Gradle project
npx pphlx build --target android

# Compile to an iOS Xcode project
npx pphlx build --target ios

# Compile to Static HTML (SSG)
npx pphlx build --target ssg

# Compile to Laravel Blade templates
npx pphlx build --target blade

# Compile to Symfony Twig templates
npx pphlx build --target twig

Project Links