Templates

Control the structure, tone, and format of generated documentation.

A template is a Markdown document that tells a Pith agent what to produce. It describes what sections to include, what level of detail to aim for, and what tone to use. Agents use your template as a blueprint and fill in content from the codebase diff.

Doc types

TypeDefault outputWhat it covers
READMEREADME.mdProject overview, features, installation, usage, contributing
API Referencedocs/api.mdFunctions, endpoints, parameters, return types, code examples
Architecturedocs/architecture.mdSystem design, module breakdown, data flow, dependencies
ChangelogCHANGELOG.mdVersion history, breaking changes, notable additions

Built-in templates

Pith ships an example template for each doc type. These work out of the box and produce sensible output for most projects. You can clone a built-in template as a starting point for a custom one.

Custom templates

Custom templates are available on Pro and Max plans. Go to Dashboard - Templates - New template, choose a doc type, and write your template in the editor.

Templates are scoped to your organisation and can be assigned to any number of repositories. Each repository can use a different template per doc type.

Deleting a template that is assigned to one or more repositories is blocked. Reassign those repositories first.
CLI users can use custom templates by setting template: .pith/templates/readme.md.hbs (path relative to repo root) in .pith.yml.

Assigning a template to a repo

Open the repository in the dashboard, go to the Config tab, and choose a template from the dropdown for each doc type. Changes take effect on the next run.

Ready to stop writing docs by hand?

Connect your first repository and Pith will handle the rest.