Google Blogger
by @saiteja007-mv
Blogger API CLI for managing blog posts. Post, edit, delete, list, and monitor Blogger blogs. Use when the user wants to: (1) publish blog posts to Blogger,...
clawhub install gblogπ About This Skill
name: gblog description: | Blogger API CLI for managing blog posts. Post, edit, delete, list, and monitor Blogger blogs. Use when the user wants to: (1) publish blog posts to Blogger, (2) edit existing blog posts, (3) list or search blog posts, (4) delete blog posts, (5) schedule posts, (6) monitor blog activity. Requires Google OAuth credentials in ~/.config/gblog/credentials.json
gblog - Blogger CLI
Manage Blogger blogs via command line. Supports posting, editing, listing, and monitoring.
Quick Start
# Authenticate with Google
gblog authList your blogs
gblog list-blogsList posts from a blog
gblog list-posts --blog-id YOUR_BLOG_IDCreate a new post
gblog post --blog-id YOUR_BLOG_ID --title "My Post" --content ./post.htmlEdit a post
gblog edit --blog-id YOUR_BLOG_ID --post-id POST_ID --content ./updated.htmlDelete a post
gblog delete --blog-id YOUR_BLOG_ID --post-id POST_ID
Setup
1. Google Cloud Console Setup
1. Go to Google Cloud Console
2. Create a project or select existing
3. Enable Blogger API v3
4. Go to APIs & Services β Credentials
5. Create OAuth 2.0 Client ID (Desktop application type)
6. Add redirect URIs:
- http://localhost:8085/oauth2callback
- http://localhost:8080/oauth2callback
7. Download credentials JSON
2. Local Setup
# Create config directory
mkdir -p ~/.config/gblogSave credentials
cp ~/Downloads/client_secret_*.json ~/.config/gblog/credentials.jsonRun authentication
gblog auth
3. Authentication
The first time you run gblog auth, it will:
1. Open a browser for Google OAuth
2. Request permissions for Blogger
3. Save refresh token to ~/.config/gblog/token.json
Commands
Authentication
gblog auth # Authenticate with Google
gblog auth --status # Check auth status
gblog auth --logout # Clear saved tokens
Blog Management
gblog list-blogs # List all your blogs
gblog get-blog --id BLOG_ID # Get blog details
Post Management
# List posts
gblog list-posts --blog-id BLOG_IDCreate post
gblog post \
--blog-id BLOG_ID \
--title "Post Title" \
--content ./content.html \
--labels "AI, Tutorial" \
--draftEdit post
gblog edit \
--blog-id BLOG_ID \
--post-id POST_ID \
--title "Updated Title" \
--content ./updated.htmlDelete post
gblog delete --blog-id BLOG_ID --post-id POST_IDGet post
gblog get-post --blog-id BLOG_ID --post-id POST_ID
Monitoring
# Monitor new posts (poll every 5 minutes)
gblog monitor --blog-id BLOG_ID --interval 300Get post statistics
gblog stats --blog-id BLOG_ID
HTML Content Format
Posts support full HTML. Example structure:
Configuration Files
| File | Purpose |
|------|---------|
| ~/.config/gblog/credentials.json | OAuth client credentials |
| ~/.config/gblog/token.json | Saved access/refresh tokens |
| ~/.config/gblog/config.json | User preferences |
Environment Variables
export GBLOG_CREDENTIALS_PATH=/path/to/credentials.json
export GBLOG_TOKEN_PATH=/path/to/token.json
export GBLOG_DEFAULT_BLOG_ID=your-blog-id
Error Handling
Common errors and solutions:
| Error | Solution |
|-------|----------|
| invalid_grant | Run gblog auth again |
| insufficient_permissions | Check Blogger API is enabled |
| blog not found | Verify blog ID is correct |
| rate limit exceeded | Wait 60 seconds and retry |
API Reference
Uses Blogger API v3:
https://www.googleapis.com/blogger/v3Scripts
scripts/gblog.py - Main CLI scriptscripts/auth.py - OAuth authenticationscripts/blogger_api.py - API wrapper*Powered by Google Blogger API v3*
π‘ Examples
# Authenticate with Google
gblog authList your blogs
gblog list-blogsList posts from a blog
gblog list-posts --blog-id YOUR_BLOG_IDCreate a new post
gblog post --blog-id YOUR_BLOG_ID --title "My Post" --content ./post.htmlEdit a post
gblog edit --blog-id YOUR_BLOG_ID --post-id POST_ID --content ./updated.htmlDelete a post
gblog delete --blog-id YOUR_BLOG_ID --post-id POST_ID
βοΈ Configuration
1. Google Cloud Console Setup
1. Go to Google Cloud Console
2. Create a project or select existing
3. Enable Blogger API v3
4. Go to APIs & Services β Credentials
5. Create OAuth 2.0 Client ID (Desktop application type)
6. Add redirect URIs:
- http://localhost:8085/oauth2callback
- http://localhost:8080/oauth2callback
7. Download credentials JSON
2. Local Setup
# Create config directory
mkdir -p ~/.config/gblogSave credentials
cp ~/Downloads/client_secret_*.json ~/.config/gblog/credentials.jsonRun authentication
gblog auth
3. Authentication
The first time you run gblog auth, it will:
1. Open a browser for Google OAuth
2. Request permissions for Blogger
3. Save refresh token to ~/.config/gblog/token.json