Stop copy-pasting Groovy: a CLI workflow for deploying Hubitat apps, drivers, and libraries

I wrote up how we're using hubitat-deploy to reduce the copy/paste cycle between a local Groovy repository and the hub.

Repository (my project, MIT licensed): GitHub - gilderman/hubitat-deploy: CLI to push Hubitat Groovy apps, drivers, and libraries without copy-paste · GitHub
Full walkthrough: Stop Copy-Pasting Groovy: A Deployment Workflow for Hubitat

The basic loop is: edit locally → inspect with hubitat parse → hubitat push → verify with hubitat status and hubitat diff. Uploads are ordered libraries, drivers, then apps. First-time app instances can be created with hubitat install or push --install, but you still need to configure them and click Done.

One distinction that tripped up the workflow: the version number returned by a hub save is a concurrency token, not the application's release version. We keep an appVersion() string in the source, align it with the HPM manifest when applicable, and compare source as well as version labels.

Install from the repository with npm install -g . (Node 18+). Configure a gitignored .hubitat.json or HUBITAT_HOST / HUBITAT_USER / HUBITAT_PASS environment variables. It doesn't automatically load .env files.

Testing has limits: hubitat test always runs the CLI parser tests, and can optionally run per-project specs using biocomp/hubitat_ci. A successful parser test isn't proof that the app itself was tested; missing sandbox prerequisites can result in a skip. Uploads compile on the hub but don't prove physical-device behavior.

This is a local CLI foundation for CI/CD, not a ready-made GitHub Actions pipeline. A runner needs access to the hub. The tool uses undocumented admin endpoints, isn't affiliated with Hubitat, and sequential uploads aren't transactional.

How are others handling the Git-to-hub gap? Is a reliable local deploy-and-compare command enough, or have you found a useful test gate before automating deployment to a hub controlling your house?

Disclosure: this is my project and article. AI assisted development (Cursor is credited in the repository), and AI helped draft the article and this summary.

I'm grateful for hubitat-deploy, and use it with my project to port the Salus control from HA to Hubitat (very much a work in progress).