MCPcopy Index your code
hub / github.com/biliup/biliup

github.com/biliup/biliup @v1.2.1

Chat with this repo
repository ↗ · DeepWiki ↗ · release v1.2.1 ↗ · + Follow
1,623 symbols 3,587 edges 173 files 359 documented · 22%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

description

Python PyPI PyPI - Downloads License Telegram

GitHub Issues GitHub Stars GitHub Forks

🛠️ 功能

  • 开箱即用,多种安装方式,提供可视化WebUi界面
  • 多主播录制/上传,24X7无人值守运行,高自定义元信息
  • 边录边传不落盘急速上传,节省本地硬盘空间

论坛:BBS

📜 更新日志

[!IMPORTANT]
Disclaimer / 免责声明 - 本项目仅供个人学习研究,不保证稳定性,不提供技术支持 - 使用本项目产生的一切后果由用户自行承担 - 禁止商业用途,请遵守版权及平台规定 - This project is for personal learning and research purposes only - No stability guarantee or technical support provided - Users are solely responsible for any consequences of using this project - Commercial use is strictly prohibited - Please respect copyright and platform ToS

📜 使用文档

B 站命令行投稿工具,支持短信登录账号密码登录扫码登录浏览器登录以及网页Cookie登录,并将登录后返回的 cookie 和 token 保存在 cookie.json 中,可用于其他项目。

  • 下载 Release: biliupR
  • 获取命令帮助 biliup --help

文档地址https://biliup.github.io/biliup-rs

Upload video to bilibili.

Usage: biliup [OPTIONS] <COMMAND>

Commands:
  login     登录B站并保存登录信息
  renew     手动验证并刷新登录信息
  upload    上传视频
  append    是否要对某稿件追加视频
  show      打印视频详情
  comments  查看视频评论
  reply     回复视频评论,默认只打印将要回复的内容
  dump-flv  输出flv元数据
  download  下载视频
  server    启动web服务,默认端口19159
  list      列出所有已上传的视频
  help      Print this message or the help of the given subcommand(s)

Options:
  -p, --proxy <PROXY>              配置代理
  -u, --user-cookie <USER_COOKIE>  登录信息文件 [default: cookies.json]
      --rust-log <RUST_LOG>        [default: tower_http=debug,info]
  -h, --help                       Print help
  -V, --version                    Print version

启动录制服务

启动web服务,默认端口19159

Usage: biliup server [OPTIONS]

Options:
  -b, --bind <BIND>    Specify bind address [default: 0.0.0.0]
  -p, --port <PORT>    Port to use [default: 19159]
      --auth           开启登录密码认证
  -c, --config <FILE>  使用 biliup 1.0.7 风格配置文件启动录制
  -h, --help           Print help

命令行工具 / Skill

biliup 可以作为自动化流程中的命令行工具封装使用。常用调用方式:

# 启动 Web 服务
biliup server --bind 0.0.0.0 --port 19159 --auth

# 使用 1.0.7 风格配置文件启动录制
biliup server --config config.toml

# 查看命令帮助
biliup --help
biliup server --help

通过 npx skills add biliup/biliup 可为 Agent 添加 biliup 命令行能力。添加后可直接让 Agent 执行 Web 服务启动、配置文件启动、命令帮助查看以及常用上传/下载命令。

🚀 快速开始

Windows

Linux 或 macOS

  1. 安装 uv
  2. 安装:uv tool install biliup
  3. 启动:biliup server --auth
  4. 访问 WebUI:http://your-ip:19159
  5. 后台运行
  6. nohup biliup server --auth &
  7. 请查看参考

Termux


🧑‍💻开发

架构概览

Rust后端 + 精简 Python 包 + Next.js前端的混合架构。

