Skip to main content

Choose Your Interface

Loom offers two ways to interact with your AI coding assistant:

Web UI

Real-time streaming chat, file browser, diff viewer, and decision graph visualization

CLI

REPL-style interface with markdown rendering and colored diffs
Both interfaces connect to the same session GenServer, so you can switch between them mid-conversation.

Web UI

1

Start the Phoenix server

mix phx.server
You’ll see output like:
[info] Running LoomWeb.Endpoint with Bandit 1.6.0 at 127.0.0.1:4200 (http)
[info] Access LoomWeb.Endpoint at http://localhost:4200
2

Open the workspace

Navigate to http://localhost:4200 in your browser.The workspace has four main areas:
  • Chat panel — Send messages and see streaming responses
  • File tree — Browse your project files
  • Tabs — Switch between Files, Diffs, Decision Graph, and Terminal
  • Model selector — Choose which LLM to use
3

Send your first message

Click into the chat input at the bottom and type a question:
What is this project about? Show me the main application file.
Press Shift+Enter to send (or click the send button).Watch as Loom:
  1. Uses the directory_list tool to explore the project structure
  2. Uses file_read to read relevant files
  3. Responds with a summary and shows you the code
4

Approve tool permissions

When Loom wants to use a tool that requires permission (like file_write or shell), you’ll see a permission modal.Review the tool parameters and approve or deny the operation.
You can grant session-wide approval by checking “Remember this decision” or configure auto-approved tools in .loom.toml.
5

View the decision graph

Click the Decision Graph tab to see an interactive SVG visualization of Loom’s reasoning:
  • Blue nodes — Goals and decisions
  • Green nodes — Actions and outcomes
  • Yellow nodes — Observations
  • Edges — Relationships (leads_to, chosen, rejected, etc.)
The graph persists across sessions, so Loom remembers why decisions were made.

CLI

1

Build the escript (if you haven't already)

mix escript.build
This creates a ./loom executable in your project directory.
2

Start an interactive session

Navigate to your project directory and run:
./loom --project /path/to/your/project
Or from within your project:
./loom --project .
You’ll see the Loom prompt:
Loom v0.1.0 — Elixir-native AI coding assistant
Session: abc123-def456
Model: anthropic:claude-sonnet-4-6
Project: /Users/you/my-project
Type /help for commands, /quit to exit

>
3

Ask a question

Type a question and press Enter:
> What does the auth module do?
Loom will:
  1. Search for auth-related files using file_search
  2. Read the most relevant files with file_read
  3. Analyze the code and respond with an explanation
You’ll see the tool calls and their results streamed in real-time.
4

Make an edit

Ask Loom to modify code:
> Add a function to the user schema that checks if a user is an admin
Loom will:
  1. Read the user schema file
  2. Propose an edit using file_edit
  3. Show you a colored diff
  4. Ask for approval
You’ll see output like:
lib/my_app/accounts/user.ex
@@ -45,6 +45,11 @@
   field :email, :string
   field :role, :string, default: "user"
 end
+
+  def admin?(user) do
+    user.role == "admin"
+  end
 end
Approve with y or deny with n.

CLI Commands

Once in an interactive session, you can use these commands:
CommandDescription
/helpShow available commands
/model <name>Switch LLM model mid-session
/historyShow conversation history
/sessionsList all saved sessions
/clearClear the terminal
/quit or /exitExit Loom

CLI Options

--model
string
default:"From config"
Specify which LLM model to use:
./loom --model anthropic:claude-opus-4-6 --project .
--project
string
default:"Current directory"
Path to your project directory:
./loom --project /path/to/project
--yes
boolean
default:"false"
Auto-approve all permission prompts:
./loom --yes --project .
Use with caution. This skips all permission checks for file writes and shell commands.
--resume
string
Resume a previous session by ID:
./loom --resume abc123-def456 --project .
--help
boolean
Show help message and exit:
./loom --help
--version
boolean
Show version and exit:
./loom --version

One-Shot Mode

You can ask a single question without entering an interactive session:
./loom --project . "What does the auth module do?"
Loom will respond and exit. This is useful for:
  • Quick code explanations
  • CI/CD integrations
  • Scripting and automation

Example Session: Fixing a Failing Test

Here’s a real example of using Loom to fix a failing test:
1

Run your tests

> Can you run the tests and fix any failures?
2

Loom uses the shell tool

[tool] shell
command: mix test

[result]
1) test user validation requires email (MyApp.AccountsTest)
   test/my_app/accounts_test.exs:45
   Expected truthy, got false
3

Loom reads the test file

[tool] file_read
file_path: test/my_app/accounts_test.exs
4

Loom reads the implementation

[tool] file_read
file_path: lib/my_app/accounts/user.ex
5

Loom proposes a fix

The test is failing because the user changeset isn't validating that
email is required. I'll add a validation:

[tool] file_edit
file_path: lib/my_app/accounts/user.ex
old_string: ||
  def changeset(user, attrs) do
    user
    |> cast(attrs, [:email, :name])
  end
new_string: ||
  def changeset(user, attrs) do
    user
    |> cast(attrs, [:email, :name])
    |> validate_required([:email])
  end
You’ll see a diff and be asked to approve.
6

Loom verifies the fix

[tool] shell
command: mix test

[result]
Finished in 0.3 seconds
42 tests, 0 failures

Project Rules

Create a LOOM.md file in your project root to give Loom persistent instructions:
LOOM.md
# Project Instructions

This is a Phoenix LiveView app using Ecto with PostgreSQL.

## Rules
- Always run `mix format` after editing .ex files
- Run `mix test` before committing
- Use `binary_id` for all primary keys
- Follow the context module pattern in `lib/myapp/`

## Allowed Operations
- Shell: `mix *`, `git *`, `elixir *`
- File Write: `lib/**`, `test/**`, `priv/repo/migrations/**`
- File Write Denied: `config/runtime.exs`, `.env*`
Loom will load these rules automatically and follow them across all sessions.

Next Steps

Decision Graph

Learn how Loom remembers context across sessions

Project Rules

Advanced LOOM.md configuration

Tools

Explore all 11 built-in tools

Permissions

Configure tool permissions and auto-approval

Build docs developers (and LLMs) love