Overview
Loom uses Mix releases with optional Burrito wrapping for standalone binaries. This guide covers release configuration, customization, and advanced options.Release Definition
The release is configured inmix.exs:
Release Steps
The build process::assemble— Mix compiles code and packages OTP release&Burrito.wrap/1— Burrito embeds BEAM runtime and creates standalone binary
Burrito Configuration
Target Platforms
Define CPU architectures and operating systems:Build Output
Binaries are written toburrito_out/:
Single Target Build
To build for only the current platform:Runtime Configuration
Loom uses runtime configuration inconfig/runtime.exs for production settings.
Database Path
Web Server Configuration
Conditional Endpoint Start
To disable the web UI and run CLI-only:config/runtime.exs:
Application Startup
TheLoom.Application module controls startup behavior:
Release Detection
Release Migrations
TheLoom.Release module provides database management:
Manual Migration Commands
Distributed Erlang
Release Cookie
The Erlang distribution cookie is set inmix.exs:
Node Name
Start with a distributed node name:Clustering (Future)
For multi-node deployment, configure libcluster:Environment Variables
Required
ANTHROPIC_API_KEYorOPENAI_API_KEY— At least one LLM provider
Recommended
SECRET_KEY_BASE— Phoenix secret (auto-generated if missing)LOOM_DB_PATH— Database locationPORT— Web UI port (default 4200)
Optional
PHX_HOST— Hostname for URL generationPOOL_SIZE— Ecto connection pool sizeRELEASE_NODE— Distributed Erlang node nameRELEASE_COOKIE— Erlang cookie for clusteringSERVER_ENABLED— Enable/disable web UI
Telemetry Configuration
Loom tracks LLM usage and tool execution via Telemetry.Cost Tracking
Tool Execution
Custom Handlers
Attach inconfig/runtime.exs:
Hot Code Upgrades
Loom doesn’t currently support hot upgrades (appup/relup), but you can enable them:- Create
lib/loom.appupwith upgrade instructions - Use
:appupstep in release
Release Hooks
Run code before/after release commands:Pre-Start Hook
Createrel/hooks/pre_start.sh:
Troubleshooting Releases
Binary Size
Loom binaries are 50-100MB due to BEAM + dependencies. To reduce:Missing NIFs
If tree-sitter NIFs fail to load:ERTS Not Found
If release can’t find Erlang runtime:Database Locked
SQLite only supports one writer:Next Steps
- Deployment Guide — Deploy to production
- Architecture Deep Dive — Understand OTP supervision
- Contributing — Build and test Loom