Skip to content

Getting started

Loom installs as a single npm package and runs as a single Node process backed by SQLite.

Requirements

  • Node.js ≥ 20
  • A modern OS that can build / run better-sqlite3 (Linux, macOS, Windows)
  • An API key from at least one upstream LLM provider

Install

npm install -g @hspk/loom

Adds the loom binary to your $PATH.

npx @hspk/loom <command>
bunx @hspk/loom <command>

Initialize

Run the interactive wizard:

loom init

It collects:

  1. Where the config file should live — project dir, user home, or a custom path
  2. Admin username + password (or a reference to ${LOOM_ADMIN_PASSWORD})
  3. Your first provider (OpenAI / Azure OpenAI / Azure AI Foundry / skip)
  4. Port + hostname
  5. Whether to start the server immediately

A loom.config.yaml is written with chmod 600 and a freshly generated master_key.

Non-interactive variants

# Write a default template
loom init --yes --force

# Print the template to stdout
loom init --print > loom.config.yaml

Start

loom start              # production server
loom start -p 4000      # custom port
loom dev                # hot-reloading dev mode

The default URL is http://localhost:3000. Log in with the admin credentials you set during init.

Your first request

  1. Visit /settings/api-keys and create a key (sk-loom-...)
  2. Make sure at least one provider has a valid api_key
curl http://localhost:3000/api/v1/chat/completions \
  -H "Authorization: Bearer sk-loom-..." \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-4o-mini",
    "messages": [{"role": "user", "content": "Hello"}],
    "stream": true
  }'

Or use any OpenAI SDK:

from openai import OpenAI
client = OpenAI(base_url="http://localhost:3000/api/v1", api_key="sk-loom-...")
print(client.chat.completions.create(
    model="gpt-4o-mini",
    messages=[{"role": "user", "content": "Hello"}],
).choices[0].message.content)

Next steps