CLI Reference

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

Installation

Install script

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

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

From source

cd whiz
make build
make install

Override the install location: INSTALL_DIR=/usr/local/bin make install.

Commands

auth

Save an API key for subsequent commands.

whiz auth [API_KEY]
Flag Description
--api-base API server URL (default: https://whiz.pub)
whiz auth sk_abc123
whiz auth sk_abc123 --api-base https://your-server.com

signup

Create a new whiz.pub account interactively.

whiz signup
Flag Description
--api-base API server URL (default: https://whiz.pub)
--email Email address (skips prompt)
--password Password (skips prompt)
--subdomain Subdomain (skips prompt)
whiz signup
whiz signup --email [email protected] --password secret --subdomain yourname

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


verify

Verify your email address with a 6-digit code.

whiz verify [CODE]
whiz verify 123456

resend-verification

Request a new verification code.

whiz resend-verification
whiz resend-verification

write

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

whiz write [FILE]
whiz write hello.md

edit

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

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

publish

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

whiz publish [FILE]
whiz publish hello.md

list

List all posts on your blog.

whiz list
whiz list

delete

Delete a post by slug.

whiz delete [SLUG]
Flag Description
-f, --force Skip confirmation prompt
whiz delete my-first-post
whiz delete my-first-post -f

domain add

Register a custom domain for your blog.

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

Prints DNS instructions including the required CNAME record and TXT record values.


domain verify

Verify DNS records for a previously added custom domain.

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

domain remove

Remove the custom domain from your blog.

whiz domain remove
Flag Description
-f, --force Skip confirmation prompt
whiz domain remove
whiz domain remove -f

version

Print the CLI version.

whiz version
whiz version