Skip to main content
Loom provides a full command-line interface via the loom command.

Init

Initialize the project — generates config and template files (run once):
loom init

# Re-generate all files, overwriting existing ones
loom init --force

# Use a custom config filename
loom init -o configs/loom_myproject.yaml

Build

Process text into structured memory:
# Build from a file
loom build --input conversation.md --session user1

# Build with a preset template
loom build --template general --text "I'm Bob" --session user1

# Build from stdin
cat notes.md | loom build --session user1

Chat

Chat with memory-augmented responses:
# Single-shot chat
loom chat --message "What do I like?" --session user1

# Interactive chat
loom chat --session user1

Interactive chat commands

When in interactive chat mode (loom chat):
CommandDescription
/build <text>Add memory inline
/schemasList registered schemas
quit / exitEnd the session

Schemas

Inspect registered schemas:
loom schemas

Serve

Start the API server in the foreground:
# Default settings
loom serve

# Custom host and port
loom serve --host 0.0.0.0 --port 8000

# With preset template
loom serve --port 8000 --template general
When invoked without a subcommand, loom serve runs the server in the foreground (Ctrl+C to stop). For background service management, see the subcommands below.

Service management subcommands

Only one Loom daemon can run at a time. If a daemon is already running, start will refuse to launch a new one regardless of the port specified. Use stop first, then start with a new port. Port can be set via the --port flag (highest priority) or in configs/loom.yaml under server.port (default: 8000).
CommandDescription
loom serve startStart as a background daemon
loom serve start --autostartStart daemon + enable auto-start on boot (systemd)
loom serve stopStop the daemon
loom serve stop --remove-autostartStop daemon + disable auto-start on boot
loom serve restartRestart the daemon
loom serve statusShow running status, PID, uptime, memory
loom serve logsView server logs
# Start as a background daemon (port from config, default 8000)
loom serve start

# Specify port via flag (overrides config)
loom serve --port 9000 start

# Start daemon + enable auto-start on boot
loom serve start --autostart

# Check status
loom serve status

# Stop the daemon
loom serve stop

# Stop + disable auto-start
loom serve stop --remove-autostart

# Restart with a different port
loom serve --port 9000 restart

# View logs
loom serve logs -n 100       # last 100 lines
loom serve logs -f           # follow in real time
See Service management for details on daemon mode, auto-start, and log management.

Summary

CommandDescription
loom initInitialize project (config + templates)
loom buildProcess text into memory
loom chatChat with memory
loom schemasInspect schemas
loom serveStart API server + Web UI (foreground)
loom serve startStart as background daemon
loom serve start --autostartStart daemon + enable boot auto-start
loom serve stopStop background daemon
loom serve statusShow daemon status