CLI Reference
Ptero provides a CLI for installing and managing your documentation site.
ptero add [components...]
Add prebuilt UI components to your project (shadcn-style).
pnpm ptero add avatar- Copies component files into your project (default:
src/lib/components/ptero) - Idempotent: skips files that already exist
- Use
--dry-runto preview changes
ptero init
Installs Ptero into an existing SvelteKit project and scaffolds the docs structure.
pnpm ptero init- Adds required dependencies and config
- Creates initial docs/content folders
- Idempotent: safe to re-run
ptero version create <version>
Creates a new documentation version.
pnpm ptero version create v1.0- Copies current docs to
src/content/versioned_docs/<version> - Updates
ptero.config.tswith the new version
ptero search build
Builds the search index.
pnpm ptero search build