# Mimlet

Test data, with character.

Typed fixtures. Coherent scenarios. Failures you can replay.

Give your tests a little life. Build fixtures that fit your schemas, keep related data connected, and bring a failing case back on cue.

Status: published alpha 0.1.0-alpha.2, available on npm’s next channel.

[Get started](/mimlet/guide/getting-started.md) · [Choose an adapter](/mimlet/guide/adapters.md)

## Your schema. Its natural habitat.

Keep your native types, validation and codecs. Start with a supported generator, or bring a factory for the details only you know.

[Find your adapter](/mimlet/guide/adapters.md)

## A whole world, connected.

A customer, their order, the right total. Describe the relationships once, then build a coherent scenario for the test in front of you.

[Build a scenario](/mimlet/guide/correlated-scenarios.md)

## That failure? Bring it back.

Use explicit seeds and compatible replay records to reproduce a run. Shrink the inputs and recompute the relationships as the case gets smaller.

[Meet replay and shrinking](/mimlet/guide/sessions-and-replay.md)

## For coding agents

- Less API guesswork: Typed builders and tested recipes make the intended operations explicit.
- More repeatable debugging: Save a compatible replay record and return to the failing case.
- A clear path through the docs: Read concise Markdown, choose an adapter, and know when to use a factory.

[Agent guide](/mimlet/guide/agents.md)

## A working example

```ts
import Type from 'typebox';
import { fluent } from '@mimlet/core';
import { fromTypeBox } from '@mimlet/typebox';

const User = Type.Object({
  id: Type.String({ default: 'user-1' }),
  role: Type.Union([
    Type.Literal('reader'),
    Type.Literal('admin'),
  ]),
});

const users = fluent(fromTypeBox(User), ['id', 'role']);
export const admin = users.withRole('admin').buildValidated();

```
