Command Line
Syntax

Using Project.txt as the primary configuration source:

NaturalDocs [project configuration folder] [additional options]

Using the command line as the primary configuration source:

NaturalDocs -i [input (source) folder]
-p [project configuration folder]
-o [output format] [output (documentation) folder]
[additional options]

Linux and macOS users should substitute "mono NaturalDocs.exe" for "NaturalDocs".

Examples
NaturalDocs C:\My Project\Natural Docs Config

mono NaturalDocs.exe -i /project/src
-p /project/ndconfig
-o html /project/doc
Folder Parameters
 -p [folder]
--project-config [folder]

Specifies the folder that stores the configuration files Natural Docs will use for this project.  Required.  If the folder is empty Natural Docs will generate the configuration files for you.

 -i [folder]
--input [folder]
--source [folder]

Specifies an input folder, which is where your source code is.  Required either on the command line or in Project.txt.  Can be specified multiple times.

 -o [format] [folder]
--output [format] [folder]

Specifies an output format and folder, which is where your generated documentation will go.  Currently the only supported format is HTML.  Required either on the command line or in Project.txt.  Can be specified multiple times.

 -xi [folder]
--exclude-input [folder]
--exclude-source [folder]

Excludes an input folder.  Natural Docs will not search it or its subfolders for code.  Can be specified multiple times.

 -xip [pattern]
--exclude-input-pattern [pattern]
--exclude-source-pattern [pattern]

Excludes input folders by a pattern, which can include * and ? wildcards.  Can be specified multiple times.

The pattern must match an entire folder name, so "cli" will not match "client", but "cli*" would.

 -img [folder]
--images [folder]

Specifies an images folder.  Files inside it can be referenced in comments with (see filename.jpg).  Can be specified multiple times.

 -w [folder]
--working-data [folder]

Specifies a folder to store temporary data.  If this isn't specified it will be a subfolder of the project configuration folder.

Configuration Parameters
 -s [name]
--style [name]

Specifies the output style to use.  Can be the name of a CSS file in the project configuration folder or a subfolder that contains Style.txt.  Do not include ".css" if using a CSS file.

 -e [name or code page number]
--encoding [name or code page number]

Sets the default character encoding for all input files.  Will be Unicode if not set.  Run Natural Docs with --list-encodings to see all the character encodings installed on your system.

You can use Project.txt to configure encodings per folder or per file extension.

 -t [width]
--tab-width [width]

Specifies how many spaces a tab should be expanded to.

 -do
--documented-only

Only include documented code elements in the output.

 -nag
--no-auto-group

Turns off automatic grouping.  Comments will only be grouped in the output when you manually add Group comments.

--dont-shrink-files

Leave whitespace and comments in CSS and JavaScript output files.  Makes it easier to debug JavaScript in the browser.

Execution Parameters
 -r
--rebuild

Rescans every source file and rebuilds all the output.

 -ro
--rebuild-output

Rebuilds all the output without rescanning the source.

 -q
--quiet

Suppresses all non-error output.

--pause
--pause-before-exit

Require keyboard input before exiting the program.  Only use this if you are running Natural Docs in a pop-up console window that closes automatically and you would like to see the output before that happens.

--pause-on-error

Require keyboard input before exiting the program if there is an error.  Only use this if you are running Natural Docs in a pop-up console window that closes automatically and you would like it to stay open if there are error messages.

--worker-threads [count]

Sets the number of worker threads Natural Docs should use for processing.  By default it is calculated based on the number of cores present.

Information Parameters
 -v
--version

Displays the current version of Natural Docs.

 -vs
--versions
--all-versions

Displays the current version of Natural Docs and all supporting systems like .NET or Mono.

 -?
 -h
--help

Displays this command line reference.

--encodings
--list-encodings

Displays all the character encodings that are available on the current system.

--benchmark

Collects and displays statistics on how long it takes Natural Docs to execute.