CLI/CLI/CLI publishing
CLI

CLI publishing

Authenticate the CLI and draft or publish markdown from your terminal.

The Blogizi CLI drafts and publishes local markdown files to your blog. Write posts yourself, in your editor, or with an AI coding agent — then push them with one command.

Get your API key

Dashboard → Account → API (also under any project Settings → API).

Keys are account-scoped — one key authorizes all of your projects. Treat it like a password: never commit it to git or paste it into chat logs.

Authenticate

npm install -g blogizi blogizi auth YOUR_ACCOUNT_API_KEY

Select a project

If your account has more than one project, tell the CLI which blog to publish to:

blogizi use your-project-slug # or in one step: blogizi auth YOUR_ACCOUNT_API_KEY --project your-project-slug

With a single project, the API picks it automatically — you can skip blogizi use. The active slug is saved in ~/.blogizi/config.json and sent with every draft / update / publish request.

Common commands

# Save a local markdown file as a draft blogizi draft path/to/my-post.md # Update an existing post by slug blogizi update path/to/my-post.md # Publish a local markdown file blogizi publish path/to/my-post.md # Switch which project the CLI targets blogizi use another-project-slug

Obsidian

Prefer writing in Obsidian? See Obsidian plugin for install, commands, and publishing from your vault with the same account API key.

How publishing works

Drafts are stored on Blogizi as draft status. Running blogizi draft creates a draft. Running blogizi update updates an existing post by slug (and keeps its visibility unless the file sets status). Running blogizi publish (or clicking Publish in the dashboard) sets status to published and makes the post visible on your public blog.

You can also create and edit posts entirely in the dashboard editor — the CLI is optional for day-to-day use once you prefer a visual workflow.

Frontmatter format: Write in Markdown. Full CLI reference: blogizi-agent README. HTTP details: Public API.