Features
Live Reload
Stigmergic uses Server-Sent Events to push file changes to your browser. When you save a file, the rendered view updates immediately — no manual refresh, no polling.
The watcher uses fsnotify with event debouncing to avoid redundant updates. It respects .gitignore patterns by default, so build artifacts and node_modules won't trigger reloads.
Command Palette
Press Ctrl+K (or ⌘+K on Mac) to open the command palette. It searches across all markdown files in your directory by filename. Results update as you type with fuzzy matching.
This is the fastest way to navigate large documentation sets. No need to browse the file tree — just type a few characters and jump directly to the file you need.
Markdown Rendering
Full CommonMark compliance plus GitHub Flavored Markdown extensions:
- Tables — pipe-delimited tables render as styled HTML
- Task lists —
- [x]and- [ ]render as checkboxes - Strikethrough —
~~deleted text~~renders asdeleted text - Autolinks — URLs automatically become clickable
Syntax Highlighting
Code blocks with language annotations get syntax highlighting via Chroma with the Nord theme:
1def fibonacci(n):
2 if n <= 1:
3 return n
4 return fibonacci(n - 1) + fibonacci(n - 2)
1func main() {
2 http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
3 fmt.Fprintf(w, "Hello, stigmergic!")
4 })
5 log.Fatal(http.ListenAndServe(":8080", nil))
6}
Supports all major languages: Go, Python, JavaScript, TypeScript, Rust, Bash, SQL, YAML, TOML, and many more.
Math Rendering
LaTeX equations rendered client-side with KaTeX.
Block equations with $$:
$$
\nabla \cdot \mathbf{E} = \frac{\rho}{\varepsilon_0}
$$
Inline math with single $: The quadratic formula is $x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}$.
Mermaid Diagrams
Mermaid diagrams render directly from fenced code blocks:
graph LR
A[Markdown Files] --> B[Stigmergic]
B --> C[Beautiful Docs]
B --> D[Live Reload]
B --> E[Search]
Supports flowcharts, sequence diagrams, class diagrams, state diagrams, and more.
Nostr Protocol Links
URLs using the nostr: protocol are automatically parsed and rendered as clickable links. Supports npub, note, nevent, and nprofile identifiers.
Themes
Built-in
- Iceberg Dark (default) — dark background, cool blue-grey tones
- Iceberg Light — light background, same color palette
Custom Themes
Create a TOML file at ~/.config/stigmergic/themes/{name}.toml:
1name = "my-theme"
2
3[colors]
4bg = "#1e1e1e"
5fg = "#d4d4d4"
6alt_bg = "#252526"
7blue = "#61afef"
8purple = "#c678dd"
9
10[ui]
11link = "#61afef"
12link_hover = "#84c5ff"
13code_bg = "#2d2d2d"
14border = "#3e3e3e"
Use with stigmergic serve --theme my-theme ./docs.
Smart Defaults
- Auto port finding — if port 8080 is busy, finds the next available port
- Gitignore support — respects
.gitignorepatterns (toggle with--respect-gitignore=false) - Default file — set
--default-file README.mdto load a specific file on startup - Security headers — X-Content-Type-Options, X-Frame-Options, path traversal protection