scrapyard-io/installer

ScrapyardIO application installer.

Maintainers

Package info

github.com/ScrapyardIO/installer

pkg:composer/scrapyard-io/installer

Transparency log

Statistics

Installs: 1

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v0.6.0 2026-08-01 05:24 UTC

This package is auto-updated.

Last update: 2026-08-01 05:26:07 UTC


README

Minimal Composer-based installer for new ScrapyardIO applications.

Installation

composer global require scrapyard-io/installer

Ensure Composer's global bin directory is on your PATH.

Usage

Create a new ScrapyardIO application:

scrapyard-io new some-app

This runs the equivalent of:

composer create-project scrapyard-io/scrapyard-io some-app --remove-vcs --prefer-dist

The skeleton's existing Composer scripts (post-root-package-install, post-autoload-dump, and package discovery) run as part of that process.

Questionnaire (before create-project)

Interactively, the installer asks:

  1. Do you want to use Windowed Displays?
    If yes → choose exactly one: SDL3 or GLFW
  2. Do you want to use GPIO?
    If yes → platform-specific GPIO stack (see below)
  3. Do you want additional ScrapyardIO packages?
    If yes → choose any of fonts / waveforms / tubes / lux

Non-interactive flags:

scrapyard-io new some-app --sdl3
scrapyard-io new some-app --glfw
scrapyard-io new some-app --no-windowed
scrapyard-io new some-app --gpio
scrapyard-io new some-app --no-gpio
scrapyard-io new some-app --extras=fonts,waveforms,tubes,lux
scrapyard-io new some-app --no-extras

Windowed displays

When SDL3 is chosen, after create-project the installer:

  1. Ensures the SDL3 system library is present (Homebrew / apt)
  2. Ensures php-io-extensions/sdl3 is installed via PIE (prompts to install PIE if missing)
  3. Runs composer require microscrap/sdl3 microscrap/sdl3-gfx dept-of-scrapyard-robotics/sdl3-display
  4. Writes the SDL3 windowed definition and sets displays.main to that driver

When GLFW is chosen, after create-project the installer:

  1. Ensures OpenGL is present and installs the GLFW system library when needed
  2. Ensures php-io-extensions/glfw is installed via PIE (prompts to install PIE if missing)
  3. Runs composer require microscrap/glfw microscrap/glfw-gfx dept-of-scrapyard-robotics/glfw-display
  4. Writes the GLFW windowed definition and sets displays.main to that driver

GPIO

Darwin or x86 Linux (FTDI):

  1. Ensures libftdi1 is present (Homebrew libftdi / apt libftdi1-dev)
  2. Ensures php-io-extensions/ftdi via PIE
  3. composer require microscrap/ftdi microscrap/mpsse
  4. composer require scrapyard-io/gpio-framework

arm64 (POSI / native):

  1. Ensures php-io-extensions/posi via PIE
  2. composer require microscrap/posix
  3. Multiselect (all pre-selected): DigitalIO (microscrap/gpio), I2C, SPI, UART
  4. Install selected bindings
  5. composer require scrapyard-io/gpio-framework

Additional packages

Optional Composer packages:

  • Fonts → scrapyard-io/autopen
  • Sensor and Actuator Abstracts → scrapyard-io/waveforms
  • Embedded Display Abstracts → scrapyard-io/tubes
  • RGB LED Visualizations → scrapyard-io/lux

Failure behavior

  • If the target directory already exists, the command exits before running Composer so existing files are never overwritten.
  • If Composer cannot be found on PATH, the command exits with an actionable error.
  • If composer create-project fails, the installer preserves Composer's non-zero exit status and streams its output.
  • If post-create setup fails (native libs, PIE, Composer require, or config write), the command exits non-zero after the skeleton has already been created.

Scope

Included:

  • Skeleton create-project
  • Optional windowed SDL3 / GLFW display stack setup
  • Optional GPIO (FTDI or POSI) stack setup
  • Optional ScrapyardIO extras (autopen, waveforms, tubes, lux)

Still deferred:

  • Embedded/hardware display stacks beyond tubes package install
  • Git initialization, frontend tooling, database setup, Herd/Valet integration, or self-update behavior

Development

composer install
composer validate --strict
vendor/bin/phpunit
bin/scrapyard-io list
bin/scrapyard-io new --help

Optional smoke test

When scrapyard-io/scrapyard-io is resolvable through Composer, create a disposable project outside this repository:

tmpdir="$(mktemp -d)"
bin/scrapyard-io new "$tmpdir/smoke-app" --no-windowed --no-gpio --no-extras

Confirm the generated project has package name scrapyard-io/scrapyard-io, a vendor/ directory, a copied .env, a usable workshop binary, and that php workshop package:discover succeeds. Remove the temporary directory afterward.

License

ScrapyardIO Installer is open-sourced software licensed under the MIT license.