Web CLI Reference
Configure web service settings including content types, templates, assets, and sitemaps with the web CLI domain.
On this page
The web domain configures the web service layer. It manages content types, templates, static assets, and sitemaps.
Why Web Exists
The web layer needs configuration for:
- Content Types - What kinds of content can be created
- Templates - How content is rendered
- Assets - CSS, JavaScript, images
- Sitemap - SEO and crawling configuration
The web domain provides tools to inspect and validate these configurations.
Quick Reference
| Subcommand | Description |
|---|---|
web content-types |
Manage content type definitions |
web templates |
Inspect template configuration |
web assets |
View and validate static assets |
web sitemap |
Sitemap operations |
web validate |
Validate web configuration |
Content Types
Content types define what kinds of content your system supports (blog posts, documentation, pages, etc.).
List Content Types
# List all content types
systemprompt web content-types list
# JSON output
systemprompt --json web content-types list
Output:
┌──────────────────┬─────────────────────────────────┬──────────┐
│ Kind │ Template │ Public │
├──────────────────┼─────────────────────────────────┼──────────┤
│ blog │ blog-post.html │ true │
│ docs │ docs-page.html │ true │
│ guide │ docs-page.html │ true │
│ reference │ docs-page.html │ true │
│ playbook │ playbook-post.html │ true │
│ feature │ feature.html │ true │
│ legal │ legal-post.html │ true │
└──────────────────┴─────────────────────────────────┴──────────┘
Show Content Type
# Show content type details
systemprompt web content-types show blog
# JSON output
systemprompt --json web content-types show blog
Output:
{
"kind": "blog",
"template": "blog-post.html",
"public": true,
"allowed_sources": ["blog"],
"frontmatter": {
"required": ["title", "description", "slug"],
"optional": ["author", "image", "tags", "published_at"]
}
}
Content Type Configuration
Content types are configured in services/web/templates/templates.yaml:
templates:
- kind: blog
template: blog-post.html
public: true
- kind: docs
template: docs-page.html
public: true
Templates
Templates control how content is rendered.
List Templates
# List all templates
systemprompt web templates list
# JSON output
systemprompt --json web templates list
Output:
┌──────────────────────┬────────────────────┬──────────┐
│ Template │ Location │ Valid │
├──────────────────────┼────────────────────┼──────────┤
│ blog-post.html │ templates/ │ true │
│ blog-list.html │ templates/ │ true │
│ docs-page.html │ templates/ │ true │
│ docs-list.html │ templates/ │ true │
│ playbook-post.html │ templates/ │ true │
│ homepage.html │ templates/ │ true │
│ feature.html │ templates/ │ true │
└──────────────────────┴────────────────────┴──────────┘
Show Template
# Show template details
systemprompt web templates show blog-post
# Show template with variables
systemprompt web templates show blog-post --variables
Output:
{
"name": "blog-post.html",
"path": "services/web/templates/blog-post.html",
"partials_used": ["header", "footer", "head-assets", "scripts"],
"variables": {
"required": ["title", "content", "slug"],
"optional": ["author", "published_at", "image", "tags"]
}
}
Template Structure
Templates are located in services/web/templates/:
services/web/templates/
├── blog-post.html
├── blog-list.html
├── docs-page.html
├── docs-list.html
├── playbook-post.html
├── homepage.html
├── feature.html
├── partials/
│ ├── header.html
│ ├── footer.html
│ ├── head-assets.html
│ └── scripts.html
└── templates.yaml
Assets
Manage static assets (CSS, JavaScript, images, fonts).
List Assets
# List all assets
systemprompt web assets list
# Filter by type
systemprompt web assets list --type css
systemprompt web assets list --type js
systemprompt web assets list --type images
Output:
┌─────────────────────────────┬────────┬──────────────┐
│ Asset │ Type │ Size │
├─────────────────────────────┼────────┼──────────────┤
│ css/core/variables.css │ css │ 2.4 KB │
│ css/components/header.css │ css │ 4.1 KB │
│ css/feature-base.css │ css │ 8.7 KB │
│ js/main.js │ js │ 12.3 KB │
│ fonts/inter-var.woff2 │ font │ 98.4 KB │
└─────────────────────────────┴────────┴──────────────┘
Show Asset
# Show asset details
systemprompt web assets show css/core/variables.css
Validate Assets
# Validate all assets
systemprompt web assets validate
# Check for missing assets
systemprompt web assets validate --check-references
Asset Locations
Assets are stored in:
- CSS:
storage/files/css/ - Images:
storage/files/images/ - Fonts:
storage/files/fonts/
Built output goes to web/dist/.
Sitemap
Manage sitemap generation for SEO.
Generate Sitemap
# Generate sitemap
systemprompt web sitemap generate
# Generate and save to file
systemprompt web sitemap generate --output sitemap.xml
View Sitemap
# Show sitemap entries
systemprompt web sitemap list
# Filter by content type
systemprompt web sitemap list --kind blog
Output:
┌────────────────────────────────────┬────────────┬───────────┐
│ URL │ Priority │ Changefreq│
├────────────────────────────────────┼────────────┼───────────┤
│ / │ 1.0 │ daily │
│ /documentation │ 0.9 │ weekly │
│ /blog │ 0.8 │ daily │
│ /blog/welcome │ 0.7 │ monthly │
│ /documentation/getting-started │ 0.8 │ weekly │
└────────────────────────────────────┴────────────┴───────────┘
Sitemap Configuration
Configure sitemap in services/web/config/config.yaml:
sitemap:
base_url: "https://systemprompt.io"
default_changefreq: "weekly"
default_priority: 0.5
sources:
- source: blog
changefreq: daily
priority: 0.7
- source: documentation
changefreq: weekly
priority: 0.8
Validation
Validate web configuration.
Full Validation
# Validate entire web configuration
systemprompt web validate
# JSON output
systemprompt --json web validate
Output:
Web Configuration Validation
============================
✓ Templates: 12 valid, 0 invalid
✓ Content Types: 8 valid, 0 invalid
✓ Assets: 45 found, 0 missing
✓ Partials: 6 valid, 0 invalid
✓ Navigation: valid
Result: PASSED
Validate Specific Components
# Validate templates only
systemprompt web validate --templates
# Validate assets only
systemprompt web validate --assets
# Validate content types
systemprompt web validate --content-types
Check for Issues
# Check for common issues
systemprompt web validate --strict
# Show warnings
systemprompt web validate --show-warnings
Configuration Files
templates.yaml
Defines content type to template mappings:
# services/web/templates/templates.yaml
templates:
- kind: blog
template: blog-post.html
- kind: docs
template: docs-page.html
- kind: docs-index
template: docs-list.html
navigation.yaml
Defines navigation structure:
# services/web/config/navigation.yaml
header:
items:
- label: "Documentation"
href: "/documentation"
dropdown: true
sections:
- title: "Getting Started"
links:
- label: "Installation"
href: "/documentation/getting-started/installation"
config.yaml
Main web service configuration:
# services/web/config/config.yaml
server:
host: "0.0.0.0"
port: 3000
sources:
- source_id: blog
path: content/blog
category_id: blog
- source_id: documentation
path: content/documentation
category_id: documentation
Common Workflows
Adding New Content Type
- Add to
templates.yaml:
- kind: tutorial
template: docs-page.html
- Validate:
systemprompt web validate --content-types
Checking Template Issues
# Validate templates
systemprompt web validate --templates
# Show template variables
systemprompt web templates show blog-post --variables
# Check for missing partials
systemprompt web validate --strict
Asset Management
# List all assets
systemprompt web assets list
# Check for missing references
systemprompt web assets validate --check-references
# Build assets
just build
Related Resources
Playbooks:
systemprompt core playbooks show build_web-content- Content authoringsystemprompt core playbooks show build_web-templates- Template developmentsystemprompt core playbooks show build_web-assets- Asset management
Guides:
- Building Extensions - Custom web components
| Previous | Next |
|---|---|
| Analytics CLI | Plugins CLI |