Skip to content
compodocx
Skip to article content

Guide 04

Options

cngxjs (opens in new tab) Updated Guide 04 of 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. 70 options total, grouped below.

General

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

-p, --tsconfig string
Path to the project's tsconfig.json. Required — compodocx uses TypeScript's compiler to analyze the source.
-n, --name string default: 'Application documentation'
Title shown in the sidebar header, browser tab, and <title> of every generated page.
--language string default: '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, --config string
Explicit config-file path. Otherwise compodocx auto-discovers .compodocxrc, .compodocxrc.json, .compodocxrc.yaml, or a compodocx/compodoc key in package.json.

Output

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

-d, --output string default: './documentation/'
Directory for the generated static site. Created if missing. Contents are overwritten on each run.
-e, --exportFormat string default: 'html'
Output format. 'html' = full static site. 'json' = parsed data model as JSON files. 'llm-md' = LLM-context markdown bundle.
base string default: '/' config-only
Base URL prepended to all generated links. Set when hosting docs in a subdirectory (e.g. /my-project/).
--multiVersion / --no-multiVersion boolean default: 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.
--versionLabel string default: 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.
--versionsRoot string default: the -d folder
Where versions.json is read/written. Override when CI builds each version separately and stitches deploys later.
--maxVersionsShown number default: 10
Cap on switcher dropdown entries. 0 = unlimited. Manifest is always written in full — this is presentation-only. Range 0–1000.
--jsonIndent number default: 0
Indent for JSON export. Range 0–8.

Dev server

Built-in HTTP server for previewing locally.

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

Theming & branding

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

--theme string default: '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.
--shikiTheme string default: '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.
--customLogo string
Path to a custom logo image displayed in the sidebar header.
--customFavicon string
Path to a custom favicon. Copied into output and referenced in HTML <head>.
--hideGenerator boolean default: false
Remove the "Built with compodocx" link in the page footer.
--hideDarkModeToggle boolean default: false
Remove the light/dark toggle from the top-right header.
-y, --extTheme string
DEPRECATED. Use --theme. When set without --theme, treated as a custom theme path.

Visibility filters

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

--disablePrivate boolean default: false
Hide private members from all entity pages. Affects properties, methods, accessors marked private.
--disableProtected boolean default: false
Hide protected members from all entity pages.
--disableInternal boolean default: false
Hide members marked with @internal JSDoc tag.
--disableLifeCycleHooks boolean default: false
Hide Angular lifecycle hooks (ngOnInit, ngOnDestroy, etc.) from method listings.
--disableConstructors boolean default: false
Hide the constructor section from entity pages.
--disableProperties boolean default: false
Hide the entire properties section (inputs, outputs, regular properties).
--disableDependencies boolean default: false
Hide the dependencies section on the Info tab (inject() calls + constructor-injected services).
--disableFilePath boolean default: false
Hide the source file path shown in the entity hero.
--showEffects boolean default: false
Show Angular effect() entries in a dedicated Effects block on the API tab. Off by default since effects are usually implementation details.
--publicApiOnly string
Restrict to symbols exported from index.d.ts in the given dist folder. Only these symbols (and their dependencies) are documented. Useful for library authors.

Feature toggles

Disable entire features, tabs, or pages.

--minimal boolean default: false
Shorthand: disables search, all graphs, and coverage in one flag. Equivalent to --disableSearch --disableGraph --disableCoverage.
--disableSourceCode boolean default: false
Remove the Source tab and all "Defined in" source links. No source code in output.
--disableDomTree boolean default: false
Remove the DOM Tree tab from component pages.
--disableTemplateTab boolean default: false
Remove the Template tab from component pages.
--disableStyleTab boolean default: false
Remove the Style tab from component pages.
--disableGraph boolean default: false
Remove all dependency graphs (overview + per-component tabs).
--disableMainGraph boolean default: false
Remove only the main overview dependency graph. Per-component tabs remain.
--disableDependenciesTab boolean default: false
Remove the per-component Dependencies tab (the standalone-import graph).
--disableRoutesGraph boolean default: false
Remove the routes graph page (Angular router visualised as a tree).
--disableSearch boolean default: false
Remove Pagefind search. Disables the Ctrl+K palette and skips index generation at build.
--disableCoverage boolean default: false
Remove the documentation coverage report page.
--disableOverview boolean default: false
Remove the overview/dashboard page (project-level statistics + main graph).

Tab sections (config-only)

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

infoTabSections string[] 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.
apiTabSections string[] default: [] config-only
Override the section list for the API tab. IDs: index, inputs, outputs, derivedState, effects, properties, methods, accessors, indexSignatures, hostBindings, hostListeners.
themingTabSections string[] default: [] config-only
Override the section list for the Theming tab. IDs: overview, index, tokens, source.

Coverage

Documentation-coverage thresholds and reporting.

--coverageTest number default: 70
Global documentation-coverage threshold as a percentage. Used in CI to enforce minimum documentation.
--coverageMinimumPerFile number default: 0
Per-file minimum coverage percentage. Each file must individually meet the threshold.
--coverageTestThresholdFail boolean default: true
When true, a coverage breach exits non-zero (fails CI). When false, only a warning is printed.
--coverageTestShowOnlyFailed boolean default: false
Show only files below the threshold in coverage output.
--unitTestCoverage string
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, template playground.

--includes string
Folder of external markdown files. Each .md becomes a page. Supports nested folders for sub-navigation.
--includesName string default: 'Additional documentation'
Sidebar label for the external markdown pages section.
-a, --assetsFolder string
Folder of static assets (images, files) copied into output. Reference from markdown or templates via relative paths.
--templates string
Directory of JS template overrides. Each file exports (data, helpers) => string. Replaces the corresponding built-in template.
--templatePlayground boolean default: false
Generate an interactive Template Playground page with code editor and live preview.

Playground (@playground)

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

--disablePlaygroundTab boolean default: 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).
playgroundDependencies object default: {} 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. No CLI flag — config-file only.

Integrations

Legacy StackBlitz @stackblitz tag, Google Analytics 4. For runnable demos prefer the modern @playground tag (see Playground group above).

--stackblitz boolean default: false
Enable legacy StackBlitz integration. Adds "Open in StackBlitz" buttons to @example code blocks. Superseded by @playground for new projects.
--stackblitzTemplate string
StackBlitz project template ID for the legacy @stackblitz tag. Example code is injected into this template on click.
--gaID string
Google Analytics 4 measurement ID (G-XXXXXXXXXX). When set, gtag.js is injected into every page.

Search & logging

Pagefind result cap and CLI verbosity.

--maxSearchResults number default: 15
Maximum results in the Ctrl+K search palette. 0 = all (may be slow for large projects).
-t, --silent boolean default: false
Suppress all console output during generation. Useful in CI where only the exit code matters.

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