Files
biliup/SKILL.md
T
Noah 906e0f6fdb docs: 依据代码实现重写 README,迁移弃用域名并修正失效信息 (#1681)
* docs: 依据代码实现重写 README,修正失效信息并补充平台与开发说明

保持原有结构、标题与徽章排版不变,按当前代码逐项校对内容。

修正与实现不符之处:
- 登录信息文件名写作 cookie.json,实际 CLI 默认值为 cookies.json
  (crates/biliup-cli/src/cli.rs 及其单测均为 cookies.json)
- Windows 下载链接硬编码 bbup-app_0.1.0_x64,随发版即失效,改为
  指向 Release 页
- Python 徽章链接 http://www.python.org/download 返回 404,改为
  https://www.python.org/downloads/
- Node.js 要求由 ≥ 18 修正为 ≥ 18.17(Next.js 14 的实际下限)

新增内容:
- 支持平台表:依据 builtin_plugins() 的 19 个平台适配器与通用兜底
  适配器,站点域名取自各适配器正则;弹幕列依据 danmaku
  create_platform() 支持的 7 个平台
- download 子命令用法示例与分段参数说明
- 外部依赖说明:默认 stream-gears 为纯 Rust 实现无需外部程序,
  ffmpeg 下载器与后处理需 ffmpeg,YouTube/niconico 及通用适配器
  需 yt-dlp 或 streamlink
- 目录结构表,以及 cargo 构建前必须先 npm run build 的说明
  (biliup-cli 经 rust-embed 内嵌 out/,缺失会导致编译失败)
- 测试命令与 Docker /opt 持久化、首次访问尽快初始化管理员的提示

校验:CLI 帮助文本与 target/debug/biliup --help、server --help 实际
输出逐字一致;远程访问拒绝启动的报错取自实际运行输出;mermaid
架构图经 mermaid-cli 渲染通过;README 全部外链已联网检查。

* docs: 迁移已弃用的 biliup.rs 文档域名,移除失效的 winget 安装方式

README:
- 顶部 logo 原引用 docs.biliup.rs/home.png,该域名已弃用且无法访问,
  改为仓库内 public/logo.png 的 raw 链接。README 同时用作 PyPI 长描述
  (pyproject.toml readme = "README.md"),故使用绝对地址而非相对路径
- 「使用文档」链接改为新域名
  https://biliup.github.io/biliup/docs/guide/introduction/

SKILL.md:
- 删除 Windows winget 安装段落。winget 上不存在名为 biliup 的包,
  该命令返回 No package found matching input criteria;现有的
  ForgQi.biliup-app(0.6.7)、ForgQi.biliup-rs(0.2.4) 均已停止更新,
  远落后于当前 1.2.4。Windows 用户仍可通过既有的 GitHub Releases
  段落(含 PowerShell 脚本)安装

校验:README 全部 29 个链接联网复查,除 GitHub 对未登录请求的
/stargazers 统一返回 404(rust-lang/rust 同样如此,属反爬行为)外
均为 200;新 logo 地址返回 200、image/png、65525 字节。
2026-09-01 13:49:39 +00:00

4.8 KiB

name, description
name description
biliup Use the biliup command-line tool to start the WebUI server, run recording tasks from config files, inspect help, and operate common upload/download commands.

biliup

Use this skill when the user wants to install or operate the biliup command-line tool.

biliup can start the WebUI server, run recording tasks from config files, log in, upload videos, append videos, inspect video information, download videos, and list uploaded videos.

Install flow

When the user needs to install biliup, choose one installation path based on the user's operating system and preference.

GitHub Releases prebuilt package

Use this path when the user wants to install a prebuilt binary from GitHub Releases.

For Linux or macOS, generate and run this script. Set INSTALL_DIR to the user's target directory when needed.

set -euo pipefail

REPO="biliup/biliup"
INSTALL_DIR="${INSTALL_DIR:-$HOME/.local/bin}"
OS="$(uname -s)"
ARCH="$(uname -m)"

case "$OS" in
  Linux) os="linux" ;;
  Darwin) os="macos" ;;
  *) echo "Unsupported OS: $OS" >&2; exit 1 ;;
