a fun language for serious programming


nitdoc - generates HTML pages of API documentation from Nit source files.


nitdoc [options]... FILE...


nitdoc takes one or more modules and generate HTML pages of API documentation for these modules and their imported modules.

The documentation is extracted from the comments found above the definition of modules, classes, and properties.

Internally, nitdoc relies on the presence of the dot command from the graphviz project. If the dot program is not present or not found, no image of hierarchies are generated. See option --no-dot.

The documentation of the Nit standard library is generated with this tool.


The format of the documentation is a dialect of markdown that allows GitHub fences (~~~).

Code blocks are interpreted as snippets of Nit programs and intended to be used as examples of code. When these code snippets are valid, executable and contain at least and assert clause, they could be automatically executed and verified. See nitunit(1) for details.


-d, --dir

Output directory.

Where the HTML files are generated.

By default, the directory is named doc.


Format to link source code.

The format string is used to generated links to some parts of the source-code. Use %f for filename, %l for first line, and %L for last line.

For instance, the standard library use the following value to link to files in GitHub:

Here, the git rev-parse HEAD is used to link to the current snapshot revision of the file.


Ignore the attributes.

Note: In Nit, attributes are private. Therefore, this option is only useful when combined with --private.


Do not generate graphs with graphviz.


Also generate private API.



Directory containing tools assets.

By default $NIT_DIR/share/nitdoc/ is used.


Use shareurl instead of copy shared files.

By default, assets from the sharedir a copied into the output directory and referred with a relative path in the generated files. With this option, the assets are not copied and the given URL of path is used in the generated files to locate assets.


Custom title for homepage.

Custom footer text.


Custom intro text for homepage.


Custom link to external site.



Git branch where edited commits will be pulled into (ex: user:repo:branch).


Git sha1 of base commit used to create pull request.


Git working directory used to resolve path name (ex: /home/me/myproject/).


Piwik tracker URL (ex: nitlanguage.org/piwik/).


Piwik site ID.



Print test data (metrics and structure).


Do not render HTML files.