scrapyard-io / installer
ScrapyardIO application installer.
Requires
- php: ^8.4|^8.5|^8.6
- laravel/prompts: ^0.3
- symfony/console: ^7.0|^8.0
- symfony/filesystem: ^7.0|^8.0
- symfony/process: ^7.0|^8.0
Requires (Dev)
- phpunit/phpunit: ^11.0|^12.0
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:
- Do you want to use Windowed Displays?
If yes → choose exactly one: SDL3 or GLFW - Do you want to use GPIO?
If yes → platform-specific GPIO stack (see below) - 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:
- Ensures the SDL3 system library is present (Homebrew / apt)
- Ensures
php-io-extensions/sdl3is installed via PIE (prompts to install PIE if missing) - Runs
composer require microscrap/sdl3 microscrap/sdl3-gfx dept-of-scrapyard-robotics/sdl3-display - Writes the SDL3 windowed definition and sets
displays.mainto that driver
When GLFW is chosen, after create-project the installer:
- Ensures OpenGL is present and installs the GLFW system library when needed
- Ensures
php-io-extensions/glfwis installed via PIE (prompts to install PIE if missing) - Runs
composer require microscrap/glfw microscrap/glfw-gfx dept-of-scrapyard-robotics/glfw-display - Writes the GLFW windowed definition and sets
displays.mainto that driver
GPIO
Darwin or x86 Linux (FTDI):
- Ensures libftdi1 is present (Homebrew
libftdi/ aptlibftdi1-dev) - Ensures
php-io-extensions/ftdivia PIE composer require microscrap/ftdi microscrap/mpssecomposer require scrapyard-io/gpio-framework
arm64 (POSI / native):
- Ensures
php-io-extensions/posivia PIE composer require microscrap/posix- Multiselect (all pre-selected): DigitalIO (
microscrap/gpio), I2C, SPI, UART - Install selected bindings
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-projectfails, 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.