Skip to content

Running Locally

Lewis Ginn edited this page Jun 9, 2026 · 3 revisions

Running Locally

Running PowerAutoDocs locally is the quickest way to get started and the best way to test your config before committing to a pipeline setup.

What you need

Node.js 18 or later Download the LTS version from nodejs.org. To check if you already have it:

node --version

Power Platform CLI (pac) Used to unpack your solution ZIP into the XML files PowerAutoDocs reads. Install it from the Microsoft docs or via the Power Platform Tools extension in VS Code.

To check if you already have it:

pac --version

Step 1 — Unpack your solution

PowerAutoDocs reads from unpacked solution files, not ZIP files. Run this command to unpack your solution into your repo:

pac solution unpack --zipfile MySolution.zip --folder ./unpacked/MySolution
  • Replace MySolution.zip with the path to your solution ZIP
  • Replace ./unpacked/MySolution with where you want the files extracted — this folder should be inside your repo

Commit the unpacked folder to your repo. This is the source of truth PowerAutoDocs reads from on every run.

For multiple solutions, unpack each one into its own subfolder:

pac solution unpack --zipfile Core.zip --folder ./unpacked/Core
pac solution unpack --zipfile Flows.zip --folder ./unpacked/Flows

Step 2 — Create your config file

Copy the sample config into your repo root and rename it:

[samples/doc-gen.config.sample.yml](https://github.com/lewginn/PowerAutoDocs/blob/main/samples/doc-gen.config.sample.yml)  →  doc-gen.config.yml

Then fill in the values for your project. See doc-gen.config.yml for an overview, or jump straight to the section you need:

Step 3 — Run

From your repo root:

npx powerautodocs@latest

npx downloads and runs the latest version of PowerAutoDocs automatically — nothing needs to be installed permanently. Output is generated according to your config.

Overriding output format for a single run

You can use CLI flags to control which formats are generated without changing your config file. This is useful for testing:

npx powerautodocs@latest --wiki          # Wiki only
npx powerautodocs@latest --word          # Word only
npx powerautodocs@latest --pdf           # PDF only
npx powerautodocs@latest --wiki --word   # Any combination

Passing any flag overrides the config for that run — only the formats you specify are generated.

Full list of CLI flags

Environment variables

If you're publishing to an ADO Wiki locally, you'll need to provide your PAT as an environment variable rather than committing it to your config file:

# macOS / Linux
export WIKI_PAT=your-pat-here
npx powerautodocs@latest

# Windows (Command Prompt)
set WIKI_PAT=your-pat-here
npx powerautodocs@latest

# Windows (PowerShell)
$env:WIKI_PAT = "your-pat-here"
npx powerautodocs@latest

If you're using AI enrichment locally, set your API key the same way:

export ANTHROPIC_API_KEY=sk-ant-...
npx powerautodocs@latest

AI Enrichment setup

Clone this wiki locally