Installer and Packs (spx-examples)
Use the spx-examples installer to assemble a ready-to-run bundle of models, services, and optional UI.
Use the spx-examples installer when you want a complete, ready-to-run bundle: selected models, supporting services (MQTT, BACnet, KNX, etc.), and optional UI. The installer generates a self-contained folder you can share with teammates.
The installer lives in the public spx-examples repository: https://github.com/HammerHeads-Engineers/spx-examples
Golden path (6 steps)
Prerequisites:
macOS, Linux, or Windows (PowerShell or pwsh)
Docker and Docker Compose v2 (
docker compose)Python 3.9+
Clone spx-examples:
git clone https://github.com/HammerHeads-Engineers/spx-examples.git cd spx-examplesSet
SPX_PRODUCT_KEY(treat it as a secret; use env/CI secrets and never commit it):export SPX_PRODUCT_KEY="YOUR_REAL_KEY"$env:SPX_PRODUCT_KEY = "YOUR_REAL_KEY"Generate a bundle (canonical command):
python -m installer generate \ --packages smart_building_pack \ --profile-ids bms_quickstart \ --with-ui \ --output build/spx-generatedEnter the output folder:
cd build/spx-generatedStart the stack (script or docker compose):
macOS/Linux:
./spx-start.shWindows:
pwsh ./spx-start.ps1Or:
docker compose -f docker-compose.generated.yml --env-file .env up -d
Verify it is healthy:
docker compose -f docker-compose.generated.yml --env-file .env ps curl -fsS http://localhost:8000/healthSuccess criteria:
curlreturns JSON with"status":"ok".docker compose psshowsspx-serverasUp(healthy).
Prerequisites
Docker and Docker Compose v2 (
docker compose)Python 3.9+ with pip (installer requirement in spx-examples
pyproject.toml)Tests and local tooling in spx-examples are exercised on Python 3.9-3.12 in CI (pack tests run on Python 3.10.14)
A valid SPX product key (
SPX_PRODUCT_KEY)
Optional:
Node.js + npm if you include BLE models (the start script installs
@simplephysx/spx-ble-adapter).
Run the installer from the repo (interactive wizard)
Start the wizard:
macOS/Linux:
./spx-install.shWindows (PowerShell):
pwsh ./spx-install.ps1
By default, artifacts are generated under build/spx-generated/.
Non-interactive generation
Use pack and profile selectors to build bundles without prompts. Example:
Other useful flags:
--protocols mqtt,modbus,http(filter by protocols)--no-examples(skip model/instance bootstrap in start scripts)--no-uior--with-ui--allow-missing-product-key(writesREPLACE_MEinto.env)--start(launch after generating)
What gets generated
Inside the output folder (for example build/spx-generated/):
docker-compose.generated.yml: compose file with only the selected services..env: product key placeholder (SPX_PRODUCT_KEY=REPLACE_ME) for this bundle.bundle.json: selected packages, models, services, and instances; consumed by the bootstrap runner to register models and create instances.bootstrap_runner.py: lightweight bootstrap script invoked byspx-start.spx-start.sh/spx-stop.sh: start/stop helpers for Bash or zsh.spx-start.ps1/spx-stop.ps1: start/stop helpers for PowerShell.assets/: copied service configs (MQTT, KNX, Home Assistant, Matter).extensions/: copied custom Python extensions.library/: selected model YAMLs copied into the bundle for self-contained sharing.
Start and stop the stack
From the generated folder:
Start:
macOS/Linux:
./spx-start.shWindows:
pwsh ./spx-start.ps1
Stop:
macOS/Linux:
./spx-stop.shWindows:
pwsh ./spx-stop.ps1
The start scripts:
verify
dockerand Python,install missing Python modules (
requests,spx-python),optionally install and run the BLE adapter if BLE services are selected,
run
docker compose down --remove-orphansand thendocker compose up -d,bootstrap models and instances from
bundle.json.
Security and CI notes
Do not commit
.envfiles containingSPX_PRODUCT_KEY.Use CI secrets to inject
SPX_PRODUCT_KEYandSPX_BASE_URL.Share bundles with
SPX_PRODUCT_KEY=REPLACE_ME(or remove.envbefore sharing).Avoid putting keys into command history; prefer environment variables.
How to verify (Integrator / QA / Developer)
Integrator:
curl -fsS http://localhost:8000/healthdocker compose -f docker-compose.generated.yml --env-file .env psConfirm your target protocol port is listening (for example Modbus on
5020-5120).
QA/CI:
python -m installer generate --packages <pack> --output build/ci/<pack> --no-startbuild/ci/<pack>/spx-start.shcurl -fsS http://localhost:8000/health
Developer:
Update
library/catalog/*.yamlandprofiles/<pack>/*.yaml, then regenerate:python -m installer generate --packages <pack> --output build/spx-generated
Cleanup and uninstall
Stop containers:
./spx-stop.shorpwsh ./spx-stop.ps1Remove containers and volumes:
docker compose -f docker-compose.generated.yml --env-file .env down -vRemove generated files: delete the generated folder (for example
build/spx-generated)Remove BLE adapter (if installed):
npm uninstall -g @simplephysx/spx-ble-adapter
Build shareable installer packages (optional)
If you need a redistributable archive (no repo clone):
This creates dist/spx-installer/ and dist/spx-installer.tgz. Recipients extract and run ./spx-install.sh or pwsh ./spx-install.ps1.
For single-file installers:
Outputs:
dist/spx-installer-v1.2.3.run(macOS/Linux)dist/spx-installer-v1.2.3.ps1(Windows)
Packs and profiles
Packs and profiles define the model and service bundles available to the installer. See: Industry packs and profiles.
Last updated

