Skip to content
compodocx
Skip to article content

Guide 04

Options

cngxjs (opens in new tab)Updated Guide04of 13

compodocx accepts CLI flags or a config file (.compodocxrc,.compodocxrc.json, .compodocxrc.yaml, or a compodocx property in package.json). Flags override config values. 99 options total, grouped below.

Relative paths in a config file resolve against the folder of that file; flags resolve against the working directory. Flags and keys from compodoc that no longer exist are ignored with a warning.

General

Identity, language, and the entry point to your project.

-p, --tsconfigstring
Path to the project's tsconfig.json. Required - compodocx uses TypeScript's compiler to analyze the source.
-n, --namestringdefault: 'Application documentation'
Title shown in the sidebar header, browser tab, and <title> of every generated page.
--languagestringdefault: 'en-US'
UI language. bg-BG, de-DE, en-US, es-ES, fr-FR, hu-HU, it-IT, ja-JP, ka-GE, ko-KR, nl-NL, pl-PL, pt-BR, ru-RU, sk-SK, zh-CN, zh-TW.
-c, --configstring
Explicit config-file path. Otherwise compodocx searches the working folder for .compodocxrc, .compodocxrc.json, .compodocxrc.yaml, compodocx.config.{js,ts,cjs,mjs}, or a compodocx key in package.json, then the same compodoc names.
includestring[]config-only
Extra globs of source files to document, relative to the tsconfig folder. Added to the tsconfig's include list.
excludestring[]default: ['**/.git', '**/node_modules', '**/*.d.ts', '**/*.spec.ts']config-only
Globs of source files to skip, relative to the tsconfig folder. Replaces the default list, so repeat its entries to keep them. Combined with the tsconfig's exclude list.

Output

Where the static site lands and which export format it uses.

-d, --outputstringdefault: './documentation/'
Directory for the generated static site. Created if missing. Contents are overwritten on each run.
-e, --exportFormatstringdefault: 'html'
Output format. 'html' = full static site. 'json' = data model in <output>/documentation.json. 'llm-md' = one Markdown file, to stdout without an output folder, else <output>/llm-context.md.
--multiVersion / --no-multiVersionbooleandefault: true
Multi-version layout on by default - writes <output>/<versionLabel>/ and maintains versions.json. Disable for a flat single-version layout. Non-HTML exports ignore this flag.
--versionLabelstringdefault: auto
Override the version-subfolder name. Default: nearest package.json version, prefixed with v (1.2.3 → v1.2.3). Use main, next, unreleased for non-package builds.
--versionsRootstringdefault: the -d folder
Where versions.json is read/written. Override when CI builds each version separately and stitches deploys later.
--maxVersionsShownnumberdefault: 10
Cap on switcher dropdown entries. 0 = unlimited. Manifest is always written in full - this is presentation-only. Range 0–1000.
--jsonIndentnumberdefault: 0
Indent of documentation.json. 0 writes one line, 1–8 pretty-prints. Any other value stops the build.

Dev server

Built-in HTTP server for previewing locally.

-s, --servebooleandefault: false
Start a local HTTP server after generation. Serves the output directory.
-r, --portnumberdefault: 8080
Port for the dev server.
--hoststringdefault: '127.0.0.1'
Host address. Set to 0.0.0.0 to expose on the network.
-w, --watchbooleandefault: false
Watch the documented project's source and rebuild on changes. Requires --serve. Watches the target project, not compodocx itself.
-o, --openbooleandefault: false
Open the documentation in the default browser after serving.

Theming & branding

Built-in palettes, custom CSS, logo, favicon.

--themestringdefault: 'default'
Built-in theme name or path to a custom CSS file. Built-in: default, ocean, ember, midnight, neon, brutalist, nord, rose-pine. Custom CSS replaces the built-in. Upstream compodoc theme names warn and map to a built-in.
--shikiThemestringdefault: 'github-light:github-dark'
Shiki syntax highlighting pair for code blocks. Format 'light:dark' or single name for both modes. Uses Shiki's bundled themes.
--customLogostring
Path to a custom logo image displayed in the sidebar header. Its size follows its aspect ratio; see logoLayout.
--customLogoDarkstring
Logo shown instead of customLogo while dark mode is on. Needs customLogo and a different file name.
--logoLayout'auto' | 'icon' | 'wordmark'default: 'auto'
'wordmark' = the logo alone. 'icon' = the logo next to the project name. 'auto' reads the aspect ratio of an SVG or PNG: 2:1 and wider is a wordmark.
--customFaviconstring
Path to a custom favicon (.svg, .ico, or .png). Copied to images/favicon.<ext> and linked in every page instead of the bundled icon.
--hideGeneratorbooleandefault: false
Remove the "Built with compodocx" link in the page footer.
--hideDarkModeTogglebooleandefault: false
Remove the light/dark toggle from the top-right header.
--hideAiGeneratedBadgebooleandefault: false
Hide the "AI generated" chip, sentence, and banner on every page. The JSON and llm-md exports keep the aiGenerated fields.
styleFilesstring[]default: []config-only
Globs of free-standing .css / .scss files to document, relative to the config file's folder: theme bridges, directive assets, global token sheets. They join features like symbols.
themingPrivatePrefixstring | falsedefault: '--_'config-only
Prefix of custom properties hidden from the docs. false lists every property.
-y, --extThemestring
DEPRECATED. Use --theme. When set without --theme, treated as a custom theme path.

