@weibo-ai/weibo-cli
v0.5.11
Published
Open-source CLI for Weibo platform capabilities.
Readme
weibo-cli
Open-source CLI for the Weibo Open Platform — for humans and AI agents.
npm install -g @weibo-ai/weibo-cliOperate statuses, comments, friendships, search, users, and more from your terminal — with structured JSON / YAML / table output for scripting and agents.
| | |
| --- | --- |
| Agent-friendly | Machine-readable output; pipe to jq or agents |
| Live command catalog | weibo-cli --help syncs with the platform |
| OAuth built-in | Browser or device-code login; tokens in OS keychain |
| Lightweight | Node.js ≥ 18, no native addons |
Quick start
weibo-cli auth login # browser OAuth (recommended)
# weibo-cli auth login --device # SSH / headless
weibo-cli auth whoami
weibo-cli statuses friends_timeline/bizAuthentication
| Command | Description |
| --- | --- |
| auth login | Browser OAuth |
| auth login --device | Device code (non-interactive) |
| auth whoami | Verify session |
| auth logout | Clear local credentials |
Commands
Pattern: weibo-cli <group> <action> [flags] — actions may contain / (e.g. show_batch/other).
weibo-cli --help
weibo-cli commands list
weibo-cli commands show users show_batch/otherExamples
weibo-cli statuses friends_timeline/biz --count 5
weibo-cli statuses show_batch/biz --ids 1234567890
weibo-cli comments show/biz --id 1234567890
weibo-cli friendships friends/biz
weibo-cli users show/biz
weibo-cli users show_batch/other --screen_name 来去之间
weibo-cli search statuses/limited --q keywordGlobal flags: --output json|table|yaml|raw · --token <token> · -h, --help
Platform groups include statuses, comments, friendships, search, users, attitudes, tags, short_url, wbindex, plus built-ins auth, me, commands, config, version, upgrade.
Output
weibo-cli statuses friends_timeline/biz --output table
weibo-cli statuses friends_timeline/biz --output json | jq '.[] | .text'中文文档
微博开放平台命令行工具 — 终端操作微博、评论、关注、搜索等,适合脚本与 AI Agent。
安装与快速开始
npm install -g @weibo-ai/weibo-cli
weibo-cli auth login # 浏览器 OAuth(推荐)
# weibo-cli auth login --device # 非交互 / SSH
weibo-cli auth whoami
weibo-cli statuses friends_timeline/biz认证
| 命令 | 说明 |
| --- | --- |
| auth login | 浏览器 OAuth |
| auth login --device | 设备码登录 |
| auth whoami | 验证会话 |
| auth logout | 清除本地凭据 |
命令示例
weibo-cli --help
weibo-cli commands list --group statuses
weibo-cli statuses friends_timeline/biz --count 5
weibo-cli users show_batch/other --screen_name 来去之间
weibo-cli comments to_me/biz用户查询: 已知昵称用 users show_batch/other --screen_name;按关键词搜微博用 search statuses/limited --q。
输出格式: --output json|table|yaml|raw
License
MIT
