# loremllm

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

```bash
npm install -D loremllm
```

## Config [#config]

```ts title="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](/docs/reference/config) lists every option.

## Commands [#commands]

| Command                          | What it does                                                    |
| -------------------------------- | --------------------------------------------------------------- |
| `loremllm init`                  | Write a starter config                                          |
| `loremllm dev`                   | Run the [local server](/docs/getting-started/local-development) |
| `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](/docs/mocks/routing) and print the mix   |
| `loremllm eval [file...]`        | Run [evals](/docs/guides/evals) and print pass rates            |
| `loremllm logs <mock>`           | Tail the request inspector                                      |

See the [CLI reference](/docs/reference/cli) for flags.

## Exports [#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`.