# Automate CLI workflows

Use the same DocInsight commands in local scripts and continuous integration jobs. Make the project context explicit and disable interactive behavior so that a job does not depend on its working directory or wait for user input.

## Run commands non-interactively

Pass `--no-input` when a command must never prompt. Disable terminal features when the CI log consumer does not process ANSI colors, progress indicators, or hyperlinks:

shell

    docinsight check --manifest docinsight.json --no-input --no-color --no-progress --no-hyperlinks

Activate DocInsight in the automation environment before running commands that require a license. See Activate DocInsight.

## Check documentation changes

Run `check` as the default validation step for documentation changes:

shell

    docinsight check --manifest docinsight.json --all-targets --no-input --no-color

A failed check returns a nonzero exit status, allowing the job to fail without parsing human-readable output.

## Build documentation output

Use `build` when the job should produce generated documentation. Select a named target when the manifest defines more than one output:

shell

    docinsight build --manifest docinsight.json --target site --no-input --no-color

Keep each manifest target path local and excluded from version control. If a publishing job intentionally writes directly to a shared or deployment location, override the path for that invocation:

shell

    docinsight build --manifest docinsight.json --target site=Z:/docs/mylibrary --no-input --no-color

For override path resolution and the corresponding `open` and `clean` commands, see Override target output paths.

DocInsight does not provide a separate publish command. Build directly to a controlled deployment location with an override, or use your deployment or packaging tool to publish the generated directory or file after a successful build.

Use `--dry-run` to verify target selection and the build plan without writing generated output:

shell

    docinsight build --manifest docinsight.json --target site --dry-run --no-input --no-color

## Clean output safely

Review a clean operation before allowing automation to delete generated files:

shell

    docinsight clean --manifest docinsight.json --all-targets --dry-run --no-input --no-color

Remove `--dry-run` only when the selected manifest and targets are correct.

## Accept the trial license agreement

Non-interactive builds that use a trial license require explicit acceptance:

shell

    docinsight build --accept-license --no-input

Use `--accept-license` only when the automation environment is allowed to accept the trial license agreement.

## Preserve diagnostic logs

Use `--log-file` to retain detailed diagnostics as a job artifact. Set `--log-level` when the default file log level does not contain enough detail:

shell

    docinsight build --manifest docinsight.json --target site --no-input --no-color --log-file artifacts/docinsight.log --log-level debug

Use `--quiet` only when the job needs to suppress normal progress and summaries. Warnings and errors remain visible.

For exact command and option syntax, see the generated CLI command reference.