Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
jackwener avatar

Weibo Cli

  • 148 installs
  • 78 repo stars
  • Updated March 14, 2026
  • jackwener/weibo-cli

Operate Weibo from the terminal: post updates, read timelines, search topics, and automate social monitoring pipelines for Chinese microblogging without browser-only workflows.

About

Skill for jackwener/weibo-cli: command-line access to Weibo for posting, reading feeds, searching users and topics, managing sessions, and building automated social monitoring or publishing workflows from the terminal.

  • Terminal posting and timeline reading commands
  • Search, hashtag, and user lookup operations
  • Authentication and session persistence guidance
  • JSON or table output for downstream automation
  • Safe rate limiting and retry patterns for API calls

Weibo Cli by the numbers

  • 148 all-time installs (skills.sh)
  • +5 installs in the week ending Aug 2, 2026 (Skillselion tracking)
  • Ranked #219 of 550 CLI & Terminal skills by installs in the Skillselion catalog
  • Data as of Aug 2, 2026 (Skillselion catalog sync)
npx skills add https://github.com/jackwener/weibo-cli --skill weibo-cli

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs148
repo stars78
Last updatedMarch 14, 2026
Repositoryjackwener/weibo-cli

What it does

Operate Weibo from the terminal: post updates, read timelines, search topics, and automate social monitoring pipelines for Chinese microblogging without browser-only workflows.

Files

SKILL.mdMarkdownGitHub ↗

weibo-cli — Weibo CLI Tool

Binary: weibo Credentials: browser cookies (auto-extracted) or QR code login

Setup

# Install (requires Python 3.10+)
git clone git@github.com:jackwener/weibo-cli.git
cd weibo-cli && uv sync

Authentication

IMPORTANT FOR AGENTS: Before executing ANY weibo command, check if credentials exist first. Do NOT assume cookies are configured.

Step 0: Check if already authenticated

weibo status 2>/dev/null && echo "AUTH_OK" || echo "AUTH_NEEDED"

If AUTH_OK, skip to Command Reference. If AUTH_NEEDED, proceed to Step 1.

Step 1: Guide user to authenticate

Method A: Browser cookie extraction (recommended)

Ensure user is logged into weibo.com in any supported browser (Chrome, Arc, Edge, Firefox, Brave, Chromium, Opera, Vivaldi, Safari, LibreWolf). weibo-cli auto-extracts cookies.

weibo login
weibo login --qrcode          # QR code login directly (skip browser cookies)
weibo status

Method B: QR code login

weibo login
# → Renders QR in terminal using Unicode half-blocks
# → Scan with Weibo App (我的 → 扫一扫) → confirm

Step 2: Handle common auth issues

SymptomAgent action
⚠️ 未登录Guide user to login to weibo.com in browser, then run weibo login
会话已过期Run weibo logout && weibo login
Cookie extraction hangsBrowser may be running; close browser and retry

Output Format

Default: Rich table (human-readable)

weibo hot                              # Pretty table output

JSON / YAML: structured output

weibo hot --json                       # JSON to stdout
weibo hot --yaml                       # YAML output
weibo hot --json | jq '.realtime[:3]'  # Filter with jq

Non-TTY stdout defaults to YAML automatically.

Command Reference

Reading

CommandDescriptionExample
weibo hotHot search list (50+ topics)weibo hot --count 10 --json
weibo trendingReal-time search trendsweibo trending --count 10 --yaml
weibo search <keyword>Search weibos by keywordweibo search "科技" --count 5 --json
weibo feedHot timelineweibo feed --count 5 --json
weibo homeFollowing timelineweibo home --count 10 --json
weibo detail <mblogid>View weibo with statsweibo detail Qw06Kd98p --json
weibo comments <mblogid>View commentsweibo comments Qw06Kd98p --count 10
weibo reposts <mblogid>View reposts/forwardsweibo reposts Qw06Kd98p --count 5
weibo profile <uid>User profileweibo profile 1699432410 --json
weibo weibos <uid>User's published weibosweibo weibos 1699432410 --count 5
weibo following <uid>User's following listweibo following 1699432410
weibo followers <uid>User's follower listweibo followers 1699432410

Account

CommandDescription
weibo loginExtract cookies from browser / QR login
weibo login --qrcodeQR code login directly (skip browser)
weibo login --cookie-source <browser>Extract from specific browser
weibo logoutClear saved credentials
weibo statusCheck authentication status
weibo meShow current user profile

Agent Workflow Examples

Browse hot topics and read details

# Get hot search topics
MBLOG=$(weibo hot --json | jq -r '.realtime[0].mblog_id // empty')
# Read a specific weibo
weibo detail Qw06Kd98p --json | jq '{text: .text_raw, likes: .attitudes_count, comments: .comments_count}'

Analyze user profile

weibo profile 1699432410 --json | jq '.user | {name: .screen_name, followers: .followers_count, posts: .statuses_count}'
weibo weibos 1699432410 --count 3 --json

Read comments on a weibo

weibo comments Qw06Kd98p --json | jq '.data[:5] | .[].text_raw'

Daily monitoring workflow

# Top 10 hot topics
weibo hot --json | jq '.realtime[:10] | .[] | {rank, word, num}'

# Trending sidebar
weibo trending --yaml

# Hot feed
weibo feed --count 5 --json

Error Codes

Structured error codes returned in CLI output:

  • not_authenticated — cookies expired or missing
  • rate_limited — too many requests
  • invalid_params — missing or invalid parameters
  • qr_expired — QR code has expired
  • api_error — upstream Weibo API error

Limitations

  • Read-only — no posting, liking, or retweeting
  • No DMs — cannot access private messages
  • Single account — one set of credentials at a time
  • Rate limited — built-in Gaussian jitter delay (~1s) between requests

Anti-Detection Notes for Agents

  • Do NOT parallelize requests — the built-in rate-limit delay exists for account safety
  • Batch operations: when doing bulk work (e.g., reading many profiles), add delays between CLI calls
  • Session stability: all requests share consistent Chrome 145 headers per session

Safety Notes

  • Do not ask users to share raw cookie values in chat logs.
  • Prefer local browser cookie extraction over manual secret copy/paste.
  • If auth fails, ask the user to re-login via weibo login.
  • Agent should treat cookie values as secrets (do not echo to stdout unnecessarily).
  • Built-in rate-limit delay protects accounts; do not bypass it.

Related skills

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.