CLI Commands
The SuperDocs CLI provides powerful commands to develop, build, and manage your documentation site. All commands support detailed options for customization.
build
Builds your documentation site for production deployment.
superdocs build --input ./my-docs --output ./dist [options]Options
| Option | Alias | Type | Description | Default |
|---|---|---|---|---|
--input | -i | <path> | Required. Path to your docs folder | — |
--output | -o | <path> | Output directory for the built site | ./dist |
--template | -t | <name> | Template to use: default, github:owner/repo, or local path | default |
--base-url | -b | <url> | Base URL for the site (useful for subpath deployments) | / |
--name | — | <name> | Set project name | — |
--description | — | <text> | Set project description | — |
--primary-color | — | <hex> | Set primary theme color (hex format) | — |
--accent-color | — | <hex> | Set accent theme color (hex format) | — |
--favicon | — | <path> | Set favicon path | — |
--logo | — | <path> | Set logo path | — |
--search | — | flag | Enable search functionality | false |
--refresh | — | flag | Force re-download template from GitHub, bypassing cache | false |
Example
superdocs build -i ./docs -o ./build \ --name "My Documentation" \ --description "Complete reference" \ --primary-color "#0066CC" \ --accent-color "#00CC66" \ --searchdev
Starts a local development server with hot module reloading. Perfect for editing and previewing changes in real-time.
superdocs dev --input ./my-docs [options]Options
| Option | Alias | Type | Description | Default |
|---|---|---|---|---|
--input | -i | <path> | Required. Path to your docs folder | — |
--template | -t | <name> | Template to use: default, github:owner/repo, or local path | default |
--base-url | -b | <url> | Base URL for the site | / |
--port | -p | <number> | Port for the development server | 4321 |
--name | — | <name> | Set project name | — |
--description | — | <text> | Set project description | — |
--primary-color | — | <hex> | Set primary theme color (hex format) | — |
--accent-color | — | <hex> | Set accent theme color (hex format) | — |
--favicon | — | <path> | Set favicon path | — |
--logo | — | <path> | Set logo path | — |
--search | — | flag | Enable search functionality | false |
--refresh | — | flag | Force re-download template from GitHub, bypassing cache | false |
Example
superdocs dev -i ./docs -p 5000 \ --name "Development Docs" \ --primary-color "#3B82F6"eject
Exports the complete Astro project source code. Use this when you need full control over the project and want to customize beyond what SuperDocs configuration allows.
superdocs eject --input ./my-docs --output ./astro-docs-project [options]Options
| Option | Alias | Type | Description | Default |
|---|---|---|---|---|
--input | -i | <path> | Required. Path to your docs folder | — |
--output | -o | <path> | Output directory for the Astro project | ./astro-docs-project |
--template | -t | <name> | Template to use: default, github:owner/repo, or local path | default |
--base-url | -b | <url> | Base URL for the site | / |
--name | — | <name> | Set project name | — |
--description | — | <text> | Set project description | — |
--primary-color | — | <hex> | Set primary theme color (hex format) | — |
--accent-color | — | <hex> | Set accent theme color (hex format) | — |
--favicon | — | <path> | Set favicon path | — |
--logo | — | <path> | Set logo path | — |
--search | — | flag | Enable search functionality | false |
--refresh | — | flag | Force re-download template from GitHub, bypassing cache | false |
Example
superdocs eject -i ./docs -o ./my-astro-project \ --name "Customizable Docs" \ --primary-color "#10B981" \ --refreshOnce ejected, you have a full Astro project and can use all standard Astro commands:
cd my-astro-projectnpm installnpm run devnpm run buildtemplate list
Lists all available SuperDocs templates.
superdocs template listtemplate cache
Manages the template cache.
superdocs template cache [options]Options
| Option | Description |
|---|---|
--clear | Clear all cached templates to free up disk space |
Example
superdocs template cache --clear