Home automation in a single Go binary.
Hive is a from-scratch alternative to Home Assistant. One container, one GraphQL API, one dashboard. It talks to your existing Zigbee gear through zigbee2mqtt and MQTT, and owns every layer above that: device registry, scenes, automations, effects, alarms, activity log, auth.
colorloop and friends). Run against any device, group, or room.slog output is mirrored to a ring buffer and streamed to /logs over a GraphQL subscription.go:embed.docker run -d \
--name hive \
-p 8080:8080 \
-v hive-data:/data \
-e HIVE_MQTT_ADDRESS=mqtt://192.168.1.200:1883 \
-e HIVE_MQTT_USER=your_user \
-e HIVE_MQTT_PASSWORD=your_pass \
-e HIVE_INIT_USER=admin \
-e HIVE_INIT_PASSWORD=change-me \
ghcr.io/saffronjam/saffron-hive:latest
HIVE_MQTT_* is optional; you can configure the broker through the UI instead. HIVE_INIT_* seeds the first admin on an empty database, and that user is forced to change the password on first login.
Deployed via ArgoCD from the home-infra repo. Migrations run as an init container before the main pod starts.
Requires Go 1.26+ and Bun.
make deps # install Go modules and bun packages
make web # frontend dev server (vite)
make api # backend dev server
make package # build the production Docker image
make format # gofmt + oxfmt
make lint # go vet + oxlint
make test # go test + vitest
make e2e # Go and frontend e2e (testcontainers)
Code generation:
make sqlc # regenerate internal/store/sqlite/ from queries/*.sql
make gqlgen # regenerate Go GraphQL types and resolvers
make codegen # regenerate the TypeScript GraphQL client
CI runs the -check variant of each codegen target. make prepare-for-commit chains everything (deps, codegen checks, format, lint, typecheck, errcheck, tests) for a clean local pre-flight.