esac

case "$ARCH" in
  x86_64|amd64) arch="x86_64" ;;
  aarch64|arm64) arch="aarch64" ;;
  armv7l|armv7*) arch="arm" ;;
  *) echo "Unsupported architecture: $ARCH" >&2; exit 1 ;;
esac

asset="$(curl -fsSL "https://api.github.com/repos/${REPO}/releases/latest" \
  | python3 -c 'import json,sys; data=json.load(sys.stdin); os=sys.argv[1]; arch=sys.argv[2]; assets=[a["name"] for a in data["assets"]]; matches=[n for n in assets if n.endswith(".tar.xz") and f"-{arch}-{os}.tar.xz" in n]; print(matches[0] if matches else "")' "$os" "$arch")"

if [ -z "$asset" ]; then
  echo "No matching biliup release asset for ${arch}-${os}" >&2
  exit 1
fi

url="https://github.com/${REPO}/releases/latest/download/${asset}"
tmp="$(mktemp -d)"
trap 'rm -rf "$tmp"' EXIT

curl -fL "$url" -o "$tmp/$asset"
tar -xJf "$tmp/$asset" -C "$tmp"
mkdir -p "$INSTALL_DIR"
install -m 755 "$(find "$tmp" -type f -name biliup | head -n 1)" "$INSTALL_DIR/biliup"

"$INSTALL_DIR/biliup" --help

For Windows PowerShell, generate and run this script. Set $InstallDir to the user's target directory when needed.

$ErrorActionPreference = "Stop"

$Repo = "biliup/biliup"
$InstallDir = if ($env:INSTALL_DIR) { $env:INSTALL_DIR } else { Join-Path $env:USERPROFILE "bin" }
$Arch = if ([Environment]::Is64BitOperatingSystem) { "x86_64" } else { throw "Unsupported Windows architecture" }

$Release = Invoke-RestMethod "https://api.github.com/repos/$Repo/releases/latest"
$Asset = $Release.assets | Where-Object { $_.name -like "biliupR-v*-$Arch-windows.zip" } | Select-Object -First 1
if (-not $Asset) { throw "No matching biliup release asset for $Arch-windows" }

$Tmp = New-Item -ItemType Directory -Force (Join-Path ([IO.Path]::GetTempPath()) ([Guid]::NewGuid().ToString()))
try {
  $Zip = Join-Path $Tmp.FullName $Asset.name
  Invoke-WebRequest $Asset.browser_download_url -OutFile $Zip
  Expand-Archive $Zip -DestinationPath $Tmp.FullName -Force
  New-Item -ItemType Directory -Force $InstallDir | Out-Null
  $Exe = Get-ChildItem $Tmp.FullName -Recurse -Filter biliup.exe | Select-Object -First 1
  if (-not $Exe) { throw "biliup.exe not found in release archive" }
  Copy-Item $Exe.FullName (Join-Path $InstallDir "biliup.exe") -Force
  & (Join-Path $InstallDir "biliup.exe") --help
} finally {
  Remove-Item $Tmp.FullName -Recurse -Force
}

If the target directory is not on PATH, tell the user to run biliup by its full path or add the target directory to PATH.

Linux or macOS uv

Use this path when the user is on Linux or macOS and has uv available:

uv tool install biliup

Then verify:

biliup --help

Operation flow

When the user asks to start the WebUI server with authentication, use:

biliup server --auth

When the user provides an address or port, include them explicitly:

biliup server --bind 0.0.0.0 --port 19159 --auth

When the user asks to run from a biliup 1.0.7 style config file, use:

biliup server --config config.toml

Replace config.toml with the user's config file path.

When the user wants to run the server in the background on Linux or macOS, use:

nohup biliup server --auth &

Help flow

When the user asks what commands are available, show:

biliup --help

When the user asks about server options, show:

biliup server --help

When the user asks about a specific command, use:

biliup <command> --help

Replace <command> with the requested subcommand.

Commands

The CLI includes these subcommands:

login
renew
upload
append
show
comments
reply
dump-flv
download
server
list

When generating a command, include the concrete paths required by that command, such as cookie files, config files, and video file paths.