Docouture

CLI

Every docouture command (@inditextech/docouture-cli), reproduced from its own --help text. All eleven accept --dir <path> to run from anywhere inside the target repository — the actual root is found by walking up, same as git itself.

Global flags, valid before or after the command name: -h/--help, -v/--version, --json (machine-readable output where supported — currently doctor), --verbose (same as DEBUG=docouture), --no-color.

docouture new <name>

Scaffold an Antora documentation site into docs/ (and its workflows into .github/workflows/), plus AGENTS.md, into the root of an existing git repository. Prompts interactively for anything not given as a flag, in a terminal; --yes skips the wizard and uses defaults for everything unset.

Argument/Flag Effect

<name>

Site name — also the default, title-cased, site title

--dir <path>

Repository root to scaffold into (default: cwd, or its enclosing repo)

--title <title>

Site title (default: title-cased from <name>)

--mode <mode>

standalone (default) or versioned — see Versioning modes

--flow <flow>

trunk-based (default) or git-flow — see Branching model

--branch <name>

Trunk-based only: the one branch (default: main)

--integration-branch <name>

Git-flow only: the prerelease branch (default: develop)

--release-branch <name>

Git-flow only: the release branch (default: main)

--pm <pm>

npm or pnpm (default: auto-detected)

--yes

Skip the interactive wizard

docouture version <value>

Set the version recorded in docs/src/antora.yml. See Releasing a documentation.

Argument/Flag Effect

<value>

Version string to record, e.g. 1.2.0

--file <path>

Overrides --dir with a literal path to the antora.yml to update

--prerelease

Marks the version as a prerelease (mutually exclusive with --stable)

--stable

Marks the version as stable (mutually exclusive with --prerelease)

docouture dev

Build the site and serve it with live reload on every change under docs/ or to antora-playbook.local.yml.

Flag Effect

--port <port>

Dev server port (default 5000)

docouture build

Build the site once — a thin wrapper around the site’s own npm run build (antora --fetch antora-playbook.yml). No command-specific flags beyond the global ones.

docouture publish <target>

Publish whatever is already at output.dir (default build/site) using the @inditextech/docouture-publish-<target> driver — that package must be a devDependency of the site itself. See Publishing a documentation.

Argument/Flag Effect

<target>

Publish driver name, e.g. gh-pages — resolves to @inditextech/docouture-publish-<target>

--<option>

Any option the driver’s own package.json block accepts, overriding docs/package.json’s `"docouture".publish.<target> object for this run (e.g. --branch, shown below)

--user-name <name>

Combines with --user-email into a nested {user:{name,email}} option

--user-email <email>

See --user-name

$ docouture publish gh-pages --branch gh-pages

docouture doctor

Check environment and site health: Node version, that the declared package manager (package.json’s `packageManager field) is installed, the four names that must agree (see Modifying the navigation), git history, that Antora is installed, and (advisory only) whether AGENTS.md is still present, whether the docs/release label exists, and whether the declared branching model (docs/package.json’s `docouture.branching) agrees with what antora-playbook.yml/docouture-release.yml actually say — see Branching model. Does not check for the agent skills — see AI-First approach, those are a separate, self-serve install this CLI never scaffolds or verifies.

Flag Effect

--json

Machine-readable report instead of the human-readable console output

docouture upgrade

Re-sync .github/workflows/, docs/scripts/check-links.mjs, and agent support files (AGENTS.md) from the CLI’s current templates. Workflows and the check-links script are fully overwritten (there is nothing site-specific in either — link ignores are configured separately, in package.json’s `docouture.checkLinks.ignore); AGENTS.md is merged — only docouture’s own managed section is replaced. The rest of docs/ — every page a site owner has written — is never touched.

Flag Effect

--title <title>

Overrides the title read back from antora.yml

--dry-run

Lists what would be written without writing it

docouture branch-model <model>

Switch an already-scaffolded repository between the trunk-based and git-flow branching models — see Branching model for the full mechanism. Direction is inferred from the site’s current branch names (read live from antora-playbook.yml/docouture-release.yml, never from a stored config) versus the <model> argument given here — the same command handles both directions.

Trunk-based → git-flow: the current single branch becomes the release branch by default (least disruption to anything already tagged off it) — --integration-branch (the new prerelease branch) is required, since there is nothing on disk to infer that name from.

Git-flow → trunk-based: lossy — --branch is required and must match one of the two current branches exactly; a third, invented name is refused.

Re-renders .github/workflows/ (same machinery docouture upgrade uses) and patches antora-playbook.yml’s `content.sources[0].branches and docs/package.json’s `docouture.branching field. Does NOT rename actual git branches, touch branch-protection/ruleset rules, or change GitHub’s configured default branch — these stay manual steps, printed as a reminder after every real run.

Argument/Flag Effect

<model>

Target model: trunk-based or git-flow

--branch <name>

Trunk-based target only

--integration-branch <name>

Git-flow target only: the new prerelease branch

--release-branch <name>

Git-flow target only: overrides the release branch’s name

--dry-run

Lists what would be written without writing it

docouture eject <target>

Copy a bundled default file out into docs/ for local customization. Refuses to overwrite an existing file.

Argument Effect

<target>

What to eject. Today: kroki — docs/kroki-compose.yml, the Docker Compose definition the Kroki prewarm step starts automatically

docouture teardown <target>

Stop a service docouture started for you.

Argument Effect

<target>

What to tear down. Today: kroki — runs docker compose down against whichever kroki-compose.yml is actually in effect (an ejected one if it exists, else the bundled default)

docouture completion <bash|zsh>

Print a shell completion script to stdout.

Argument Effect

<bash|zsh>

Which shell to print a completion script for

$ eval "$(docouture completion bash)"
$ docouture completion zsh > "${fpath[1]}/_docouture"