Skip to content
These pages describe Stewart 1.x. Read the docs for the latest release, and how to upgrade.

Command reference

Your project runs these commands with make. The stewart commands below run inside the container: make sh, then stewart …, or docker compose exec stewart stewart … while Stewart runs in the background.

Command What it does
make help Show this help
make setup First run: pull the images, create .env, install dependencies, check the container
make pull Pull the runtime images
make env Create .env from .env.example with a fresh control token, unless it exists
make install composer install
make update composer update
make upgrade Move to another Stewart release line, then pull its images and install it [VERSION=2.0]
make sh Shell in the development container
make doctor Check the container, the settings, and the connections to Home Assistant and the store
make app Create an app in apps/ and its test in tests/; TEMPLATE=1 for an #[AppTemplate] [NAME=PorchLight]
make generate Write typed entity and service classes from Home Assistant into generated/ [ARGS=–allow-shrink]
make run Run in the foreground [ONLY=“hello porch” to run only those apps, TRACE=hello to trace one, DRY_RUN=1 to send no service calls]
make watch Run in the foreground and reload after every saved change [ONLY=“hello porch”, TRACE=hello, DRY_RUN=1]
make debug Run in the foreground with Xdebug [ONLY=“hello porch”, TRACE=hello]
make config Show the effective config, secrets masked
make config-reference Show every supported config option
make check Check that the configuration loads and every app can be built, and list the apps
make test Run the tests
make stan Static analysis
make up Start the daemon in the background
make down Stop everything
make deploy Pull, install and check the latest commit, then restart; a failed check keeps the running daemon
make logs Follow the daemon logs
make status Status of the running daemon [APP=porch-light for one app’s subscriptions and schedules, WATCH=1 to redraw every 2s, WATCH=5s]
make app-pause Pause an app of the running daemon [APP=porch-light]
make app-resume Resume a paused app [APP=porch-light]
make app-reset Forget a stored pause or resume, so stewart.yaml decides again [APP=porch-light]
make worker-restart Restart a worker of the running daemon [WORKER=0]
make reload Check the project, then restart every worker on the current code; the Home Assistant session stays up

Pause one app: it stays loaded but skips deliveries and schedules until resumed

stewart app:pause [options] [--] <app>
Argument Meaning
app The automation ID, as shown by stewart status
Option Meaning Default
-c, --config=… Path to stewart.yaml; defaults to stewart.yaml in the project root
--address=… Where the daemon listens, such as unix://var/run/stewart.sock or tcp://host:port; defaults to control.listen
--token=… The control token; defaults to control.token, usually STEWART_CONTROL__TOKEN
--timeout=… How long to wait for the daemon, like 5s 5s

Forget the stored pause or resume of one app, so its config decides again

stewart app:reset [options] [--] <app>
Argument Meaning
app The automation ID, as shown by stewart status
Option Meaning Default
-c, --config=… Path to stewart.yaml; defaults to stewart.yaml in the project root
--address=… Where the daemon listens, such as unix://var/run/stewart.sock or tcp://host:port; defaults to control.listen
--token=… The control token; defaults to control.token, usually STEWART_CONTROL__TOKEN
--timeout=… How long to wait for the daemon, like 5s 5s

Resume a paused app

stewart app:resume [options] [--] <app>
Argument Meaning
app The automation ID, as shown by stewart status
Option Meaning Default
-c, --config=… Path to stewart.yaml; defaults to stewart.yaml in the project root
--address=… Where the daemon listens, such as unix://var/run/stewart.sock or tcp://host:port; defaults to control.listen
--token=… The control token; defaults to control.token, usually STEWART_CONTROL__TOKEN
--timeout=… How long to wait for the daemon, like 5s 5s

Check that the configuration loads and every app can be built

stewart check [options]
Option Meaning Default
-c, --config=… Path to stewart.yaml; defaults to stewart.yaml in the project root

Show the effective configuration after the environment is applied

stewart config:dump [options]
Option Meaning Default
-c, --config=… Path to stewart.yaml; defaults to stewart.yaml in the project root
--show-secrets Print credentials instead of masking them

Show every supported option with its type and default

stewart config:reference

Check that this PHP can run Stewart, and that it reaches Home Assistant and the store

stewart doctor [options]
Option Meaning Default
-c, --config=… Path to stewart.yaml; defaults to stewart.yaml in the project root
--offline Check only this container, not the settings and connections

Write typed entity and service classes from your Home Assistant

stewart generate [options]
Option Meaning Default
-c, --config=… Path to stewart.yaml; defaults to stewart.yaml in the project root
--snapshot-in=… Generate from this file instead of connecting
--snapshot-out=… Write what was read to this file
--check Report what would change and fail if anything would
--allow-shrink Write even if that deletes more than half of the generated files

Create an app in apps/ and its test in tests/

stewart make:app [options] [--] <name>
Argument Meaning
name The class name, such as PorchLight
Option Meaning Default
--id=… The automation ID, or with –template the first entry’s; derived from the name when left out, such as porch-light
--template Create an #[AppTemplate] class, which runs once per apps..class entry in stewart.yaml

Check the project, then restart every worker on the current code, keeping the Home Assistant session

stewart reload [options]
Option Meaning Default
-c, --config=… Path to stewart.yaml; defaults to stewart.yaml in the project root
--address=… Where the daemon listens, such as unix://var/run/stewart.sock or tcp://host:port; defaults to control.listen
--token=… The control token; defaults to control.token, usually STEWART_CONTROL__TOKEN
--timeout=… How long to wait for the daemon, like 5s 5s

Run the Stewart daemon

stewart run [options]
Option Meaning Default
-c, --config=… Path to stewart.yaml; defaults to stewart.yaml in the project root
-l, --log-level=… debug|info|notice|warning|error
--json-logs Emit logs as JSON
--only=… Run only this automation, even if disabled; repeat for more
--trace=… Log TRACE lines for this automation at any log level; repeat for more
--watch Reload after every saved change to the apps, services.php or stewart.yaml

Show what the running daemon is doing

stewart status [options] [--] [<apps>...]
Argument Meaning
apps Show only these apps, with their subscriptions and schedules
Option Meaning Default
-c, --config=… Path to stewart.yaml; defaults to stewart.yaml in the project root
--address=… Where the daemon listens, such as unix://var/run/stewart.sock or tcp://host:port; defaults to control.listen
--token=… The control token; defaults to control.token, usually STEWART_CONTROL__TOKEN
--timeout=… How long to wait for the daemon, like 5s 5s
--json Print the snapshot as the wire JSON instead of tables
--probe=… liveness or readiness: print one line and exit 0 or 1, for health checks
--watch=… Redraw every interval, like 5s, until Ctrl-C; every 2s when given alone

Restart one worker with a fresh crash budget, also after it was quarantined

stewart worker:restart [options] [--] <worker>
Argument Meaning
worker The worker number, as shown by stewart status
Option Meaning Default
-c, --config=… Path to stewart.yaml; defaults to stewart.yaml in the project root
--address=… Where the daemon listens, such as unix://var/run/stewart.sock or tcp://host:port; defaults to control.listen
--token=… The control token; defaults to control.token, usually STEWART_CONTROL__TOKEN
--timeout=… How long to wait for the daemon, like 5s 5s