Skip to content

CLI Reference

The whiz command-line tool lets you manage your whiz.pub blog from the terminal.

Pages and Tags

Pages and tag management (rename, delete, descriptions) are available through the web dashboard and the REST API. The CLI focuses on post authoring workflows. You can create pages via the API with post_type: "page".

Webhooks

The CLI supports outbound webhook management via whiz webhook subcommands. See the webhook commands below.

Installation

Install script

bash
curl -sL https://whiz.pub/install | sh

Installs to ~/.local/bin. No sudo required.

Commands

auth

Save an API key for subsequent commands.

whiz auth [API_KEY]
FlagDescription
--api-baseAPI server URL (default: https://api.whiz.pub)
bash
whiz auth sk_abc123

signup

Create a new whiz.pub account interactively. A one-time verification code will be sent to your email.

whiz signup
FlagDescription
--api-baseAPI server URL (default: https://api.whiz.pub)
--emailEmail address (skips prompt)
--subdomainSubdomain (skips prompt)
bash
whiz signup
whiz signup --email you@example.com --subdomain yourname

On success, a verification code is sent to your email. Use whiz login to enter the code and receive your API key.


login

Log in to your whiz.pub account. You will be prompted for your email, then a one-time code is sent to your inbox. Enter the code to authenticate.

whiz login
FlagDescription
--api-baseAPI server URL (default: https://api.whiz.pub)
--emailEmail address (skips prompt)
bash
whiz login
whiz login --email you@example.com

On success, prints your API key and saves it locally.


write

Create a new markdown file with frontmatter scaffolding and open it in $EDITOR.

whiz write [FILE]
bash
whiz write hello.md

The generated file includes frontmatter with all available fields:

yaml
---
title: ""
date: 2025-01-15T10:30:00Z
tags: []
status: draft
summary: ""
featured_image: ""
pinned: false
metadata: {}
---

Frontmatter fields

FieldTypeDescription
titlestringPost title (required)
slugstringURL slug (auto-generated from title if empty)
datestringPublication date in RFC3339 format. Controls sorting and display date.
tagslistList of tags
statusstringdraft or published (default: published)
summarystringCustom excerpt for indexes and feeds
featured_imagestringHTTPS image URL for social previews
pinnedbooleanPin post to the top of the blog index
metadataobjectArbitrary JSON/YAML metadata (max 16 KB). Stored with the post and returned via API, MCP, and CLI.

edit

Fetch an existing post by slug and open it in $EDITOR for editing. Saves changes on exit.

whiz edit [SLUG]
bash
whiz edit my-first-post

The reconstructed frontmatter includes date and metadata fields from the existing post.


publish

Upload a markdown file as a post. Creates a new post or updates an existing one (upsert by slug).

whiz publish [FILE]
bash
whiz publish hello.md

All frontmatter fields are sent to the API, including date (for backdating) and metadata (custom JSON).


list

List posts on your blog with optional filtering and pagination.

whiz list [FLAGS]
FlagDescription
--tagFilter by tag
--statusFilter by status (draft, published)
--limitMax results per page (default 20)
--offsetPagination offset
--typePost type (post, page)
bash
whiz list
whiz list --tag golang --status published
whiz list --limit 10 --offset 20

delete

Delete a post by slug.

whiz delete [SLUG]
FlagDescription
-f, --forceSkip confirmation prompt
bash
whiz delete my-first-post
whiz delete my-first-post -f

domain add

Register a custom domain for your blog.

whiz domain add [DOMAIN]
bash
whiz domain add example.com

Prints DNS instructions including the required CNAME record (for subdomains), A record (for apex domains), and TXT verification record values.


domain verify

Verify DNS records for a previously added custom domain.

whiz domain verify [DOMAIN]
bash
whiz domain verify example.com

domain remove

Remove the custom domain from your blog.

whiz domain remove
FlagDescription
-f, --forceSkip confirmation prompt
bash
whiz domain remove
whiz domain remove -f

headless enable

Enable headless (CMS-only) mode. Public blog pages return 404; API, CLI, and MCP continue to work. Your subdomain stays reserved. Cannot be enabled while a custom domain is configured.

whiz headless enable
bash
whiz headless enable

headless disable

Disable headless mode. Public blog pages are served normally again.

whiz headless disable
bash
whiz headless disable

theme get

Show the current theme settings for your blog, including preset, fonts, dark mode preference, and custom CSS size.

whiz theme get
bash
whiz theme get

theme set

Update your blog's theme. All flags are optional; only the provided values are changed.

whiz theme set [FLAGS]
FlagDescription
--presetTheme preset (forest, ocean, mono, sunset, berry, rose, slate, emerald)
--body-fontBody font name or "Custom (Google Fonts)"
--heading-fontHeading font name or "Custom (Google Fonts)"
--body-font-urlGoogle Fonts URL for a custom body font
--heading-font-urlGoogle Fonts URL for a custom heading font
--dark-modeDark mode preference (auto, light, dark)
--custom-cssPath to a CSS file (max 10 KB) or inline CSS string
bash
whiz theme set --preset rose
whiz theme set --body-font "Literata" --heading-font "Playfair Display"
whiz theme set --dark-mode dark
whiz theme set --preset emerald --body-font "Custom (Google Fonts)" \
  --body-font-url "https://fonts.googleapis.com/css2?family=Outfit:wght@400;600;700&display=swap"
whiz theme set --custom-css styles.css

theme save

Save the current live theme as a named saved theme.

bash
whiz theme save --name "My Theme"

theme list-saved

List all saved themes.

bash
whiz theme list-saved

theme delete-saved

Delete a saved theme by name or ID.

bash
whiz theme delete-saved "My Theme"

theme apply-saved

Apply a saved theme to the live blog.

bash
whiz theme apply-saved "My Theme"

settings

Show all blog settings, including display name, description, title pattern, headless mode, domain, and AI access.

whiz settings
bash
whiz settings

cache clear

Clear cached blog pages from the CDN. This forces all pages to be regenerated on the next visit.

whiz cache clear
bash
whiz cache clear

webhook list

List all outbound webhooks configured for your blog.

bash
whiz webhook list

webhook add

Create a new outbound webhook.

whiz webhook add --url URL --events EVENTS [--description DESC]
FlagDescription
--urlWebhook endpoint URL (required)
--eventsComma-separated event list (required)
--descriptionOptional description
bash
whiz webhook add --url https://example.com/hook \
  --events post.created,post.updated,post.deleted

The response includes a signing secret (shown only once).

Supported events: post.created, post.updated, post.deleted, page.created, page.updated, page.deleted


webhook delete

Delete a webhook by ID.

whiz webhook delete [ID]
FlagDescription
-f, --forceSkip confirmation prompt
bash
whiz webhook delete abc-123

webhook deliveries

Show recent delivery attempts for a webhook.

whiz webhook deliveries [ID]
bash
whiz webhook deliveries abc-123

webhook test

Send a test ping event to a webhook.

whiz webhook test [ID]
bash
whiz webhook test abc-123

version

Print the CLI version.

whiz version
bash
whiz version

Instant, agent-first blogging.