﻿---
title: build
description: Builds a local documentation set folder. Repeated invocations will do incremental builds of only the changed files unless: The base branch has changed.The...
url: https://docs-v3-preview.elastic.dev/elastic/docs-builder/pull/2824/cli/docset/build
---

# build
Builds a local documentation set folder.
Repeated invocations will do incremental builds of only the changed files unless:
- The base branch has changed.
- The state file in the output folder has been removed.
- The `--force` option is specified.


## Usage

```
docs-builder [command] [options...] [-h|--help] [--version]
```


## Global Options

- `--log-level` `level`


## Options

<definitions>
  <definition term="-p|--path <string>">
    Defaults to the`{pwd}/docs` folder (optional)
  </definition>
  <definition term="-o|--output <string>">
    Defaults to `.artifacts/html` (optional)
  </definition>
  <definition term="--path-prefix <string>">
    Specifies the path prefix for urls (optional)
  </definition>
  <definition term="--force <bool?>">
    Force a full rebuild of the destination folder (optional)
  </definition>
  <definition term="--strict <bool?>">
    Treat warnings as errors and fail the build on warnings (optional)
  </definition>
  <definition term="--allow-indexing <bool?>">
    Allow indexing and following of HTML files (optional)
  </definition>
  <definition term="--metadata-only <bool?>">
    Only emit documentation metadata to output, ignored if 'exporters' is also set (optional)
  </definition>
  <definition term="--exporters <exporters>">
    Set available exporters:
    - html
    - es,
    - config,
    - links,
    - state,
    - llm,
    - redirect,
    - metadata,
    - default
    - none.
    Defaults to (html, llm, config, links, state, redirect) or 'default'. (optional)
  </definition>
  <definition term="--canonical-base-url <string>">
    The base URL for the canonical url tag (optional)
  </definition>
</definitions>