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, --tsconfigstring - Path to the project's tsconfig.json. Required — compodocx uses TypeScript's compiler to analyze the source.
-
-n, --namestring default:'Application documentation' - Title shown in the sidebar header, browser tab, and <title> of every generated page.
-
--languagestring 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, --configstring - 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, --outputstring default:'./documentation/' - Directory for the generated static site. Created if missing. Contents are overwritten on each run.
-
-e, --exportFormatstring default:'html' - Output format. 'html' = full static site. 'json' = parsed data model as JSON files. 'llm-md' = LLM-context markdown bundle.
-
basestring default:'/'config-only - Base URL prepended to all generated links. Set when hosting docs in a subdirectory (e.g. /my-project/).
-
--multiVersion / --no-multiVersionboolean 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.
-
--versionLabelstring 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.
-
--versionsRootstring default:the -d folder - Where versions.json is read/written. Override when CI builds each version separately and stitches deploys later.
-
--maxVersionsShownnumber default:10 - Cap on switcher dropdown entries. 0 = unlimited. Manifest is always written in full — this is presentation-only. Range 0–1000.
-
--jsonIndentnumber default:0 - Indent for JSON export. Range 0–8.
Dev server
Built-in HTTP server for previewing locally.
-
-s, --serveboolean default:false - Start a local HTTP server after generation. Serves the output directory.
-
-r, --portnumber default:8080 - Port for the dev server.
-
--hoststring default:'127.0.0.1' - Host address. Set to 0.0.0.0 to expose on the network.
-
-w, --watchboolean default:false - Watch the documented project's source and rebuild on changes. Requires --serve. Watches the target project, not compodocx itself.
-
-o, --openboolean default:false - Open the documentation in the default browser after serving.
Theming & branding
Built-in palettes, custom CSS, logo, favicon.
-
--themestring 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.
-
--shikiThemestring 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.
-
--customLogostring - Path to a custom logo image displayed in the sidebar header.
-
--customFaviconstring - Path to a custom favicon. Copied into output and referenced in HTML <head>.
-
--hideGeneratorboolean default:false - Remove the "Built with compodocx" link in the page footer.
-
--hideDarkModeToggleboolean default:false - Remove the light/dark toggle from the top-right header.
-
-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).
-
--disablePrivateboolean default:false - Hide private members from all entity pages. Affects properties, methods, accessors marked private.
-
--disableProtectedboolean default:false - Hide protected members from all entity pages.
-
--disableInternalboolean default:false - Hide members marked with @internal JSDoc tag.
-
--disableLifeCycleHooksboolean default:false - Hide Angular lifecycle hooks (ngOnInit, ngOnDestroy, etc.) from method listings.
-
--disableConstructorsboolean default:false - Hide the constructor section from entity pages.
-
--disablePropertiesboolean default:false - Hide the entire properties section (inputs, outputs, regular properties).
-
--disableDependenciesboolean default:false - Hide the dependencies section on the Info tab (inject() calls + constructor-injected services).
-
--disableFilePathboolean default:false - Hide the source file path shown in the entity hero.
-
--showEffectsboolean default:false - Show Angular effect() entries in a dedicated Effects block on the API tab. Off by default since effects are usually implementation details.
-
--publicApiOnlystring - 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.
-
--minimalboolean default:false - Shorthand: disables search, all graphs, and coverage in one flag. Equivalent to --disableSearch --disableGraph --disableCoverage.
-
--disableSourceCodeboolean default:false - Remove the Source tab and all "Defined in" source links. No source code in output.
-
--disableDomTreeboolean default:false - Remove the DOM Tree tab from component pages.
-
--disableTemplateTabboolean default:false - Remove the Template tab from component pages.
-
--disableStyleTabboolean default:false - Remove the Style tab from component pages.
-
--disableGraphboolean default:false - Remove all dependency graphs (overview + per-component tabs).
-
--disableMainGraphboolean default:false - Remove only the main overview dependency graph. Per-component tabs remain.
-
--disableDependenciesTabboolean default:false - Remove the per-component Dependencies tab (the standalone-import graph).
-
--disableRoutesGraphboolean default:false - Remove the routes graph page (Angular router visualised as a tree).
-
--disableSearchboolean default:false - Remove Pagefind search. Disables the Ctrl+K palette and skips index generation at build.
-
--disableCoverageboolean default:false - Remove the documentation coverage report page.
-
--disableOverviewboolean 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.
-
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, source.
Coverage
Documentation-coverage thresholds and reporting.
-
--coverageTestnumber default:70 - Global documentation-coverage threshold as a percentage. Used in CI to enforce minimum documentation.
-
--coverageMinimumPerFilenumber default:0 - Per-file minimum coverage percentage. Each file must individually meet the threshold.
-
--coverageTestThresholdFailboolean default:true - When true, a coverage breach exits non-zero (fails CI). When false, only a warning is printed.
-
--coverageTestShowOnlyFailedboolean default:false - Show only files below the threshold in coverage output.
-
--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, template playground.
-
--includesstring - Folder of external markdown files. Each .md becomes a page. Supports nested folders for sub-navigation.
-
--includesNamestring default:'Additional documentation' - Sidebar label for the external markdown pages section.
-
-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. Replaces the corresponding built-in template.
-
--templatePlaygroundboolean 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.
-
--disablePlaygroundTabboolean 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).
-
playgroundDependenciesobject 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).
-
--stackblitzboolean default:false - Enable legacy StackBlitz integration. Adds "Open in StackBlitz" buttons to @example code blocks. Superseded by @playground for new projects.
-
--stackblitzTemplatestring - StackBlitz project template ID for the legacy @stackblitz tag. Example code is injected into this template on click.
-
--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.
-
--maxSearchResultsnumber default:15 - Maximum results in the Ctrl+K search palette. 0 = all (may be slow for large projects).
-
-t, --silentboolean 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.