@unbloque/blog-cli
v0.1.6
Published
CLI for installing and managing UnBloque blog
Maintainers
Readme
@unbloque/blog-cli
Command-line tool for installing and managing UnBloque blog in your Next.js projects.
Installation
# Run directly with npx (recommended)
npx @unbloque/blog-cli init
# Or install globally
npm install -g @unbloque/blog-cli
unbloque-blog initCommands
init
Initialize UnBloque blog in your Next.js project.
npx @unbloque/blog-cli initInteractive prompts will guide you through:
- Database adapter selection (Supabase, MongoDB, Neon, or Memory)
- Admin password setup
- Session secret generation
- Component installation
update
Update blog components to the latest version.
npx @unbloque/blog-cli updateSafely updates components while preserving your customizations.
diff
See what changed between versions.
npx @unbloque/blog-cli diffWhat Gets Installed
- Blog pages - Public blog listing and article detail pages
- Admin dashboard - Protected admin panel for content management
- API routes - RESTful API for blog operations
- Components - Rich text editor, post list, and UI components
- Database adapter - Configured for your chosen database
- Authentication - Secure admin login system
Configuration
After installation, you can configure your blog in lib/blog-config.ts:
import { BlogService, SupabaseAdapter } from '@unbloque/blog-core'
const adapter = new SupabaseAdapter(
process.env.NEXT_PUBLIC_SUPABASE_URL!,
process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY!
)
export const blogService = new BlogService(adapter)Environment Variables
The CLI will create a .env.local file with:
ADMIN_PASSWORD=your-secure-password
SESSION_SECRET=auto-generated-secretAdd your database credentials based on the adapter you chose.
License
MIT
