Skip to Content
LoremLLM

loremllm

The CLI and config package. Define mocks in code, run them locally, push and pull.

npm install -D loremllm

Config

loremllm.config.ts
import { defineConfig, defineMock, text } from "loremllm";

export default defineConfig({
  project: "acme",
  mocks: [defineMock("support-bot", { scenarios: [{ reply: text("Hello") }] })],
});

The config reference lists every option.

Commands

CommandWhat it does
loremllm initWrite a starter config
loremllm devRun the local server
loremllm loginAuthenticate this machine
loremllm pushUpload mocks from your config to the project
loremllm pullDownload hosted mocks to loremllm/mocks
loremllm recordProxy real traffic and save it as a mock
loremllm test <mock> "prompt"Send one prompt and print the matched scenario and stream
loremllm route <mock> "prompt"Sample smart routing and print the mix
loremllm eval [file...]Run evals and print pass rates
loremllm logs <mock>Tail the request inspector

See the CLI reference for flags.

Exports

loremllm also exports the builders every other package uses: defineConfig, defineMock, text, markdown, lorem, reasoning, toolCall, json, source, usage, delay, finish, error, fault, sequence and oneOf, plus the MCP builders image, resourceLink and toolError.

On this page