CLI Reference

Complete reference for all page CLI commands, flags, and options.

Overview

page has seven subcommands:

CommandDescription
initCreate a new site
buildBuild the site
serveDevelopment server with live reload
newCreate content files
agentAI assistant with site context
themeManage themes
deployDeploy to hosting platforms

page init

Create a new site directory with scaffolded structure.

page init <name> [options]
FlagDescription
--titleSite title
--descriptionSite description
--deploy-targetgithub-pages, cloudflare, or netlify
--collectionsComma-separated list: posts,docs,pages

If flags are omitted, page init prompts interactively.

# Non-interactive
page init mysite --title "My Blog" --deploy-target github-pages --collections posts,pages

# Interactive
page init mysite

page build

Build the site from page.toml in the current directory.

page build [options]
FlagDescription
--draftsInclude draft content in the build

The build pipeline runs 12 steps: clean output, load templates, process collections, render pages, generate RSS, sitemap, discovery files, markdown output, search index, copy static files, process images, and post-process HTML. Per-step timing is shown in the output.

page serve

Start a development server with live reload.

page serve [options]
FlagDescription
--portStarting port (default: 3000, auto-increments if taken)
--draftsInclude drafts

The server injects a live-reload script that polls for changes. An interactive REPL accepts commands:

  • new <collection> "Title" — create content
  • agent [prompt] — launch AI agent
  • theme apply <name> — apply theme and rebuild
  • build — rebuild the site
  • status — show server info
  • stop — stop the server

page new

Create a new content file with frontmatter.

page new <collection> "Title" [options]
FlagDescription
--tagsComma-separated tags (posts only)
--langLanguage code for translations (e.g., es, fr)
page new post "My Post" --tags rust,web
page new doc "API Guide"
page new page "About"
page new post "Mi Post" --lang es    # Spanish translation

page agent

Launch an AI assistant with full site context.

page agent [prompt]

Two modes:

  • Interactive: page agent — opens a Claude Code session
  • One-shot: page agent "write a blog post about Rust" — runs and exits

The agent receives your site config, content inventory, template list, and available CLI commands. It can read, write, and edit files. Requires Claude Code: npm install -g @anthropic-ai/claude-code.

page theme

Manage site themes.

page theme <subcommand>
SubcommandDescription
listShow available bundled themes
apply <name>Apply a bundled theme
create "<description>"Generate a custom theme with AI
page theme list
page theme apply dark
page theme create "brutalist with neon green accents"

Six bundled themes: default, minimal, dark, docs, brutalist, bento.

page deploy

Deploy the built site.

page deploy [options]
FlagDescription
--targetOverride deploy target (github-pages, cloudflare, netlify)
--dry-runPreview what would be deployed without deploying
--domainSet up a custom domain (prints DNS records, updates config, attaches to platform)
--setupRun guided deploy setup
--skip-checksSkip pre-flight checks
--base-urlOverride base URL for this deploy
page deploy                          # Use target from page.toml
page deploy --dry-run                # Preview changes
page deploy --target netlify         # Override target
page deploy --target cloudflare --dry-run
page deploy --domain example.com     # Set up custom domain
page deploy --setup                  # Guided setup wizard