Introduction

CLI Commands

Use the Bloggrify command-line interface to manage your blog efficiently

Bloggrify includes a command-line interface to help you manage your blog content, authors, and validate your posts.

Quick Start

After installing Bloggrify, you can use the CLI via npx:

npx bloggrify --help

Creating Posts

Create a new blog post with frontmatter:

npx bloggrify new post "My Article Title"

The CLI will create a markdown file with all required metadata in content/YYYY/MM/DD/my-article-title.md and a corresponding image folder in public/YYYY/MM/DD/my-article-title/.

Run bloggrify new --help to see all available options (description, tags, author, flat mode, etc.).

Common Options

# Create a published post with tags
npx bloggrify new post "TypeScript Guide" \
  --tags "typescript,tutorial" \
  --description "Complete TypeScript guide" \
  --published

# Create in flat mode (content/slug.md instead of dated path)
npx bloggrify new post "About" --flat

Managing Drafts

List all draft posts:

npx bloggrify draft list

Publish a draft post:

npx bloggrify publish my-article-slug

The CLI will find your post even with partial paths:

# All of these work:
npx bloggrify publish my-article
npx bloggrify publish 2025/01/15/my-article
npx bloggrify publish content/my-article.md

Author Management

Add a new author interactively:

npx bloggrify author add

The CLI will prompt you for all required information (username, name, description, avatar, socials) and update app/app.config.ts automatically.

List all configured authors:

npx bloggrify author list

Validation

Validate all your posts for common errors and SEO issues:

npx bloggrify validate

This checks for:

  • Errors: Missing title, invalid dates, non-existent authors
  • Warnings: Missing descriptions, SEO issues (title/description length), missing tags, missing cover images
The validation command exits with code 1 if errors are found, making it perfect for CI/CD pipelines.

Statistics

View blog statistics:

npx bloggrify stats

Shows:

  • Post count (total, published, drafts)
  • Timeline (posts per year)
  • Most used tags
  • Content quality issues

Getting Help

Every command has a --help flag with detailed documentation:

npx bloggrify --help              # List all commands
npx bloggrify new --help          # Options for creating posts
npx bloggrify author --help       # Author management commands
The CLI is designed to be self-documenting. Use --help to discover all available options and stay up-to-date with new features.