Skip to main content

CLI Features

Loom’s command-line interface provides an interactive REPL (Read-Eval-Print Loop) for AI-powered coding assistance, conversation persistence, and remote execution environments.

Installation

Quick Start

1

Start a new session

Launch the interactive REPL:
2

Authenticate with server

Connect to the Loom server for conversation sync:
3

Resume a previous conversation

Global Options

--config
path
Path to custom configuration file
--workspace
path
Workspace directory for file operations (default: current directory)
--log-level
string
Override log level: trace, debug, info, warn, error
--json-logs
boolean
Output logs in JSON format for structured logging
--server-url
string
Loom server URL for LLM proxy and thread syncDefault: http://localhost:8080
Environment: LOOM_SERVER_URL
--provider
string
LLM provider to use: anthropic or openaiDefault: anthropic
Environment: LOOM_LLM_PROVIDER

Commands

Session Management

Private sessions are stored locally only and never sync to the server. Use for sensitive work or offline development.

Thread Operations

Displays all local threads with metadata:
  • Thread ID (UUIDv7 format: T-<uuid>)
  • Title (auto-generated from first message)
  • Message count
  • Last activity timestamp

Authentication

Authentication tokens are stored in the system keychain using the keyring crate.

Version Information

Displays:
  • Loom version (from Cargo.toml)
  • Build timestamp
  • Git commit SHA
  • Rust version used for compilation

ACP Agent Mode

Runs Loom as an Agent Client Protocol (ACP) agent over stdio for VS Code extension integration. This mode is used internally by editor plugins.

Configuration

Loom loads configuration from multiple sources (in priority order):
  1. Command-line flags (--config, --workspace, etc.)
  2. Environment variables (LOOM_*)
  3. Config file (~/.config/loom/config.toml or custom path)
  4. Built-in defaults

Example Config File

REPL Usage

Once in the REPL, you can:
1

Type your request

2

Agent responds and executes tools

The agent will:
  • Read relevant files (read_file tool)
  • Suggest changes
  • Apply edits (edit_file tool)
  • Run tests (bash tool)
3

Review changes

All file modifications and command outputs are displayed in real-time
4

Continue conversation

The thread persists across sessions. Resume anytime with loom resume.

REPL Controls

  • Ctrl+C: Save thread and exit gracefully
  • Ctrl+D (EOF): Same as Ctrl+C
  • Empty input: Ignored, reprompts

Auto-Commit

Loom automatically commits changes when certain tools are executed:

Auto-commit triggers

  • edit_file: File modifications
  • bash: Commands that modify the working tree
Disable with: LOOM_AUTO_COMMIT_DISABLE=1
Configuration:
  • Model: claude-3-haiku-20240307 (fast, cheap)
  • Max diff size: 32 KB
  • Commit message: Auto-generated based on changes

Git Integration

Loom captures git metadata for every thread:
  • Initial state: Branch, commit SHA, dirty status
  • Final state: Current branch, commit SHA, dirty status
  • Commits made: List of all commit SHAs created during the session
  • Remote URL: Git remote origin (normalized slug)
This metadata enables:
  • Thread search by branch/repo/commit
  • Workspace history tracking
  • Collaboration insights

Git Credential Helper

Advanced Commands

Spool (VCS)

Jujutsu (jj)-based version control with tapestry naming.

Tunnel Management

SSH to Weaver

Establishes SSH connection through WireGuard tunnel to a remote weaver.

Exit Codes

  • 0: Success
  • 1: General error (check stderr)
  • 2: Invalid arguments

Environment Variables

LOOM_SERVER_URL
string
Server URL for LLM proxy and thread sync
Default: http://localhost:8080
LOOM_LLM_PROVIDER
string
LLM provider: anthropic or openai
Default: anthropic
LOOM_AUTO_COMMIT_DISABLE
boolean
Disable automatic git commits
Values: true, 1, yes
LOOM_THREAD_SYNC_URL
string
Override thread sync endpoint (advanced)

Troubleshooting

Check if the server is running:
Or use the hosted version:
List available threads:
Thread IDs use UUIDv7 format starting with T-.
Enable debug logging:
Check workspace permissions and file paths.
Verify you’re in a git repository:
Check if auto-commit is disabled: