---
title: Quickstart
description: >-
  Install leadtype, run the hosted-docs pipeline once, and inspect the generated
  artifacts.
group: get-started
lastModified: '2026-05-11T20:02:32-07:00'
lastAuthor: 'github-actions[bot]'
---
# Quickstart

Five minutes from a folder of MDX to generated docs artifacts.

## Install

|Package manager|Command|
|:--|:--|
|npm|`npm install leadtype`|
|pnpm|`pnpm add leadtype`|
|yarn|`yarn add leadtype`|
|bun|`bun add leadtype`|

`leadtype` ships a CLI plus focused library entry points. Start with the CLI; use the APIs only when your build needs custom plugin order, filtering, or output paths.

## Author one page

Create `docs/index.mdx` in your repo:

```mdx
---
title: "My library"
description: "What it does in one sentence."
group: get-started
---

# My library

Welcome.
```

Every page needs a `title`. Add `group:` when the page should appear in generated navigation and `llms.txt` sections. See [Frontmatter](/docs/authoring/frontmatter) for the full content contract.

## Generate hosted docs output

```bash
npx leadtype generate \
  --src . \
  --out public \
  --base-url https://example.com
```

That command reads `docs/*.mdx`, converts it to markdown, resolves groups, builds search JSON, and writes hosted agent artifacts.

```text
public/
├── llms.txt
├── llms-full.txt
└── docs/
    ├── index.md
    ├── llms.txt
    ├── sitemap.xml
    ├── sitemap.md
    ├── robots.txt
    ├── agent-readability.json
    ├── search-index.json
    └── search-content.json
```

Open `public/docs/index.md` first. It shows what your MDX becomes after the remark component flattening pipeline runs. Then open `public/llms.txt` to see the hosted routing file that HTTP agents start from.

> 💡 **Tip:** **Working reference**
> apps/example/ in the leadtype repo is the production docs site for these docs. It runs the same pipeline you just ran, on TanStack Start, with markdown content negotiation, sitemap regeneration, and JSON-LD wired up. Clone it when you want a copy-pastable end-to-end setup.

## Choose the next setup step

|Goal|Next page|
|--|--|
|Wire the generator into an app build|[Connect a docs site](/docs/build/connect-docs-site)|
|Render HTML pages and an "On this page" sidebar|[Render MDX and TOC](/docs/build/render-mdx-and-toc)|
|Serve markdown, sitemaps, robots, and JSON-LD for agents|[Optimize docs for agents](/docs/build/optimize-docs-for-agents)|
|Query the generated static search index|[Add search](/docs/build/add-search)|
|Publish AGENTS.md inside an npm package|[Bundle docs into a package](/docs/package-docs/bundle)|

* [Connect a docs site](/docs/build/connect-docs-site)
* [Render MDX and TOC](/docs/build/render-mdx-and-toc)
* [Make the site agent-readable](/docs/build/optimize-docs-for-agents)
* [Bundle docs into a package](/docs/package-docs/bundle)
