Skip to Content
LoremLLM

Local development

Run your mocks on your machine with one command. Same scenarios, zero network.

The CLI runs a local LoremLLM server from your loremllm.config.ts. It serves every endpoint the hosted API does.

npx loremllm dev
LoremLLM dev server
  support-bot   http://localhost:4010/m/support-bot
  docs-agent    http://localhost:4010/m/docs-agent
  inspector     http://localhost:4010/_inspect
Watching loremllm.config.ts

Point your client at http://localhost:4010/m/<slug>. Edit the config and the server reloads.

Pulling hosted mocks

Mocks you built in the dashboard can run locally too:

npx loremllm pull

pull writes them to loremllm/mocks/*.json. The dev server loads both the config file and that folder.

Options

FlagDefaultWhat it does
--port4010Port to listen on
--configloremllm.config.tsConfig file to load
--no-watchDisable reload on change
--latencymock settingOverride stream timing: none, fast or real
--strictExit non-zero when a request matches no scenario

--latency none streams every chunk immediately. Use it in CI.

Environment variable

Most clients read a base URL from the environment. Set it once:

OPENAI_BASE_URL=http://localhost:4010/m/support-bot/v1
ANTHROPIC_BASE_URL=http://localhost:4010/m/support-bot

See the CLI reference for every command.

On this page