Prerequisites
- Elixir 1.18+ with OTP 27
- Erlang/OTP 27+
- SQLite (automatically included)
- An API key for at least one LLM provider (Anthropic, OpenAI, Google, etc.)
Quick Start
Build Targets
Loom supports three build modes:- Escript CLI — Single executable that requires Elixir/Erlang installed
- OTP Release — Standard Mix release for deployment
- Standalone Binary — Self-contained binary with embedded BEAM runtime (via Burrito)
Building the Escript
The escript is the simplest way to run Loom’s CLI:./loom in the project root. The escript:
- Entry point:
LoomCli.Main - Requires Elixir/Erlang installed on target system
- Database stored at
~/.loom/loom.db - Ideal for development and local use
Running the Escript
Building an OTP Release
For server deployment without the Burrito wrapper:_build/prod/rel/loom/.
Running the Release
Building a Standalone Binary
Loom uses Burrito to create self-contained binaries that bundle the BEAM runtime. Users don’t need Elixir or Erlang installed.Configuration
The release configuration inmix.exs:
Build for Current Platform
burrito_out/loom_<os>_<arch>
Cross-Platform Builds
Burrito supports cross-compilation for all configured targets:burrito_out/loom_macos_aarch64(Apple Silicon)burrito_out/loom_macos_x86_64(Intel Mac)burrito_out/loom_linux_x86_64burrito_out/loom_linux_aarch64
Binary Behavior
The standalone binary:- Includes the BEAM VM, Elixir, and all dependencies
- Database stored at
~/.loom/loom.db(override withLOOM_DB_PATH) - Runs migrations automatically on first start
- Starts web UI on port 4200 (override with
PORT) - Derives
SECRET_KEY_BASEfrom home directory (override with env var)
Database Setup
Loom uses SQLite via Ecto for storage.Automatic Setup
mix deps.get— Install dependenciesmix ecto.create— Create database filemix ecto.migrate— Run migrations
Manual Setup
Database Location
- Development:
.loom/loom.db(relative to project root) - Production:
~/.loom/loom.db - Custom: Set
LOOM_DB_PATHenvironment variable
Migrations
Loom includes 5 core migrations:Loom.Application.start/2.
Release Configuration
TheLoom.Release module handles release-time operations:
Environment Variables
| Variable | Default | Description |
|---|---|---|
LOOM_DB_PATH | ~/.loom/loom.db | Database file location |
PORT | 4200 | Web UI port |
SECRET_KEY_BASE | (derived) | Phoenix secret key |
ANTHROPIC_API_KEY | — | Anthropic API key |
OPENAI_API_KEY | — | OpenAI API key |
GOOGLE_API_KEY | — | Google AI API key |
Development Build
For active development with hot code reloading:- Watches for file changes and reloads code automatically
- Includes Phoenix LiveReload for browser refresh
- Enables LiveDashboard at
http://localhost:4200/dashboard - Shows verbose logging
Asset Compilation
Loom uses esbuild and Tailwind CSS for frontend assets.Build Assets Once
Watch Mode (Development)
Assets compile automatically when runningmix phx.server. To compile manually:
Troubleshooting
Escript Won’t Run
Database Locked
Burrito Build Fails
Missing Dependencies
Next Steps
- Deployment Guide — Deploy Loom to production
- Release Configuration — Customize release behavior
- Architecture Deep Dive — Understand Loom’s internals