Git-Update is a Home Assistant add-on that keeps a local working copy of any Git repository synchronized and notifies Home Assistant whenever files change. The add-on exposes a lightweight HTTP API, emits Home Assistant events by default, and can optionally publish MQTT messages for additional automations.
This project (code and documentation) was generated with AI assistance using GitHub Copilot powered by GPT-5.1-Codex.
- Scheduled Git fetch + pull with configurable interval and shallow clone depth
- Hash-based change detection with per-file change types (added/modified/deleted/renamed)
- Home Assistant event emission via the Supervisor Core API (default)
- Optional MQTT notifications with configurable topic, QoS, and credentials
- On-demand sync and status endpoints exposed through FastAPI
- Supervisor-friendly logging with structured context for observability
- File deployment into Home Assistant with YAML validation safeguards
repository.json– metadata describing this add-on repository for Home Assistantgit-update/– the add-on itself (Dockerfile, config, docs, root filesystem)config.json– options schema and default values exposed to Home Assistantbuild.yaml– multi-architecture build definitionrootfs/– files copied into the add-on container (service scripts + Python app)
- Add this Git repository URL to Settings → Add-ons → Add-on Store → Repositories in Home Assistant.
- Install Git Update from the store.
- Configure required options (at minimum
repo_url). - Start the add-on; monitor logs for sync status and triggered events.
| Option | Description | Default |
|---|---|---|
repo_url |
Git repository to mirror | https://github.com/home-assistant/core.git |
branch |
Branch or ref to track | main |
access_token |
Personal access token for private repos | empty |
ha_access_token |
Optional Home Assistant long-lived token fallback | empty |
ha_base_url |
Base URL when using ha_access_token |
http://homeassistant:8123 |
poll_interval |
Sync interval in seconds | 300 |
ha_event_name |
Event name fired via Supervisor | git_update.files_changed |
notify_on_startup |
Emit notification after first sync | true |
target_path |
Root directory where synced files deploy | /config |
mqtt_enabled |
Toggle MQTT notifications | false |
mqtt_topic |
Topic to publish change payloads | homeassistant/git_update |
ha_verify_ssl |
Verify TLS when calling Home Assistant via ha_base_url |
true |
See git-update/README.md for the full option schema with MQTT credentials, SSL verification, and log level controls.
- Clone the repo and enter the workspace.
- Install development dependencies (Python 3.12 recommended):
pip install -r git-update/rootfs/app/requirements.txt
- Copy
dev/options.json(to be created) into/data/options.jsonwhen running locally or exportADDON_DEV_OPTIONSpointing to a JSON file. The Python service automatically falls back to./dev/options.jsonfor local runs. You can override the default/datadirectories by settingGIT_UPDATE_STATE_DIRandGIT_UPDATE_REPO_DIRto any writable path on your workstation. - Run the service locally:
Start
uvicorn git_update.api:create_app --reload --port 7999
python git-update/rootfs/app/main.pyin another terminal to simulate the scheduled sync loop.
Once you are ready to publish:
- Initialize Git:
git init && git add . && git commit -m "Initial scaffold". - Create (or reuse) the
HA_GITUpdaterepository on GitHub. - Link remotes and push:
git branch -M main git remote add origin https://github.com/wolfgangbures/HA_GITUpdate.git git push -u origin main
Project license to be determined. Update LICENSE if you adopt Apache-2.0, MIT, or another license.