Visibility filters

Hide individual member groups (the entity page still exists).

--disablePrivatebooleandefault: false
Hide private members from all entity pages. Affects properties, methods, accessors marked private.
--disableProtectedbooleandefault: false
Hide protected members from all entity pages.
--disableInternalbooleandefault: false
Hide members marked with @internal JSDoc tag.
--disableLifeCycleHooksbooleandefault: false
Hide Angular lifecycle hooks (ngOnInit, ngOnDestroy, etc.) from method listings.
--disableConstructorsbooleandefault: false
Hide the constructor section from entity pages.
--disablePropertiesbooleandefault: false
Do not build the package properties page or its sidebar link. Class and component members are not affected.
--disableDependenciesbooleandefault: false
Do not build the package dependencies page or its sidebar link. To hide the section on the Info tab, leave dependencies out of infoTabSections.
--disableFilePathbooleandefault: false
Hide the source file path shown in the entity hero.
--showEffectsbooleandefault: false
Show effect(), afterRenderEffect(), and similar members in a dedicated Effects block on the API tab. Off by default, when they appear as regular properties, since effects are usually implementation details.
--publicApiOnlystring
Restrict the docs to the public API. Names come from *.api.md reports below the tsconfig folder, else from index.d.ts files or the exports[*].types declarations in the given dist folder. Useful for library authors.

Feature toggles

Disable entire features, tabs, or pages.

--minimalbooleandefault: false
Shorthand: disables search, all graphs, routes, and coverage in one flag. Equivalent to --disableSearch --disableGraph --disableRoutes --disableCoverage.
--disableSourceCodebooleandefault: false
Remove the Source tab and all "Defined in" source links. No source code in output.
--disableDomTreebooleandefault: false
Remove the DOM Tree tab from component pages.
--disableTemplateTabbooleandefault: false
Remove the Template tab from component pages.
--disableStyleTabbooleandefault: false
Remove the Style tab from component pages.
--disableGraphbooleandefault: false
Remove the dependency graph from the overview page; js/graph.js is not written. The per-component tab is controlled by disableDependenciesTab.
--disableDependenciesTabbooleandefault: false
Remove the per-component Dependencies tab, which shows the component's neighbourhood in the dependency graph.
--disableRoutesbooleandefault: false
Do not read routes: no routes page, menu entry, route links, palette entries, or exported routes.
--disableSearchbooleandefault: false
Remove Pagefind search. Disables the Ctrl+K palette and skips index generation at build.
--disableCoveragebooleandefault: false
Remove the documentation coverage report page.
--disableOverviewbooleandefault: false
Remove the overview/dashboard page (project-level statistics + main graph).
--disableMarkdownPagesstring[]default: []
Root Markdown files not to build as pages: changelog, contributing, license, todo. Comma-separated on the CLI.

Tab sections (config-only)

Compose the section list inside Info / API / Theming tabs. No CLI flag - set in the config file.

infoTabSectionsstring[]default: []config-only
Override the section list for the Info tab. Empty = all defaults render. IDs: import, deprecated, description, examples, metadata, extends, host, dependencies, providers, viewProviders, relationships.
apiTabSectionsstring[]default: []config-only
Override the section list for the API tab. IDs: index, inputs, outputs, derivedState, effects, properties, methods, accessors, indexSignatures, hostBindings, hostListeners.
themingTabSectionsstring[]default: []config-only
Override the section list for the Theming tab. IDs: overview, index, tokens, mixins, source.

Coverage

Documentation-coverage thresholds and reporting.

--coverageTestnumberdefault: off
Global documentation-coverage threshold as a percentage; setting it turns the test on. The flag without a value uses 70. Used in CI to enforce minimum documentation.
--coverageMinimumPerFilenumberdefault: off
Per-file minimum coverage percentage; setting it turns the per-file test on. Each file must individually meet the threshold.
--coverageTestThresholdFailbooleandefault: true
When true, a coverage breach exits non-zero (fails CI). When false, only a warning is printed.
--coverageTestShowOnlyFailedbooleandefault: false
Show only files below the threshold in coverage output.
--filesstring
Run only the per-file coverage test on the given files and generate no docs; needs --coverageMinimumPerFile. Repeat the flag for several files. The files config key instead adds source files to the documented set.
--unitTestCoveragestring
Path to an Istanbul JSON coverage summary (coverage-summary.json). Integrates unit-test coverage data into the documentation coverage report.

