Localzet Server and related projects documentation

Install and build

Requirements

  • PHP CLI with json, phar, and sodium extensions.
  • A pinned static-php-cli 2.x version and a micro.sfx runtime built for it.
  • Current prototype target: linux-x86_64.
  • An application with production dependencies installed from its composer.lock.

Packager does not build the runtime. Prepare micro.sfx separately and put the actual toolchain paths and version in the manifest.

Install Packager

git clone https://github.com/localzet/Packager.git
cd Packager
composer install --no-interaction
php bin/localzet-packager --help

There is no stable release yet, so these commands use the selected Git branch. Do not treat an unpinned source checkout as a production release artifact.

Prepare the application and build

Install the application's production dependencies in an isolated build environment:

cd ../my-application
composer install --no-dev --no-scripts --no-plugins --prefer-dist --no-interaction

Validate the manifest and build from the Packager directory:

cd ../Packager
php bin/localzet-packager validate packager.json
php -d phar.readonly=0 bin/localzet-packager build packager.json

The build produces an executable and adjacent .manifest.json and .spdx.json files. The CLI refuses to overwrite existing artifacts. Set output outside the source tree.

Isolate the build

Packager is not a sandbox for untrusted source code. Review the project tree and use a separate worker with minimum privileges. The builder excludes known VCS/IDE files, .env*, auth.json, and composer-auth.json; these rules are not a general secret scanner.

Continue with the manifest and CLI guide.