Skip to main content
The Loom CLI provides a fast, terminal-native way to interact with Loom’s AI coding assistant. Work directly from your command line with both interactive and one-shot modes.

Getting Started

Start an interactive session in your project directory:
loom
Or run a single command:
loom "explain this codebase"

Command Options

--model
string
default:"from config"
Specify which model to use for the session
loom -m anthropic:claude-opus-4-6 "refactor this module"
--project
string
default:"current directory"
Set the project path to work in
loom -p ~/projects/myapp "add tests"
--yes
boolean
default:"false"
Auto-approve all permission prompts (use with caution)
loom -y "update dependencies"
--resume
string
Resume a previous session by ID
loom -r abc123
--help
boolean
Display help information
--version
boolean
Show the Loom version

Interactive Mode

When you run loom without a prompt, you enter an interactive REPL session:
1

Start Session

Launch Loom in your project directory:
cd ~/projects/myapp
loom
You’ll see the session start with your configured model.
2

Chat with Loom

Type your questions or commands at the loom> prompt:
loom> explain the authentication flow
loom> add error handling to user_controller.ex
loom> what tests are missing?
3

Use Session Commands

Control your session with slash commands:
  • /help - Show available commands
  • /history - View conversation history
  • /sessions - List active sessions
  • /model - Show or change the model
  • /architect - Toggle architect/editor mode
  • /clear - Clear the terminal
  • /quit or /exit - End the session

One-Shot Mode

Execute a single task and exit:
loom "find all TODO comments in the codebase"
Loom will:
  1. Start a session
  2. Process your request
  3. Display the response
  4. Exit automatically
This is perfect for:
  • Quick code analysis
  • Automated scripts
  • CI/CD integrations

Session Management

View Active Sessions

List all running sessions:
loom> /sessions
You’ll see session IDs and their status:
Active sessions:
  abc123 (idle)
  def456 (thinking)

Resume a Session

Continue a previous conversation:
loom --resume abc123
All conversation history and context is preserved.

Model Selection

Default Model

Configured in your .loom.toml:
[model]
default = "anthropic:claude-sonnet-4-6"

Override at Runtime

Use the --model flag:
loom -m anthropic:claude-opus-4-6

Check Current Model

In an interactive session:
loom> /model
Output:
Current models:
  Default:   anthropic:claude-sonnet-4-6
  Weak:      anthropic:claude-haiku-4-5
  Architect: anthropic:claude-opus-4-6
  Editor:    anthropic:claude-haiku-4-5

Architect Mode

Toggle between normal and architect mode during a session:
loom> /architect

Normal Mode

Single AI model handles all tasks directly.

Architect Mode

Uses two models:
  • Architect: Plans and coordinates
  • Editor: Executes file changes
Better for large refactorings and complex tasks.

Permission Prompts

When Loom needs to perform sensitive operations (write files, run commands), you’ll see a permission prompt:
[file_write] wants to: write to src/user.ex

[y]es / [n]o / [a]lways for this session:
Options
  • y (yes): Allow this one time
  • n (no): Deny this operation
  • a (always): Allow for all operations in this session

Auto-Approve Mode

Skip all prompts with --yes:
loom -y "refactor the user module"
Use auto-approve mode carefully. The AI will be able to write files and run commands without confirmation.

Output Formatting

The CLI renders markdown responses with:
  • Syntax-highlighted code blocks
  • Formatted lists and headers
  • File path references (e.g., src/app.ex:42)
  • Tool execution indicators

Status Indicators

While Loom is working, you’ll see:
Thinking...
When tools are running:
Running file_read...
Running shell...

Examples

Code Analysis

loom "analyze the performance bottlenecks in this codebase"

Bug Fixing

loom "fix the authentication bug reported in issue #123"

Refactoring

loom -m anthropic:claude-opus-4-6 "refactor the user module to use a GenServer"

Test Generation

loom "add tests for the payment processing module"

Documentation

loom "add docstrings to all public functions in lib/core/"

Tips & Best Practices

Be Specific: The more context you provide, the better Loom’s responses.Instead of: "fix the bug"Try: "fix the nil pointer error in user_controller.ex when email is missing"
Use Sessions: For complex tasks, use interactive mode so Loom can ask clarifying questions and iterate on solutions.
Check History: Use /history to review what Loom has learned about your codebase during the session.

Troubleshooting

Session Not Starting

Ensure you’re in a valid project directory with a .loom.toml config file. If not, Loom will use default settings.

Model Not Found

Check your API keys are configured:
export ANTHROPIC_API_KEY=your-key

Permission Denied

If Loom can’t write files, check file permissions in your project directory.

Next Steps

Web UI

Try the visual interface with file tree and diff viewer

Tools

Learn about Loom’s built-in tools for code manipulation

Permissions

Configure permission policies for your workspace

MCP

Connect external tools via Model Context Protocol

Build docs developers (and LLMs) love