CLI Commands
Command-line interface reference
Last updated: March 15, 2026
CLI Commands
MinimalDoc command-line interface reference.
Commands
| Command | Description |
|---|---|
build |
Build documentation site |
init |
Initialize new documentation |
version |
Show version |
help |
Show help |
build
Generate static HTML from Markdown files.
minimaldoc build [docs-directory] [flags]
Arguments
| Argument | Default | Description |
|---|---|---|
docs-directory |
. |
Path to documentation source or a single .md file |
Single File Mode
Build a single markdown file as a standalone page:
minimaldoc build README.md
When a .md file is passed instead of a directory, MinimalDoc generates only that file as index.html.
Flags
| Flag | Short | Type | Default | Description |
|---|---|---|---|---|
--output |
-o |
string | public |
Output directory |
--theme |
-t |
string | default |
Theme name |
--title |
string | Documentation |
Site title | |
--description |
string | Site description | ||
--base-url |
string | Base URL for absolute links | ||
--llms |
-l |
bool | true |
Generate llms.txt |
--clean-urls |
bool | false |
Use clean URLs | |
--openapi |
bool | false |
Enable OpenAPI docs | |
--openapi-dir |
string | api |
OpenAPI specs directory | |
--status |
bool | false |
Enable status page | |
--status-title |
string | Service Status |
Status page title | |
--status-path |
string | status |
Status page output path | |
--changelog |
bool | false |
Enable changelog | |
--changelog-title |
string | Changelog |
Changelog page title | |
--changelog-path |
string | changelog |
Changelog output path | |
--stale-warning |
bool | false |
Enable stale warnings | |
--stale-threshold |
int | 365 |
Days before stale | |
--link-check |
string | warn |
Link check mode: error, warn, ignore | |
--check-external |
bool | false |
Validate external URLs | |
--mcp |
bool | false |
Enable MCP server documentation | |
--mcp-dir |
string | mcp |
MCP manifests directory |
Examples
Basic build:
minimaldoc build
Specify source directory:
minimaldoc build ./docs
Custom output:
minimaldoc build ./docs --output dist
Production build:
minimaldoc build ./docs \
--base-url "https://docs.example.com" \
--output dist
Full featured:
minimaldoc build ./docs \
--title "My Project" \
--description "Project documentation" \
--base-url "https://docs.example.com" \
--output dist \
--theme default \
--openapi \
--status \
--changelog \
--clean-urls
Disable features:
minimaldoc build ./docs \
--llms=false \
--stale-warning=false
Strict link checking (CI/CD):
minimaldoc build ./docs --link-check=error
Skip link checking:
minimaldoc build ./docs --link-check=ignore
Check external URLs:
minimaldoc build ./docs --check-external
init
Initialize a new documentation site with example files and optional features.
minimaldoc init [directory] [flags]
Arguments
| Argument | Default | Description |
|---|---|---|
directory |
docs |
Target directory |
Flags
| Flag | Description |
|---|---|
--with-toc |
Create TOC.md for custom navigation |
--with-status |
Create status page structure |
--with-changelog |
Create changelog structure |
--with-openapi |
Create OpenAPI specification example |
--full |
Include all optional features |
Generated Structure
Basic (default):
docs/
├── config.yaml
├── index.md
├── getting-started/
│ ├── installation.md
│ └── quick-start.md
└── guides/
└── deployment.md
Full (--full flag):
docs/
├── config.yaml
├── TOC.md
├── index.md
├── getting-started/
│ ├── installation.md
│ └── quick-start.md
├── guides/
│ └── deployment.md
├── api/
│ └── openapi.yaml
├── __status__/
│ ├── components.yaml
│ ├── incidents/
│ │ └── YYYY-MM-DD-example-incident.md
│ └── maintenance/
└── __changelog__/
└── releases/
└── 0.1.0.md
Examples
Basic site:
minimaldoc init
Custom directory:
minimaldoc init my-docs
With all features:
minimaldoc init my-docs --full
With specific features:
minimaldoc init my-docs --with-status --with-openapi
API documentation project:
minimaldoc init api-docs --with-openapi --with-changelog
version
Show MinimalDoc version and check for updates.
minimaldoc version [flags]
Output:
minimaldoc version 1.0.0
Flags
| Flag | Description |
|---|---|
--check |
Check GitHub for newer releases |
Examples
Show version:
minimaldoc version
Check for updates:
minimaldoc version --check
When an update is available:
minimaldoc version 1.0.0
Checking for updates...
Update available: 1.0.0 -> 1.1.0
Release URL: https://github.com/studiowebux/minimaldoc/releases/tag/v1.1.0
To update:
go install github.com/studiowebux/minimaldoc/cmd/minimaldoc@latest
Or download from GitHub releases.
help
Show help for any command.
minimaldoc help [command]
Examples
minimaldoc help
minimaldoc help build
minimaldoc build --help
Global Flags
Available for all commands:
| Flag | Description |
|---|---|
--help |
Show help |
--version |
Show version |
Exit Codes
| Code | Description |
|---|---|
| 0 | Success |
| 1 | General error |
| 2 | Invalid arguments |
| 3 | File not found |
| 4 | Build error |
Environment Variables
| Variable | Description |
|---|---|
MINIMALDOC_CONFIG |
Path to config file |
MINIMALDOC_THEME |
Theme name |
NO_COLOR |
Disable colored output |
Configuration Precedence
- CLI flags (highest priority)
- Environment variables
- config.yaml
- Defaults (lowest priority)
Shell Completion
Generate completion scripts:
# Bash
minimaldoc completion bash > /etc/bash_completion.d/minimaldoc
# Zsh
minimaldoc completion zsh > "${fpath[1]}/_minimaldoc"
# Fish
minimaldoc completion fish > ~/.config/fish/completions/minimaldoc.fish
# PowerShell
minimaldoc completion powershell > minimaldoc.ps1
Common Patterns
Development
# Quick build for local preview
minimaldoc build ./docs
# Serve locally
python -m http.server -d public 8080
CI/CD
# Production build with all features
minimaldoc build ./docs \
--base-url "$DOCS_URL" \
--output dist \
--openapi \
--status \
--changelog
Docker
# Build in container
docker run -v $(pwd):/app -w /app golang:1.24-alpine sh -c \
"go install github.com/studiowebux/minimaldoc/cmd/minimaldoc@latest && \
minimaldoc build ./docs --output dist"