| Crates.io | bili-tui |
| lib.rs | bili-tui |
| version | 0.1.22 |
| created_at | 2025-10-19 15:55:18.840069+00 |
| updated_at | 2025-10-25 07:46:54.686864+00 |
| description | A TUI client for Bilibili written in Rust. |
| homepage | https://github.com/vandeefeng/bili-tui |
| repository | https://github.com/vandeefeng/bili-tui |
| max_upload_size | |
| id | 1890567 |
| size | 417,687 |
A TUI client for Bilibili written in Rust, created as a practice project. It provides a simple terminal interface for searching and playing videos directly from a URL.
Inspired by: Siriusmart/youtube-tui: An aesthetically pleasing YouTube TUI written in Rust

mpv and yt-dlp.Ensure you have the following software installed on your system:
Install the application using Cargo:
cargo install bili-tui
Make sure ~/.cargo/bin is in your system's PATH.
Run the application:
bili-tui
For the latest:
Clone the repository:
git clone https://github.com/vandeefeng/bili-tui.git
cd bili-tui
Run with Cargo:
cargo run
To get better search results and video quality, you can provide your Bilibili SESSDATA via the SESSDATA environment variable.
How to get SESSDATA:
SESSDATA cookie and copy its valueexport SESSDATA="your_sessdata_value_here"
The application reads this variable and adds the SESSDATA to its API requests in src/api.rs:
// src/api.rs
let sessdata = std::env::var("SESSDATA").unwrap_or_else(|_| "".to_string());
// ...
let response = client.get(&url).header("Cookie", format!("SESSDATA={}", sessdata)).send().await?;
Security Warning: Storing SESSDATA in environment variables can be a security risk on shared systems. Use with caution.
| Key(s) | Action |
|---|---|
q, Esc |
Quit or go back |
j, ↓ |
Move down |
k, ↑ |
Move up |
h, ← |
Move left (in Moments view) |
l, → |
Move right (in Moments view) |
J, Shift+↓ |
Scroll content down (in Moments view) |
K, Shift+↑ |
Scroll content up (in Moments view) |
p |
Play selected video (in Moments or Search Results) |
Enter |
Activate/Select item |
/ |
Focus search bar |
m |
Show Moments view |
M |
Show messages popup |
: |
Enter command mode |
? |
Show help |
:video <url>: Plays the specified Bilibili video URL.:video-info <url_or_bvid>: Displays detailed information about the video.:moments or :m: Shows the moments of your followed authors.:add <uid> <username>: Add author to custom following list.:remove <uid>: Remove author from custom following list.:ban <uid> <username>: Add author to blacklist (will be filtered out).:unban <uid>: Remove author from blacklist.:list: Show current following status and configured authors.:refresh: Refresh authors from API (requires SESSDATA, only when custom following is disabled).:toggle-custom: Toggle between API following and custom following mode.:help: Shows the help screen.:q: Quits the application.The application supports custom following management, allowing you to manually configure which authors to follow and which to blacklist:
Configuration File: Settings are stored in ~/.config/bili-tui/following.json
Features:
Common Workflows:
:toggle-custom to enable custom mode:add 123456789 "AuthorName" to add authors you want to follow:ban 987654321 "SpamAuthor" to blacklist authors:list to see current configuration:toggle-custom to switch between API and custom followingNotes:
:refresh to update authors from API when using API following mode