Additional content

External markdown, static assets, and template overrides.

--includesstring
Folder of external markdown files with a summary.json table of contents. Each listed page gets a sidebar entry, and nested nodes form sub-navigation. A missing folder is reported with a warning.
--includesNamestringdefault: 'Additional documentation'
Sidebar label for the external markdown pages section.
--includesLabelsstring
Path to a JSON file keyed by page slug, each entry with an optional label, title, and tooltip. Read only when includes is set.
--includesTooltipsbooleandefault: false
Show the subtitle of each additional page, or its tooltip key, as the tooltip of its sidebar link.
aiGeneratedNotestringdefault: ''config-only
Sentence next to the "AI generated" chip. {value} stands for the marker value; {key} fills a key=value field. Empty uses the translated default.
-a, --assetsFolderstring
Folder of static assets (images, files) copied into output. Reference from markdown or templates via relative paths.
--templatesstring
Directory of JS template overrides. Each file exports (data, helpers) => string and replaces the corresponding built-in. Override names match the emitted page kind (component, directive, pipe, injectable, service, token, class, guard, interceptor, resolver, interface, entity, namespace, feature, style, routes, design-tokens, utilities, dependency-injection, function, variable, typealias, enumeration, api-reference, additional-page, …) or block (referenced-by, block-routed-at, block-theming, block-playground, version-switcher, …). Handlebars .hbs files are skipped with one warning.

Playground (@playground)

Runnable StackBlitz demos via @playground JSDoc blocks. See the Playground guide for the full authoring story.

--disablePlaygroundTabbooleandefault: false
Hide the per-component Playground tab even when @playground blocks are parsed. Independent of --disableDependenciesTab. No effect on components without @playground blocks (the tab is already absent).
playgroundDependenciesobjectdefault: {}config-only
Extra packages to inject into every StackBlitz manifest's dependencies, with the version YOU specify. Wins over the consumer-package.json auto-forward AND any auto-detected version (e.g. Material). Use for libraries the consumer ships but doesn't npm install directly (peer-only CSS themes), or to pin a per-build version. The value is forwarded unchanged, so dist-tags, tarball URLs, and git refs work.
--strictPlaygroundsbooleandefault: false
Fail the build when a non-vendored @playground imports a subpath or symbol the pinned package version does not have. Off, it only warns.
playgroundVendorstring[]default: []config-only
Package names or globs to embed from the local build instead of the npm registry, so a playground runs against your working tree. Fails the build when a build output is missing.
playgroundVendorRootstringdefault: 'dist'config-only
Base directory the playgroundVendor closure is read from.
playgroundVendorCapnumberdefault: 1500000config-only
Backstop byte cap on one playground's vendored closure, under the roughly 2 MB StackBlitz POST limit. Range 50 000–2 000 000.
playgroundVendorIncludeSourcemapsbooleandefault: falseconfig-only
Keep *.map sourcemaps in vendored packages.
playgroundDepDepthnumberdefault: 3config-only
Max import depth followed when walking a playground's dependency graph. Range 1–100.
playgroundFileCountCapnumberdefault: 25config-only
Ceiling on source files in one playground manifest. Going over fails that playground. Range 1–1000.
playgroundFileCapnumberdefault: 8000config-only
Per-file character cap before a bundled source is truncated with a footer. Range 500–1,000,000.
playgroundMaterialShellbooleandefault: falseconfig-only
Force the Roboto and Material-Icons links and the Material body classes into every playground, without adding Angular Material. For libraries themed to look like Material.
playgroundHeadstring[]default: []config-only
Entries injected into the <head> of every playground, emitted verbatim.
playgroundGlobalStylesstringdefault: ''config-only
Global styles appended to every playground stylesheet. A Sass @use or @forward switches the sheet to src/styles.scss.

Analytics

Google Analytics 4 tracking for the generated site.

--gaIDstring
Google Analytics 4 measurement ID (G-XXXXXXXXXX). When set, gtag.js is injected into every page.

Search & logging

Pagefind result cap and CLI verbosity.

--maxSearchResultsnumberdefault: 15
Maximum results in the Ctrl+K search palette. 0 = all (may be slow for large projects). Integer from 0 to 10000.
--searchFacetLimitnumberdefault: 8
Filter chips each facet of the palette shows before a "+N more" toggle. 0 = all. Integer from 0 to 1000.
-t, --silentbooleandefault: false
Suppress all console output during generation. Useful in CI where only the exit code matters.
--verbosebooleandefault: false
Also print debug lines: one per symbol found, file scanned, and symbol skipped. --silent wins.

Run compodocx --help for the same surface from the terminal. Options are resolved CLI > config file > defaults.