Command-Line Reference

May 31, 2026 · View on GitHub

Usage: she [options]

Options

ShortLongDefaultDescription
-c--configautoPath to JSON config file. Auto-loaded from ~/.she/config.json if present.
-d--dir~/.sheRoot directory for scripts. Scanned recursively for .js files.
-p--port8080HTTP server port. 0 = OS-assigned random port.
--urlMQTT broker URL (e.g. mqtt://localhost). MQTT is disabled when omitted.
--namelogicInstance name — used as MQTT client ID and connected topic prefix.
--verbosityinfoLog level: error, warn, info, debug.
--variable-prefixvarTopic prefix for the variable system.
--disable-variablesfalseDisable variable feedback loop. Useful when running multiple instances.
--disable-watchfalseDisable file watching (scripts are not reloaded on change).
--latitude48.7408Latitude for solar-event scheduling (she.schedule('sunrise', ...)).
--longitude9.1778Longitude for solar-event scheduling.
--authnoneAuthentication mode: none (open), password (single-user login), proxy (trust HTTP header set by nginx/authentik).
--proxy-headerX-Remote-UserHTTP header carrying the authenticated user in proxy mode.
--bind-address0.0.0.0Interface the HTTP server binds to. Use 127.0.0.1 when behind nginx.
--db-pathPath to sheDB storage file. sheDB is disabled when omitted.
--db-retainfalsePublish sheDB document changes as retained MQTT messages.
--matter-storageEnable the Matter controller. Pass a directory path or true (uses ~/.she/matter).
-h--helpShow help.
--versionPrint version.

Optional integrations

The following integrations are activated only when configured:

Config keyDescription
redis.urlRedis URL — enables write-through cache for the state store
influxInfluxDB connection config — enables time-series write-through
elasticElasticsearch connection config — enables search index write-through

Environment variables

Every option can be provided as an environment variable with the SHE_ prefix in SCREAMING_SNAKE_CASE:

OptionEnvironment variable
--urlSHE_URL
--dirSHE_DIR
--nameSHE_NAME
--verbositySHE_VERBOSITY
--portSHE_PORT
--authSHE_AUTH
--proxy-headerSHE_PROXY_HEADER
--bind-addressSHE_BIND_ADDRESS
--db-pathSHE_DB_PATH
--db-retainSHE_DB_RETAIN
--matter-storageSHE_MATTER_STORAGE
--disable-variablesSHE_DISABLE_VARIABLES
--disable-watchSHE_DISABLE_WATCH
--latitudeSHE_LATITUDE
--longitudeSHE_LONGITUDE
--configSHE_CONFIG

Config file format

The config file is plain JSON. Keys match long option names in camelCase:

{
  "url": "mqtt://192.168.1.10",
  "dir": "/opt/scripts",
  "name": "logic",
  "verbosity": "info",
  "latitude": 52.52,
  "longitude": 13.405,
  "port": 8080,
  "bindAddress": "0.0.0.0",
  "auth": "none",
  "dbPath": "/opt/she/db.json",
  "matterStorage": "/opt/she/matter"
}

Default config path: ~/.she/config.json

The file is loaded automatically at startup if it exists. It can be read and written at runtime via the Config tab in the web UI or via PUT /she/config — see http-api.md.

Precedence

CLI flags > environment variables > config file > built-in defaults.

Multiple instances

When running more than one instance against the same broker, give each a unique --name and disable the variable feedback loop on all but one instance with --disable-variables.