Access embedded documentation offline in the terminal.
gpc docs <subcommand> [options]Overview
GPC embeds all documentation from the VitePress site into the CLI binary. Every guide, command reference, and tutorial is available offline via gpc docs. No network, no browser, no API keys.
Five subcommands:
| Command | Description |
|---|---|
docs list | List all available documentation topics |
docs show | Show a documentation page in the terminal |
docs search | Full-text search across all documentation |
docs init | Create GPC.md quick-reference for AI agents |
docs web | Open documentation in your browser |
docs list
List all embedded documentation topics, grouped by section.
Synopsis
gpc docs listExamples
# List all topics
gpc docs list
# JSON output for tooling
gpc docs list --output json2
3
4
5
Output:
COMMANDS
commands/releases Releases
commands/publish Publish
commands/changelog Changelog
...
GUIDE
guide/authentication Authentication
guide/configuration Configuration
...
99 topics. Use: gpc docs show <topic>2
3
4
5
6
7
8
9
10
11
12
JSON output returns an array of { slug, section, title, description } objects.
docs show
Render a documentation page in the terminal with ANSI formatting. Headers, code blocks, tables, and inline formatting are all rendered.
Synopsis
gpc docs show <topic>Fuzzy matching
You don't need to type the full slug. GPC resolves your input in order:
- Exact slug match (
guide/authentication) - Filename match (
authenticationfindsguide/authentication) - Prefix match (
authfindsguide/authentication) - Contains match anywhere in slug
- Title match
Examples
# Full slug
gpc docs show guide/authentication
# Short name (fuzzy match)
gpc docs show auth
# JSON output
gpc docs show releases --output json2
3
4
5
6
7
8
If the topic isn't found, GPC suggests similar topics.
docs search
Full-text search across all embedded documentation. Results are ranked by relevance using a build-time inverted index.
Synopsis
gpc docs search <query>Examples
# Search for rollout-related docs
gpc docs search "staged rollout"
# JSON output
gpc docs search authentication --output json2
3
4
5
Output shows matching pages with a relevance score and a context snippet:
Search results for "staged rollout"
commands/releases (score: 15)
Releases
...increase the rollout percentage with --fraction...
guide/ci-cd (score: 8)
CI/CD Integration
...staged rollout gate checks vitals before promoting...
2 results. Use: gpc docs show <topic>2
3
4
5
6
7
8
9
10
11
JSON output returns an array of { slug, section, title, score } objects.
docs init
Generate a GPC.md quick-reference file in the current directory. This file gives AI coding agents (Claude Code, Codex, Cursor) a compact summary of GPC commands and workflows without requiring network access or reading the full docs.
Synopsis
gpc docs init [options]Options
| Option | Description | Default |
|---|---|---|
--force | Overwrite existing GPC.md | — |
--path <dir> | Output directory | . |
Examples
# Create GPC.md in the current directory
gpc docs init
# Overwrite an existing GPC.md
gpc docs init --force
# Write to a specific directory
gpc docs init --path ./my-project2
3
4
5
6
7
8
If CLAUDE.md or AGENTS.md exists in the target directory, GPC appends a See also: @GPC.md reference to them automatically.
docs web
Open the documentation website in your default browser. Preserves the original gpc docs behavior from before v0.9.64.
Synopsis
gpc docs web [topic]Examples
# Open the docs home page
gpc docs web
# Open a specific topic
gpc docs web releases2
3
4
5
If the topic isn't found, the home page opens with a message.
How it works
At build time, GPC reads all markdown files from apps/docs/, strips VitePress frontmatter and Vue components, builds an inverted search index, and emits a single docs-bundle.json embedded in the CLI binary. No runtime file reads, no network calls.
The terminal renderer uses GPC's built-in ANSI color utilities (no external dependencies) to format headers, code blocks, tables, blockquotes, bold text, inline code, and links.
Related
- GPC Documentation Site -- the full browsable docs
gpc help-- inline help for any command
