> ## Documentation Index
> Fetch the complete documentation index at: https://docs.inklyai.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Config reference

> Where to find every field of demo.config.json, and how to get validation in your editor.

Every field of `demo.config.json` is listed in [`docs/schema.md`](https://github.com/inkly-ai/interactive-demo/blob/main/docs/schema.md) in the repo.

That file is generated from the same schema the player validates with, and CI fails if it drifts. It covers the demo itself (`id`, `title`, `theme`, `chrome`, `chapters`), both kinds of step (`content` and `cover`), every annotation type, every cover widget, and the button actions, each with its type, whether it is required, and its default. It lives in the repo rather than here so that it always matches the code.

<Card title="demo.config.json reference" icon="github" href="https://github.com/inkly-ai/interactive-demo/blob/main/docs/schema.md">
  Every field, generated from the schema.
</Card>

For the concepts behind the fields, read [Authoring](/open-source/authoring).

## Validate as you type

Point your text editor at the published JSON Schema for autocompletion and inline validation:

```json theme={"dark"}
{ "$schema": "https://cdn.jsdelivr.net/npm/@inkly-org/interactive-demo/dist/schema/demo.config.json" }
```

`init` writes this line into the demo it scaffolds. A version-pinned copy lives at:

```text theme={"dark"}
https://cdn.jsdelivr.net/npm/@inkly-org/interactive-demo@<version>/dist/schema/demo.config.json
```

## Validate from the command line

```sh theme={"dark"}
interactive-demo validate
```

`validate` checks every demo against the schema and confirms that each referenced file exists. See [`validate`](/open-source/cli#validate).

## Validate in code

```ts theme={"dark"}
import { parseDemo } from '@inkly-org/interactive-demo/schema';

const demo = parseDemo(JSON.parse(raw)); // throws a ZodError on a bad config
```

See [The schema](/open-source/runtime#the-schema) in the runtime reference.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.