Skip to main content
user3user1user2user3user5

Powering production docs

API docs that live with your TypeScript code.

Generate always up-to-date API documentation from your codebase. Zero maintenance, fully customizable.

Companies that use BetterTyped open-source software.
How it works

From source code to docs

We start with a full TypeScript reflection of your project, enhance it with purpose-built components, and give you complete control over the result.

Step 01

Zero manual API docs

Point docsgen at your TypeScript source and it extracts every type, interface, class, and function automatically. You never write or update API reference pages by hand again.

// Your source code
export interface Client {
baseUrl: string;
timeout?: number;
send(req: Request): Promise<Response>;
}
↓ Full type reflection generated
Step 02

Comments become docs

Your TSDoc comments flow directly into the final documentation. We extended the TSDoc format with custom tags and badges so you can enrich your API docs without leaving your source code.

/**
* Sends the request to the server.
* @remarks Retries up to 3 times on failure
* @badge beta
* @badge server-only
*/
async send(req: Request): Promise<Response>
↓ Descriptions, badges & tags in your docs
Step 03

Arrange it your way

Control the layout, ordering, and structure of every page. Use page templates, mapper functions, and configuration to make docs fit your project, not the other way around.

// Full control over structure
{
pages: {
class: ClassTemplate,
function: FunctionTemplate,
},
sidebar: { category: "API" }
}
Step 04

Style it your way

Every generated element has CSS classes you can override. Swap built-in components for your own, theme with your design system, or restyle individual sections - your docs, your brand.

/* Override any generated element */
.api-docs__table {
border-radius: 12px;
background: var(--your-bg);
}
// Or replace entire components
const MyMethodCard = (props) => (
<Card variant="glass">...</Card>
)
See it in action

One directive. Live docs.

Write a single @import in your MDX and get always-current API documentation rendered on every build.

---
title: Request
---
# Request
The Request class handles all HTTP
communication with the server.
## Methods
Auto-generated from your TypeScript source
(@import core Request type=methods&display=table)

Request

The Request class handles all HTTP communication with the server.

Methods

NameReturnsDescription
send()Promise<Response>Execute the request
abort()voidCancel the request
clone()RequestCreate a copy
Explore the packages

Everything you need

A modular toolkit for generating, embedding, and maintaining TypeScript documentation that stays in sync with your codebase.

Living documentation

Write once.
Stay current.

You write the narrative. The code provides the details. Docsgen bridges the gap so your documentation never falls out of sync.

Always Up-to-Date

Docs auto-update when you change code. Rename a parameter, add a method - the docs reflect it on the next build.

@import Directive

Embed live API fragments - method tables, parameter lists, type definitions - directly in your hand-written MDX.

Monorepo Support

Generate docs for every package in a monorepo with cross-package type linking and a shared index page.

Fully Customizable

Control output with mapper functions, page templates, JSDoc tags, and per-package configuration.

TypeDoc Powered

Built on TypeDoc for reliable TypeScript parsing. Supports generics, overloads, decorators, and complex type hierarchies.

MDX Generation

Generates clean MDX files with frontmatter, sidebar metadata, and Docusaurus-compatible category files.

Support the development.

Our wonderful sponsors

We're grateful to the following companies and individuals who have supported us financially. You can still help us by joining the GitHub Sponsors program or contact us for other ways of support or collaboration.

My Sponsors
Get started

Try Docsgen

Open source and free. Set up in minutes, keep your docs accurate forever.