Code Glue is a Home Assistant add-on that lets you create and edit entities and automations using TypeScript and Digital Alchemy from within an embedded IDE.
- In Home Assistant, go to: Settings → Add-ons → Add-on Store
- Click the three dots (⋮) in the top-right → Repositories
- Add this URL as a custom repository:
- Close the dialog, search for “Code Glue,” and open the add-on
- Click Install, then Start
- Optional: enable “Start on boot” and “Show in sidebar”
- Open the add-on via the sidebar or its Web UI
- 💰 Profit!
/ # Yarn workspaces monorepo, TypeScript-first
/apps
/server # API and runtime for Code Glue features
/client # Embedded IDE / UI used inside the add-on
/packages # Shared libraries (types, utils, SDK)
/paradigm # UI Component Library for the client
There are two ways to dev on this project.
When to use:
- working on client/UI and want hot reloading
- want to work using your own HASS data
- faster dev loop
- Install Node
⚠️ Do not use Node from Homebrew⚠️
curl -fsSL https://fnm.vercel.app/install | bash
fnm use 22
fnm default 22- Init Submodules
git submodule update --init --recursive- Install dependencies
# you may need to do this first to properly set up yarn
corepack enable
# install dependencies for root + all sub-projects
yarn install- Bring up dev containers
docker compose up -d- Create config file:
.code_glue.templateto.code_glue& fill in variables (for server)
- Configure development environment:
- Copy
.env.templateto.envto get the client dev env setup.
- Migrate the database:
yarn server:db:migrate- Start the client and server
yarn devAccess the application at http://localhost:8081
Access swagger: http://localhost:3789/swagger/
This workspace provides a development container that boots a real Home Assistant instance so the add-on can be exercised in a “real world” environment (ingress, auth, CORS, sidebar, permissions).
Setup Instructions: https://developers.home-assistant.io/docs/add-ons/testing
- Open the project in VSCode
- Run the task (Terminal -> Run Task) 'Start Home Assistant'
- visit http://localhost:7123/
Once running you can rebuild and deploy updated code using: TBD
| Command | Notes |
|---|---|
yarn server:start / yarn server:start:hot |
Start the dev server |
yarn server:lint / yarn server:lint --fix |
Run eslint |
yarn server:test / yarn server:test --coverage |
Run tests |
yarn server:build |
Verify there is no build issues |
| -------------------------------------------------- | ------------------------------------- |
yarn dev |
Run the server and client in dev mode |