Welcome to the Digital Alchemy Home Automation quickstart project!
This repository is designed to work as a locally running development server, as well as providing options for long-term deployments.
Digital Alchemy requires minimum node20
, bun & deno also supported.
You also have Home Assistant already running and a long lived access token for your code to access.
Recommended workspace tools:
- ⚡ Volta - Autonomously manages Node and Yarn versions.
Clone the repository to your local machine and change directory to the new repo:
git clone [email protected]/Digital-Alchemy-TS/standalone-template.git
cd standalone-template
Install dependencies using Yarn:
# (optional) Enable Yarn for setups without Volta
corepack enable
# Install node_modules
yarn install
Create a new .env
file based on the template.
cp .env.template .env
Default contents
HASS_TOKEN=LONG_LIVED_ACCESS_TOKEN
HASS_BASE_URL=http://localhost:8123
Use the type writer script to build custom definitions for your Home Assistant instance.
These are written to a src/hass
folder by default.
yarn type-writer
Once your environment is set up, you can use provided commands from within the package.json
to manage your workspace.
NPM Command | Description |
---|---|
dev |
⏩ Run the development server |
watch |
👀 Run the development server Automatically restart server on code changes |
upgrade |
⏺️ Upgrade all @digital-alchemy dependenciesAutomatically runs type-writer afterwards |
build |
🏗️ Create a dist build of your code in dist/ folder |
type-writer |
🖨️ Rebuild custom type definitions for Home Assistant Run any time you modify your setup for more accurate definitions |