Quickstart
Phosphor is a system-wide CLI tool. You install it once, then the phosphor command works from any directory on your machine. Point it at any project, and it scaffolds and builds a complete docs site.
How Phosphor Works
Clone the repo and run install.sh. The phosphor command is now available system-wide — you never need to install it again.
Run phosphor init in any project directory. It creates docs.yaml, pages/, and example content. If you're in a git repo, it auto-detects your project name and GitHub URL.
Edit the generated .md files in pages/. Use standard Markdown plus Phosphor's rich components — callouts, terminal blocks, cards, and more.
phosphor build generates a complete static site in _site/. Copy it to any web server, push to GitHub Pages, or use any static host.
30-Second Start
Open http://localhost:8000 — you'll see a fully-styled documentation site with sidebar navigation, search, and the Terminal Noir theme.
What Just Happened
phosphor initscaffolded a docs project with a config file and example pages inside your project directoryphosphor servebuilt the Markdown into HTML and started a local preview server- The output lives in
_site/— static HTML you can deploy anywhere
phosphor init (scaffold everything) → phosphor build (generate site) → phosphor serve (preview locally). That's the entire workflow.
Installation
Prerequisites
- Python 3.8+ — any modern Python installation
- PyYAML —
pip install pyyaml(the only dependency)
Phosphor is pure Python. No npm, no bundlers, no JavaScript toolchain needed. The theme assets are static files served as-is.
Install Steps
The installer creates a phosphor wrapper script in ~/.local/bin/ (or ~/bin/ if it exists) that points to the phosphor Python module.
Verify Installation
PATH troubleshooting
If you get command not found after installing:
Add that line to your ~/.bashrc or ~/.zshrc to make it permanent:
Linux
Works out of the box. No special requirements beyond Python 3.8+ and pip.
macOS
Works with the system Python 3 or any Python installed via Homebrew. If using zsh (default on modern macOS), add the PATH export to ~/.zshrc instead of ~/.bashrc.
WSL2 (Windows)
Works perfectly under WSL2. For best performance, keep your docs project inside the Linux filesystem (e.g., ~/my-docs/) rather than under /mnt/c/. The /mnt/c/ path crosses a filesystem boundary and will be slower for file operations.
You can skip install.sh and run Phosphor directly with Python:
python3 -m phosphor.cli build .
This works from the phosphor-docs directory, or from anywhere if you set PYTHONPATH to include the phosphor-docs directory.
Your First Docs Site
Let's build documentation for a project called deploy-cli.
Step 1: Initialize
phosphor init creates everything you need. If you're inside a git repo with a remote origin, it auto-populates the title, tagline, logo, and GitHub link from your repository name.
Step 2: Edit
Customize docs.yaml to match your project:
site:
title: "Deploy CLI"
tagline: "~/deploy-cli"
logo_text: "DC"
github: "https://github.com/you/deploy-cli"
nav:
- group: "Getting Started"
items:
- label: "Overview"
icon: "home"
page: "index.md"
anchor: "overview"
- label: "Installation"
icon: "download"
page: "index.md"
anchor: "installation"
- group: "Reference"
items:
- label: "Commands"
icon: "terminal"
page: "commands.md"
anchor: "commands"
pages:
- index.md
- commands.md
Replace the example content in pages/index.md with your actual documentation. Add new .md files for additional pages — just list them in the pages: array.
Step 3: Build & Preview
Step 4: Deploy
The _site/ directory contains pure static HTML. Copy it to any web server, push to GitHub Pages, or use any static hosting service:
Point an AI coding agent (Claude Code, Codex, Gemini CLI) at your project with instructions to create phosphor documentation. The agent can read your codebase, understand the structure, and write all the .md pages and docs.yaml config for you. Then just run phosphor build to generate the site. See the CLAUDE.md (or AGENTS.md / GEMINI.md) in the phosphor-docs repo for the full syntax reference agents need.
The typical workflow is: edit Markdown, run phosphor build, refresh browser. The phosphor serve command also builds before serving, so you can just restart it to see changes.