Skip to content
Souloss
Go back

CLI Tools Guide

Complete guide to @astro-minimax/cli: create blogs, manage posts, AI content processing, author profiles, and data management.

@astro-minimax/cli provides a comprehensive command-line toolkit for blog project management and AI content processing. This guide covers all available commands.

Installation

The CLI is installed as a dev dependency:

pnpm add -D @astro-minimax/cli
bash

Use via astro-minimax command or pnpm run shortcuts.

Create a New Blog

npx @astro-minimax/cli init my-blog
bash

Generates a complete blog project with config files, sample content, and AI toolchain.

Post Management

Create Posts

pnpm run post:new -- "Post Title"
pnpm run post:new -- "Chinese Title" --lang=zh
pnpm run post:new -- "Tutorial" --category="Tutorial/Frontend"
bash

List Posts

pnpm run post:list
bash

Shows all posts sorted by date, with draft indicators.

Post Statistics

pnpm run post:stats
bash

AI Content Processing

Requires environment variables:

# .env
AI_API_KEY=your-api-key
AI_BASE_URL=https://api.openai.com  # optional
AI_MODEL=gpt-4o-mini                 # optional
bash

Process Articles

pnpm run ai:process                          # Process all (summaries + SEO)
pnpm run ai:process -- --force               # Force reprocess
pnpm run ai:process -- --slug=en/my-post     # Specific article
pnpm run ai:process -- --lang=en             # English only
pnpm run ai:process -- --dry-run             # Preview mode
bash

AI Quality Evaluation

pnpm run ai:eval                                    # Test local server
pnpm run ai:eval -- --url=https://your-blog.com     # Test production
pnpm run ai:eval -- --category=no_answer             # Specific category
pnpm run ai:eval -- --verbose                        # Detailed output
bash

Author Profile

pnpm run profile:build      # Full build (context + voice + report)
pnpm run profile:context    # Author context only
pnpm run profile:voice      # Voice style only
pnpm run profile:report     # Profile report only
bash

Data Management

pnpm run data:status        # View all data file statuses
pnpm run data:clear         # Clear generated caches
bash

Quick Reference

ShortcutCommand
pnpm run post:new -- "Title"astro-minimax post new "Title"
pnpm run post:listastro-minimax post list
pnpm run ai:processastro-minimax ai process
pnpm run ai:evalastro-minimax ai eval
pnpm run profile:buildastro-minimax profile build
pnpm run data:statusastro-minimax data status


Previous Post
AI Chat Configuration Guide
Next Post
Blog Notification System Configuration Guide

评论区

文明评论,共建和谐社区