# LLMs

> Learn how to use nuxt-llms to generate llms.txt documentation for your Nuxt application.

This starter kit uses the [nuxt-llms](https://nuxt.com/modules/llms) module to automatically generate [`llms.txt`](https://llmstxt.org/) and `llms-full.txt` documentation files for your application.

These files make your application's content discoverable and consumable by AI assistants and large language models.

## Configuration

The module is configured in `nuxt.config.ts`:

```ts
export default defineNuxtConfig({
  modules: ['nuxt-llms'],
  llms: {
    domain: 'https://your-domain.com',
    title: 'Your Application',
    description: 'A short description of your application.',
    full: {
      title: 'Your Application – Full Documentation',
      description: 'Complete documentation of your application.',
    },
  },
})
```

After starting your application, visit `/llms.txt` and `/llms-full.txt` to see the generated documentation.

## Extending the Documentation

You can dynamically extend both documentation formats via Nitro server plugins.

### llms.txt

Use the `llms:generate` hook to add sections and links to `/llms.txt`:

```ts
// server/plugins/llms.ts
export default defineNitroPlugin((nitroApp) => {
  nitroApp.hooks.hook('llms:generate', async (event, options) => {
    options.sections.push({
      title: 'API Documentation',
      description: 'REST API endpoints and usage.',
      links: [
        {
          title: 'Authentication',
          description: 'API authentication methods.',
          href: `${options.domain}/api/auth`,
        },
      ],
    })
  })
})
```

### llms-full.txt

Use the `llms:generate:full` hook to add free-form Markdown content to `/llms-full.txt`:

```ts
// server/plugins/llms.ts
export default defineNitroPlugin((nitroApp) => {
  nitroApp.hooks.hook('llms:generate:full', async (event, options, contents) => {
    contents.push(`## API Authentication
Use a Bearer token in the \`Authorization\` header to authenticate requests.`)
  })
})
```

## Learn More

- [nuxt-llms on GitHub](https://github.com/nuxt-content/nuxt-llms)
- [llms.txt specification](https://llmstxt.org/)
