Skip to content
compodocx

Angular 21+ · Open source · Node 22+

Static Angular docs. Every release.

compodocx is a static documentation generator for Angular 21+ standalone code. Point it at your TypeScript source for a site that'sstandalone, signal-aware, themable.
Multi-version output, runnable StackBlitz playgrounds, CI diffs, LLM-context export - all included.

All from one CLI.

npm install -D @cngxjs/compodocx
See it in action

Features

Built for Angular 21+ standalone code

Project structure

Organized by feature, from your code

Entry points, imports, and folders decide where a symbol belongs. Every feature gets a page, and a References portal lists every documented symbol. Prefer one chapter per kind? Set menuLayout: 'type'.

How features are detected

Angular Support

Signals, properly rendered

input(), output(), model(), computed(), and linkedSignal() render as first-class members with their value types. Effects opt in via --showEffects.

Signals deep dive

Theming

Eight themes, or your own

Slate Noir, Ocean, Midnight, Nord, Rose Pine, Ember, Neon, Brutalist. Override any subset of --color-cdx-* tokens to ship your brand.

Theming guide

Build & CI

Side-by-side versions

Docs for every release on one domain. Labels auto-detected from package.json. The version-switcher widget ships built in.

Multi-version setup

Tooling

Diff & validate sub-CLIs

compodocx diff fails CI when your public API breaks. compodocx playground:validate compiles every runnable demo before you ship it.

CLI reference

Tooling

LLM-ready export

Export your API as flat markdown or typed JSON. Drop it into your AI assistant, your code-review bot - or any downstream pipeline.

Export options

Angular Support

Dependency injection as a chapter

Providers, feature functions, and injection tokens get their own pages. See which providers supply a token, who injects it, and what needs an injection context.

Dependency injection pages

Angular Support

Typed routes as a tree

Routes are read from provideRouter through the type checker, lazy loadChildren included. Components and guards link back to the routes that use them.

Routes page

Theming

Your design tokens, documented

Comments above CSS custom properties and SCSS variables fill a Theming tab. styleFiles adds free-standing sheets, mixins, and a design tokens page.

Documenting tokens

Output

What your users actually see

A static site where every standalone component, directive, and pipe gets a dedicated page. Deep links, full-text search, and a sticky source viewer included.

Every standalone component, directive, and pipe gets its own page with imports, providers, and members.

Coverage

Catch the undocumented bits before merge

Per-symbol coverage rolls up into a sortable report. Documented vs. not, broken down by kind. Set--coverageTest and your build fails below threshold.

  • Deep-linked symbol list.Click any under-documented symbol to jump straight to its page.
  • Breakdown by kind.Components, directives, pipes, classes, interfaces - each tracked separately.
  • Documented surface only. Symbols no entry point exports are not counted. Use--publicApiOnly to narrow further.

Versioning

Every release. One domain. Zero config.

Each release writes into its own folder under a shared root. Aversions.json manifest drives the version-switcher in the topbar. Append-only, semver-sorted,no server-side config.

  • Auto-detected label.Read from the nearest package.json, or override with--versionLabel.
  • Append-only manifest.Deduplicated by label - past links never break when a new release ships.
  • Runtime switcher.Reads the manifest in the browser - works on GitHub Pages, S3, intranets, evenfile://.

Playground

One-click runnable demos.Powered byStackBlitz

Add a @playground JSDoc block to any component and compodocx ships a Playground tab on the rendered page with one launch button per block. Clicking opens a freshStackBlitz (opens in new tab) project, assembled at build time from your component sources. No iframe overlay, no library publication required.

Doc pages carry only an inert manifest, and nothing contacts StackBlitz until a reader clicks. @internal exports never leak into the public project.

Read the playground guide
  • Click-to-launch

    StackBlitz opens in a fresh tab, not an embedded iframe.

  • Build-time assembled

    Sources travel inline. No npm publish required to share a demo.

  • Launches on click

    Nothing contacts StackBlitz until a reader clicks.

From compodoc

Coming from compodoc? Modern Angular only.

compodocx is a fork for Angular 21+ standalone code, not a drop-in replacement. Switching means changing the package and the script, running it once, and acting on the warnings it prints.

Read MIGRATION.md(opens in new tab)
  • What is no longer documented

    NgModules, @Input and other decorator members, constructor injection, and class-based guards, interceptors and resolvers. One legacy notice lists their locations.

  • What changes for your tooling

    Handlebars templates become JS overrides, rewritten by hand. Page URLs and the JSON export differ; redirects.json maps old paths to new ones.

  • What ng add does for you

    Swaps the package, rewrites compodoc scripts, and seedstsconfig.doc.json.compodocx migrate jsdoc removes retired tags.

Setup

From zero to docs in 60 seconds

One command to install. One to run. The third is optional but recommended once your team is onboard.

  1. Install

    Add it to your dev dependencies.
    For Angular 21+ libraries and apps written with standalone APIs.

    bash
    npm install -D @cngxjs/compodocx
  2. Run

    Point at your tsconfig. Static docs land in ./documentation/<versionLabel>/.
    Label auto-detected from package.json.

    bash
    npx compodocx -p tsconfig.doc.json
  3. Configure

    Or commit a JSON config so everyone on the team runs the same flags. Pin the theme.

    json
    {
      "tsconfig": "tsconfig.doc.json",
      "output": "documentation",
      "theme": "ocean"
    }

Themes

Click a card. The whole site flips.

Eight themes ship with compodocx. Try them live: your pick persists across pages. Want your own? Override any subset of --color-cdx-*tokens in a single CSS file.

FAQ

Common questions

Quick answers to the questions that come up before adoption. Still stuck? Open an issue on GitHub.