loremllm
The CLI and config package. Define mocks in code, run them locally, push and pull.
npm install -D loremllmConfig
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
| Command | What it does |
|---|---|
loremllm init | Write a starter config |
loremllm dev | Run the local server |
loremllm login | Authenticate this machine |
loremllm push | Upload mocks from your config to the project |
loremllm pull | Download hosted mocks to loremllm/mocks |
loremllm record | Proxy 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.