graph TB
    subgraph "🌐 前端层"
        UI[Next.js Web界面

React + TypeScript

Semi UI组件库]
    end

    subgraph "⚡ Rust后端服务"
        CLI[命令行与 Web API

biliup-cli

REST API / WebUI / 配置导入]
        CORE[核心库

biliup

直播解析 / 下载 / 上传]
        DANMAKU[弹幕库

danmaku

多平台协议 / XML输出]
        GEARS[Python绑定

stream-gears

python -m biliup 入口]
    end

    subgraph "🐍 Python包"
        PYENTRY[最小入口

biliup.__main__

调用 stream_gears.main_loop]
        PYUPLOAD[投稿库

bili_webup / bili_webup_sync

供外部项目调用]
    end

    subgraph "🗄️ 数据层"
        DB[(SQLite数据库

配置存储

任务状态 & 日志)]
        FILES[文件系统

视频分段 / 弹幕XML

缓存与临时文件]
    end

    subgraph "🌍 外部服务"
        BILI[Bilibili API

视频上传服务]
        STREAMS[直播平台

B站/斗鱼/虎牙/抖音/Twitch等]
    end

    UI --> CLI
    CLI --> CORE
    CLI --> DANMAKU
    CLI --> DB
    CLI --> FILES
    CORE --> STREAMS
    CORE --> BILI
    DANMAKU --> STREAMS
    DANMAKU --> FILES
    GEARS --> CLI
    PYENTRY --> GEARS
    PYUPLOAD --> BILI

    style UI fill:#e1f5fe
    style CLI fill:#f3e5f5
    style CORE fill:#f3e5f5
    style DANMAKU fill:#f3e5f5
    style GEARS fill:#f3e5f5
    style PYENTRY fill:#e8f5e8
    style PYUPLOAD fill:#e8f5e8
    style DB fill:#fff3e0
    style FILES fill:#fff3e0
    style BILI fill:#ffebee
    style STREAMS fill:#ffebee

frontend

  1. 确保 Node.js 版本 ≥ 18
  2. 安装依赖:npm i
  3. 启动开发服务器:npm run dev
  4. 访问:http://localhost:3000

Python

  1. 安装依赖 maturin dev
  2. npm run build
  3. 启动 Biliup:python3 -m biliup

Rust-cli

  1. npm run build
  2. 构建 cargo build --release --bin biliup
  3. 开发启动 BiliupR:cargo run

🤝Credits

  • Thanks ykdl, youtube-dl, streamlink provides downloader.
  • Thanks THMonster/danmaku.

💴捐赠

爱发电 »

⭐Stars

Star History Chart

Extension points exported contracts — how you extend this code

LivePlugin (Interface)
(no doc) [21 implementers]
crates/biliup/src/downloader/live/mod.rs
Platform (Interface)
(no doc) [7 implementers]
crates/danmaku/src/protocols/mod.rs
DanmakuClient (Interface)
弹幕客户端 (需要根据实际情况实现) [2 implementers]
crates/biliup-cli/src/server/core/downloader.rs
StudioEntity (Interface)
(no doc)
app/lib/api-streamer.ts
LogContentProps (Interface)
(no doc)
app/(app)/logviewer/page.tsx
ThemeButtonProps (Interface)
(no doc)
app/ui/ThemeButton.tsx
ReqwestClientBuilderExt (Interface)
(no doc) [1 implementers]
crates/biliup/src/lib.rs
LiveStreamerEntity (Interface)
(no doc)
app/lib/api-streamer.ts

Core symbols most depended-on inside this repo

get
called by 321
crates/danmaku/src/codec/stt.rs
is_empty
called by 117
crates/danmaku/src/codec/tars.rs
as_str
called by 115
crates/danmaku/src/codec/stt.rs
next
called by 33
crates/biliup-cli/src/server/core/monitor.rs
as_bytes
called by 29
crates/danmaku/src/codec/protobuf.rs
nm
called by 28
crates/danmaku/src/protocols/youtube.rs
read
called by 27
crates/biliup/src/uploader.rs
headers
called by 25
crates/biliup/src/downloader/live/douyin.rs

Shape

Method 769
Function 501
Class 281
Enum 57
Interface 15

Languages

Rust87%
TypeScript7%
Python5%

Modules by API surface

crates/biliup/src/downloader/flv_parser.rs49 symbols
biliup/plugins/bili_webup.py47 symbols
crates/biliup/src/uploader/bilibili.rs42 symbols
crates/biliup/src/downloader/live/douyin.rs41 symbols
crates/danmaku/src/protocols/youtube.rs33 symbols
crates/biliup/src/downloader/live/huya.rs33 symbols
biliup/plugins/bili_webup_sync.py33 symbols
crates/danmaku/src/protocols/bilibili.rs32 symbols
crates/danmaku/src/codec/tars.rs32 symbols
crates/biliup/src/downloader/live/bilibili.rs31 symbols
crates/danmaku/src/protocols/douyin.rs30 symbols
crates/biliup/src/uploader/credential.rs30 symbols

For agents

$ claude mcp add biliup \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact