Compodoc: API documentation for Angular, Nest and Stencil projects
:notebook_with_decorative_cover: The missing documentation tool for your Angular, Nest & Stencil application
At a glance
- What is it?
- Compodoc parses a TypeScript project and emits a static documentation site with route graphs, coverage reports and offline search. It suits Angular, Nest and Stencil teams that want API reference generated from source, not hand-written pages.
- Who is it for?
- Adopt Compodoc if your project is Angular, Nest or Stencil and you want API reference, route graphs and coverage numbers generated from source on every build. Do not adopt it if you need hand-authored narrative documentation or you work in React, where the tool has no story to tell.
- Can I use it commercially?
- Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
- Is it still maintained?
- Yes. The repository received new commits within the last day.
- What is it written in?
- Mainly TypeScript, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on November 22, 2026, and from our analysis. They are not legal advice.
Star history
- compodoc/compodoc4,116 ★ · -7
| Repository | 2026-09-23 | 2026-11-22 |
|---|---|---|
| compodoc/compodoc | 4.1k | 4.1k |
-7 Stars in the last 60 days, measured from the daily GitHub snapshot. Compare with other projects
Editorial analysis
What Compodoc solves, and which frameworks it actually covers
Angular projects accumulate a lot of structure that no single file describes: components with inputs and outputs, injectables with dependency graphs, guards and interceptors wired through routing, modules that re-export each other. Reading that from source means opening dozens of files. Compodoc walks the TypeScript AST and produces a browsable static site instead, one page per component, directive, pipe, module, injectable, guard, interceptor, class, interface and route. The README describes it as "the missing documentation tool for your Angular application", and the repository description extends that to Nest and Stencil.
The intended audience is a team that already writes TypeScript and wants reference material that cannot drift from the code, because it is regenerated from the code. It is not a writing tool. There is no editor, no content directory, no way to author a page that does not correspond to a symbol the parser found.
How the parser turns an Angular project into a static site
The pipeline is one-directional. Compodoc reads the tsconfig of the target project, resolves the source files, and builds an AST per file. From that AST it extracts decorated classes and their metadata, JSDoc and TypeScript comment blocks, type signatures, and inheritance relationships. The extracted model is then rendered into HTML through templates, with a table of contents assembled from whatever elements the parse produced rather than from a fixed skeleton.
Two outputs sit alongside the HTML. One is a JSON export of the parsed model, which the README lists as a feature and which is useful when you want to feed the same data into another tool. The other is Markdown output, described in the README as LLM-ready. Search runs client-side through lunr.js, so the generated site works without a server and without a network connection.
Routing gets separate treatment. The README states that route and dependency graphs are generated for provideRouter, lazy routes, default-export route files and classic NgModule routing. That matters because Angular's router configuration has moved between idioms over several versions, and a graph generator that only understood NgModule routing would show nothing for a modern standalone app.
Coverage is computed during the same pass. The README describes coverage reports and coverage checks for CI workflows, which means the parse result includes a count of documented versus undocumented members that can fail a build.
Installing Compodoc and generating your first documentation site
Compodoc is published on npm as @compodoc/compodoc. The README points installation instructions at the project website rather than repeating them inline, and the repository does not include a copy-pasteable install command in the files available, so the package name is the anchor to work from.
What the repository does show is how the CLI is wired. In package.json the bin field maps the compodoc command to the file ./bin/index-cli.js, so the binary is a thin entry point over the compiled CLI:
"bin": {
"compodoc": "./bin/index-cli.js"
}The repository's own scripts invoke that entry point directly during development, which is the shape any local invocation takes:
node ./bin/index-cli.jsThe README does not spell out the flag set for a first run, so treat the CLI help output as the source of truth for options rather than assuming a flag exists. What you should see once generation completes is a navigation tree built from the symbols the parser found, one entry per component, module and injectable, plus a search box backed by lunr.js.
For a CI check, the README states that coverage reports and coverage checks are supported for CI workflows, which is the part worth wiring in first. The README does not document the exact flag that sets a coverage threshold, so confirm it against the CLI help before adding it to a pipeline.
Where Compodoc is the wrong tool
Compodoc documents code, not intent. If your team needs a getting-started guide, a migration narrative or a conceptual explanation of why a module is shaped the way it is, none of that comes out of an AST parse. The generated pages will show that a service exists, what it injects and what its methods accept, and nothing about when to call it. Teams that expect the tool to replace a docs site end up with a very complete API index and no prose.
The framework constraint is equally hard. The repository description names Angular, Nest and Stencil. The related searches include Compodoc for React and compodoc react, and those queries have no answer here: React components are not decorated classes with Angular metadata, so there is no metadata for the parser to extract. If you are on React, this is not a tool you can bend into shape.
There is also a cost that only shows up on large codebases. The parser reads the whole project through tsconfig, so generation time scales with the size of the source tree, and a coverage threshold becomes a maintenance obligation. Once a CI gate is set at a given number, every new undocumented member is a build failure waiting to happen. That is the intended pressure, but it is pressure, and teams that set the threshold high on day one tend to spend the next sprint writing comments rather than features.
Compodoc versus Storybook: different artifacts from the same components
The comparison comes up often enough that compodoc vs storybook is one of the searches people run. The difference is in what each tool treats as the source of truth.
Storybook is built around stories: a developer writes a file per component state, and the tool renders those states in isolation so they can be viewed and interacted with. The artifact is a component workshop, and the work is authoring stories. Compodoc takes the opposite position. It reads what is already in the source, including the JSDoc and TypeScript comments, and produces reference pages with no authoring step at all. The artifact is an API index.
That means they answer different questions. Storybook answers "what does this component look like in each state". Compodoc answers "what inputs does this component accept, what does it inject, and is it documented". A team can run both, and the overlap is small: Storybook does not generate route graphs or dependency graphs from provideRouter, and Compodoc does not render interactive component states. Choosing between them is really choosing whether your documentation gap is visual or structural.
Maintenance, licence and upgrade cost
The repository is not archived, and the last push was on 2026-09-23. Releases are infrequent rather than continuous: v2.0.0 landed on 2026-06-28, after 1.2.1 on 2026-01-16 and 1.2.0 on 2026-01-12. A major version bump in that sequence is worth reading the changelog for before upgrading, because the parser tracks Angular's own API surface, and Angular's standalone APIs, signal inputs and styleUrl handling are exactly the areas the README lists as supported. When Angular changes those, Compodoc has to change with them.
The practical upgrade cost is the tsconfig coupling. Compodoc reads your project through the tsconfig you point it at, so a project that reorganizes its build configuration can break generation without any change to Compodoc itself. Pin the version in package.json and upgrade deliberately rather than tracking latest.
The licence is MIT, which permits commercial use, modification and redistribution provided the copyright notice and permission notice are retained. That is a permissive arrangement with few obligations, but it is not legal advice, and if your organization has a policy review for third-party dependencies, the MIT text in the LICENSE file is what that review will read.
Editorial conclusion
Adopt Compodoc if your project is Angular, Nest or Stencil and you want API reference, route graphs and coverage numbers generated from source on every build. Do not adopt it if you need hand-authored narrative documentation or you work in React, where the tool has no story to tell. Before committing, check how many undocumented members the parser reports on your own codebase, because that number is the one your CI gate will be built on.
Frequently asked questions
What is Compodoc in Angular?
It is a documentation generator that parses an Angular project's TypeScript AST and emits a static site covering components, directives, pipes, modules, injectables, guards, interceptors, classes, interfaces and routes. The README describes it as the missing documentation tool for Angular applications.
How do I use Compodoc?
Install @compodoc/compodoc as a development dependency, then invoke the compodoc binary, which package.json maps to ./bin/index-cli.js. The README does not list the individual flags for a first run, so check the CLI help for the options your project needs.
What is the difference between Compodoc and Storybook?
Storybook renders component states that developers author as stories, while Compodoc reads existing source and comments and generates API reference pages without an authoring step. Compodoc also produces route and dependency graphs; Storybook does not.
What is Compodoc?
Compodoc is an MIT-licensed TypeScript documentation generator for Angular, Nest and Stencil applications. It parses the project through tsconfig and outputs a static site with a table of contents, lunr.js search, JSON export and Markdown output.
Where can I find documentation for Angular?
Compodoc does not document Angular itself; it documents your project. Its own official documentation has moved to the project website at compodoc.github.io/website, which the README links for getting started and installation instructions.
Official sources
Add this badge to your README
If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.
[](https://hysenlabs.com/projects/compodoc-compodoc)Star history chart for your README
[](https://hysenlabs.com/projects/compodoc-compodoc)Was this useful?