Quick Start
This guide walks you through creating your first documentation site with Great Docs in just a few minutes.
Initialize Your Documentation (One-Time)
Navigate to your Python projectβs root directory and run:
Terminal
great-docs initYou only need to run this once. It creates great-docs.yml with sensible defaults. After that, great-docs build is the only command you need.
Great Docs will automatically:
- Find your package β Auto-detects your package name from
pyproject.toml,setup.cfg,setup.py, or directory structure - Discover your API β Finds all public classes, functions, and methods
- Create configuration β Generates
great-docs.ymlwith your API structure - Update .gitignore β Optionally adds
great-docs/to exclude build artifacts
Youβll see output like this:
Terminal output
Initializing great-docs...
Detecting docstring style...
Detected numpy docstring style
Found package __init__.py at: my_package/__init__.py
Discovered 15 public names
Auto-excluding 3 item(s): cli, main, version
MyClass: class with 8 public methods
helper_function: function
...
Generated 2 section(s) from reference config
Created /path/to/project/great-docs.yml
The great-docs/ directory is ephemeral and should not be committed to git.
Add 'great-docs/' to .gitignore? [Y/n]:
β
Updated .gitignore to exclude great-docs/ directory
β
Great Docs initialization complete!The great-docs.yml file contains your API structure and is committed to git. The great-docs/ build directory is ephemeral and should be gitignored.
Customize Your Configuration
Open great-docs.yml and tailor it to your project. Organize API sections, add authors or funding info, set a display_name, add a user_guide directory, etc. See Configuration for all available options.
Build Your Documentation
Build (and rebuild) your docs with:
Terminal
great-docs buildThis is the only command you need day-to-day and in CI. It:
- Creates the
great-docs/directory with all assets (CSS, JS, etc.) - Copies your configuration from
great-docs.yml - Creates landing page from your
README.md - Discovers and processes CLI documentation (if present)
- Copies user guide files from
user_guide/directory (if present) - Generates
llms.txtandllms-full.txtfor AI documentation indexing - Creates source links JSON for GitHub integration
- Generates API reference pages
- Runs
quarto renderto build the HTML site
The built site is in great-docs/_site/.
If your README contains images with relative paths (like ), they will be copied to the build directory automatically. For the most portable setup (working in both GitHub and your docs site) place images in the assets/ directory at your project root.
The great-docs/ directory is created fresh on each build. You can safely delete it between builds (it will be recreated from great-docs.yml and your source files).
Preview Locally
To preview your documentation with live reload:
Terminal
great-docs previewThis starts a local server and opens your browser. Changes to your documentation files trigger automatic rebuilds.
Project Structure
After initialization and your first build, your project will have:
Project structure
your-project/
βββ great-docs.yml # Configuration (committed to git)
βββ great-docs/ # Build directory (gitignored, ephemeral)
β βββ _quarto.yml # Generated Quarto config
β βββ index.qmd # Landing page (from README.md)
β βββ great-docs.scss # Styling
β βββ github-widget.js # GitHub stars widget
β βββ sidebar-filter.js # API search filter
β βββ llms.txt # LLM-friendly docs index
β βββ llms-full.txt # Full API docs for LLMs
β βββ _source_links.json # Source code links
β βββ reference/ # API reference pages (generated)
β β βββ index.qmd
β β βββ MyClass.qmd
β β βββ ...
β βββ user-guide/ # Copied from user_guide/
β βββ scripts/
β β βββ post-render.py # HTML post-processing
β βββ _site/ # Built HTML site
β βββ index.html
β βββ ...
βββ user_guide/ # Your narrative docs (optional)
β βββ 01-installation.qmd
β βββ ...
βββ pyproject.toml
βββ README.md
βββ your_package/
βββ ...- β
great-docs.ymlβ Your configuration - β
user_guide/β Your narrative documentation - β
README.mdβ Your project readme - β
great-docs/β Ephemeral build directory (gitignored)
Command Options
Initialize Options
Terminal
# Initialize a different project
great-docs init --project-path /path/to/project
# Reset config to fresh defaults (deletes existing great-docs.yml)
great-docs init --forcegreat-docs init --force deletes your existing great-docs.yml and generates a brand-new default config. Any customizations you made (authors, sections, display_name, etc.) will be lost. Only use this if you genuinely want to reset.
Build Options
Terminal
# Build with file watching (auto-rebuild on changes)
great-docs build --watchUsing the Python API
You can also use Great Docs programmatically:
Python
from great_docs import GreatDocs
# Initialize for current directory
docs = GreatDocs()
docs.install()
# Build documentation
docs.build()
# Preview documentation
docs.preview()
# Or initialize for a specific project
docs = GreatDocs(project_path="/path/to/project")
docs.install()
docs.build()Whatβs Next?
Your documentation site is ready! Hereβs what to explore next:
- Configuration covers customizing Great Docs behavior
- API Documentation explains how API discovery works
- CLI Documentation covers Click CLI documentation
- User Guides explains how to add narrative documentation
- Deployment covers publishing to GitHub Pages