Installation¶
Prerequisites¶
- Rust 1.75+ (only for building the framework itself)
- PostgreSQL 14+
- Node.js 18+ (for building the frontend)
Build from Source¶
git clone https://github.com/anthropics/loom.git
cd loom
# Build the CLI
cargo build --release
# Build the frontend
cd frontend && npm install && npx vite build && cd ..
# The binary is at target/release/loom_cli
alias loom="./target/release/loom_cli"
Create Your First Site¶
# Create a PostgreSQL database
createdb loom_dev
# Initialize the site
loom new-site mysite.localhost --db-name loom_dev
# Start the server
loom serve
# Open http://localhost:8000
# Login: Administrator / admin
site_config.json¶
Each site has a sites/{site_name}/site_config.json that stores database credentials and site settings. All CLI commands (loom serve, loom migrate, loom console, loom worker, loom install-app, loom export-fixtures, etc.) read from this file automatically — no --db-url flag is needed.
{
"db_name": "loom_dev",
"db_type": "postgres",
"db_host": "localhost",
"db_port": 5432,
"db_user": "loom",
"db_password": "loom",
"developer_mode": true
}
| Field | Default | Description |
|---|---|---|
db_name |
loom |
PostgreSQL database name |
db_host |
localhost |
Database host |
db_port |
5432 |
Database port |
db_user |
postgres |
Database user |
db_password |
"" |
Database password |
developer_mode |
false |
Enable file watching and hot-reload (see below) |
Developer Mode¶
Set "developer_mode": true in site_config.json to enable:
- File watcher — Automatically watches
apps/andcore_doctypes/for changes - Hot-reload DocTypes — Saving a
.jsonfile re-registers the DocType and runs migrations - Hot-reload scripts — Saving a
.rhaifile reloads it into the hook runner - Hot-reload client scripts — Saving a
.client.jsfile updates the__customizationtable
No server restart needed for any of these changes.
Docker¶
This starts PostgreSQL and the Loom server. The Desk UI is available at http://localhost:8000.