Skip to content

inthhq/leadtype

Repository files navigation

leadtype

A docs pipeline. Write MDX once. Get a website for humans, an llms.txt for HTTP agents, an AGENTS.md-fronted bundle for offline coding agents, and a static search index — all from a single source.

flowchart LR
  src["docs/*.mdx"]
  site_run["leadtype generate"]
  bundle_run["leadtype generate --bundle"]
  site_out["public/<br/>llms.txt · llms-full.txt<br/>docs/*.md · search-index.json"]
  bundle_out["packages/&lt;name&gt;/<br/>AGENTS.md · docs/*.md"]
  humans["humans (browser)"]
  http_agents["HTTP agents<br/>(/llms.txt or<br/>Accept: text/markdown)"]
  search["search UI · AI answers"]
  offline_agents["coding agents<br/>(Claude Code, Codex, Cursor,<br/>Copilot…) read<br/>node_modules/&lt;pkg&gt;/AGENTS.md"]
  src --> site_run
  src --> bundle_run
  site_run --> site_out
  bundle_run --> bundle_out
  site_out --> humans
  site_out --> http_agents
  site_out --> search
  bundle_out --> offline_agents
Loading

leadtype is not a docs website framework. Bring your own UI — Next.js, TanStack Start, Astro, anything — and let leadtype handle conversion, validation, search, and the agent-facing outputs that website frameworks don't ship.

Choose your path

  • Build a docs site — wire leadtype into your build to convert MDX, index search, and serve markdown to agents.
  • Bundle docs into your package — ship AGENTS.md plus topic markdown inside the npm tarball so consumers can point agents at version-matched docs in node_modules/<your-package>/.

Install

pnpm add leadtype

30-second example

For a hosted docs site:

npx leadtype generate --src . --out public --base-url https://leadtype.dev

For an npm-bundled doc set:

npx leadtype generate --bundle --src . --out packages/my-package

The first produces public/llms.txt, public/llms-full.txt, public/docs/search-index.json, and public/docs/*.md. The second produces packages/my-package/AGENTS.md and packages/my-package/docs/*.md with relative links that still work after npm install.

Documentation

Full docs at leadtype.dev:

Repo layout

  • packages/leadtype/ — the npm package (CLI + library entry points).
  • apps/example/ — production docs site and reference template, on TanStack Start.
  • docs/ — the source MDX rendered by both this site and the package's bundled docs.

Local workflow

bun install
bun run dev          # build the package, run the pipeline, start the example app

Pipeline checks:

bun run --filter example pipeline:build
bun run --filter example pipeline:test
bun run --filter example test:e2e

License

MIT.

About

Unified docs pipeline for humans & agents.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages