npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@weibo-ai/weibo-cli

v0.9.8

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 version node license

npm install -g @weibo-ai/weibo-cli

Operate 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 --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 auth login              # browser in a desktop TTY; device flow when stdin is not a TTY
# weibo auth login --device   # force device flow for SSH / remote / headless use

weibo auth whoami
weibo statuses friends_timeline/biz

Authentication

| Command | Description | | --- | --- | | auth login | Auto-select browser (TTY) or device flow (non-TTY) | | auth login --device | Force device flow (headless, with human approval) | | auth whoami | Verify session | | auth logout | Revoke the remote session and clear local credentials | | auth token | Show token last4 and storage metadata | | auth token --export | Explicitly export the full access token |

Prefer WEIBO_CLI_TOKEN (or WEIBO_TOKEN) injected by your environment or CI secret manager. --token remains supported for compatibility, but can expose secrets through process arguments, shell history, or logs. Avoid putting literal tokens in shell commands.

Commands

Pattern: weibo <group> <action> [flags] — actions may contain / (e.g. show_batch/other).

weibo --help
weibo commands list
weibo commands show users show_batch/other

Examples

weibo statuses friends_timeline/biz --count 5
weibo statuses show_batch/biz --ids 1234567890
weibo comments show/biz --id 1234567890
weibo friendships friends/biz
weibo users show/biz
weibo users show_batch/other --screen_name 来去之间
weibo search statuses/limited --q keyword

Global flags: --output json|table|yaml|raw · -h, --help · --token <token> (legacy; prefer environment injection)

--help/-h always prints human-readable help. If combined with --output, help takes precedence and the output format is ignored. When --output is omitted, each command uses its command-specific default (for example, doctor uses a human-readable readiness report).

Platform groups are discovered from the server using commands list, including statuses, comments, friendships, search, users, article, and others according to your account. Built-ins include auth, me, doctor, commands, skill, version, check_update, and upgrade.

upgrade prints the npm install command; it does not install software automatically. update, check-update, and auth revoke remain supported for compatibility.

Security update compatibility

  • Normal platform calls and existing command aliases remain supported.
  • Scripts reading .token from auth token --output json must switch to weibo auth token --export. Default token output now contains metadata only.
  • Existing OS keychain logins are unchanged. Encrypted-file credentials migrate automatically on use to AES-GCM with a random local key (~/.weibo-cli/credential-key, owner-only permissions). Keep that key with the encrypted credentials when backing up; losing it requires login again. Older CLI versions cannot read the new format, so downgrading may require login again. Migration needs write permission to the configuration directory.
  • The local fallback protects against disclosure of an encrypted credential file alone. It does not protect against an attacker who can read both the key and credentials or operate as your OS account. Prefer the OS keychain where available.
  • Skill installation requires a ZIP package and valid SHA-256 metadata. Old Hub entries without these must be updated or republished; there is no bypass flag. Already installed skills are not removed. Hashes verify consistency with Hub metadata, not independent publisher identity.
  • Installing a skill replaces its directory and removes old files. Back up local edits first. Failed validation leaves the old installation intact.
  • skill install --global now matches the documented ~/.config/agents/skills/; --global --claude uses ~/.claude/skills/. Older copies in ~/.gemini/config/skills/ are not moved or removed automatically; update your Agent's configured path to avoid loading stale copies.
  • Logout clears local credentials even when remote revocation fails, but now reports an error and exits nonzero instead of claiming the session was revoked.

Output

weibo statuses friends_timeline/biz --output table
weibo statuses friends_timeline/biz --output json | jq '.[] | .text'

With an explicit --output, failures also write the API/error body to stderr in that format.

中文文档

微博开放平台命令行工具 — 终端操作微博、评论、关注、搜索等,适合脚本与 AI Agent。

安装与快速开始

npm install -g @weibo-ai/weibo-cli

weibo auth login              # 桌面终端默认浏览器;stdin 非 TTY 时自动设备码
# weibo auth login --device   # SSH / 远程 / 无图形界面时强制设备码

weibo auth whoami
weibo statuses friends_timeline/biz

认证

| 命令 | 说明 | | --- | --- | | auth login | 自动选择浏览器(TTY)或设备码(非 TTY) | | auth login --device | 强制设备码登录(仍需用户在浏览器确认) | | auth whoami | 验证会话 | | auth logout | 清除本地凭据 |

命令示例

weibo --help
weibo commands list --group statuses
weibo statuses friends_timeline/biz --count 5
weibo users show_batch/other --screen_name 来去之间
weibo comments to_me/biz

用户查询: 已知昵称用 users show_batch/other --screen_name;按关键词搜微博用 search statuses/limited --q。

输出格式: --output json|table|yaml|raw

License

MIT