This page shows how to run a Docgeni doc site in an existing or new project. See other guides for advanced configuration.
Install Node.js (LTS recommended) and npm, ≥ 10:
bashnode -v
In an existing Angular project or empty folder, run one of:
bashnpx @docgeni/cli init
bashdocgeni init
bashng add @docgeni/cli
docgeni init requires a global CLI: npm install -g @docgeni/cling add @docgeni/cli requires global Angular CLI: npm install -g @angular/cliYou will typically:
full (home page) or lite (default, docs only)docs)
Then:
bashnpm run start:docs
Open http://127.0.0.1:4600.
Lite mode preview:

full mode. The screenshot above shows lite mode only.For a full demo out of the box, use docgeni-template (full mode, sample library alib):
npm install, then npm run start:docs

For full control over dependencies and config.
bashnpm i @docgeni/cli @docgeni/template --save-dev
bashyarn add @docgeni/cli @docgeni/template -D
Add scripts to package.json:
json{ "scripts": { "start:docs": "docgeni serve --port 4600", "build:docs": "docgeni build" } }
Create a config file at the project root. Supported names include .docgenirc.js, .docgenirc.ts, .docgenirc.yaml, .docgenirc.yml, .docgenirc.json, and more—use any one format. Example with .docgenirc.js:
ts/** * @type {import('@docgeni/core').DocgeniConfig} */ module.exports = { mode: 'lite', title: 'Docgeni', repoUrl: 'https://github.com/docgeni/docgeni', navs: [ null, { title: 'GitHub', path: 'https://github.com/docgeni/docgeni', isExternal: true, }, ], };
By default, Docgeni watches Markdown files in the docs directory. Create a minimal page first:
bashmkdir -p docs echo '# Hello Docgeni' > docs/getting-started.md
Run npm run start:docs and open http://127.0.0.1:4600.
Add to .gitignore:
.docgeni/site
If your repo has an Angular library, init will try to wire it in. Components without overview or examples are hidden from the nav.
Minimal example: for a button folder, add button/doc/{locale}.md (match your defaultLocale, e.g. en-us.md):
markdown--- title: Button subtitle: Button --- ## When to use A button triggers an immediate action.
Preview:

See Component documentation for overview, examples, api, and <example />.