bilibili-cli knowledge
Browse Bilibili videos, trending content, and interact — all from your terminal
bili is a CLI for Bilibili that lets you browse videos, discover trending content, manage collections, and interact with the platform from the terminal.
Features
- View video details with subtitles, AI summaries, and comments
- Browse trending videos and site-wide rankings
- Search videos, users, and content
- Like, coin (tip), and triple-action (一键三连)
- Manage favorites, watch-later lists, and viewing history
- Extract and segment video audio into WAV files
- Structured output (JSON/YAML) for AI agent integration
- Auto-extract cookies from browsers or QR code login
Install
uv: uv tool install bilibili-clipipx: pipx install bilibili-cli Commands
| Command | Syntax | Description |
|---|---|---|
login | bili login | Authenticate via QR code |
video | bili video <bvid> | View video details |
hot | bili hot --max 10 | Browse trending videos |
rank | bili rank --day 7 | View site-wide rankings |
search | bili search <keyword> | Search videos and content |
feed | bili feed | Browse follower timeline |
audio | bili audio <bvid> --segment 60 | Extract and segment video audio into WAV files |
Links
Agent Usage Example
Use cases:
- Search and summarize Bilibili video content via subtitles
- Monitor trending videos and rankings
- Extract video audio for speech recognition or analysis
Example workflow:
bili video BV1ABcsztEcY --subtitle --yaml | head -50