bilibili-cli

The bili CLI for agents: videos, subtitles, search, feeds, favorites and likes on Bilibili, with YAML or JSON output

  • 1,102 ★ on the repository
  • Last commit
  • Apache-2.0
CLI

Broad access

Why this level

  • The tool takes Bilibili cookies from Chrome, Firefox, Edge or Brave and saves login data to a file
  • The like, coin, triple, unfollow, dynamic-post and dynamic-delete commands act on behalf of your account
  • Requests go to a third-party service, and frequent calls trip Bilibili's protection
All reasons and checks

public-clis/bilibili-cli

Install

Works in

In your terminal, with SkillFoxx CLI

npx skillfoxx add cli/bilibili-cli

Detects the agents on your machine, shows the access level and pins the version.

Other ways to install

Access and checks

How we review

Broad accessThe tool can change data, run commands or handle secrets.

  • The tool takes Bilibili cookies from Chrome, Firefox, Edge or Brave and saves login data to a file
  • The like, coin, triple, unfollow, dynamic-post and dynamic-delete commands act on behalf of your account
  • Requests go to a third-party service, and frequent calls trip Bilibili's protection

This is third-party code. Review the repository files before installing.

What it does

bilibili-cli is the bili console utility for Bilibili, the Chinese video service. It ships with a SKILL.md that explains to an agent how to use it. The commands cover videos (details, subtitles, summary, comments, related), users and their uploads, keyword search, trending and the site ranking, the follow feed, favorites, history and watch later. To summarize a video the tool advises taking subtitles first: they hold the core of the clip and are more reliable than the AI summary. The Bilibili summary, comments and audio extraction are for when subtitles are missing. bili cuts audio into 25-second WAV segments that can go to speech recognition. Subtitles come as plain text, with timestamps or exported to SRT. Terminal output is pretty, and when stdout is not a terminal the default is YAML. The --yaml and --json flags give a single envelope with ok, schema_version, data and error fields, and the OUTPUT variable switches the mode. The tool can also write: like, coin, triple, unfollow, post and delete a dynamic.

Who it is for. For people who work with Chinese video content through an agent: researchers, marketers and creators who need Bilibili subtitles, summaries and listings as data.

Good fit when

  • You need to summarize a Chinese-language clip: the agent takes subtitles by BV id and builds a summary
  • You want a list of an author's latest videos or search results for a topic limited with --max
  • You are researching trends: bili hot and bili rank show what is popular over several days
  • You need audio segments for speech recognition when a clip has no subtitles
  • A creator wants to browse their own favorites, history, follows and dynamics

Not a fit when

  • You need bulk scraping: Bilibili runs anti-scraping protection and answers with a 412 error on frequent requests
  • You need other social networks: the tool knows only Bilibili
  • The agent must not act on behalf of your account: likes, coins and posting require a login
  • You need a stable permanent API: the authors advise upgrading regularly, or outdated API handling can cause errors

Example request

Take the subtitles for video BV1ABcsztEcY through bili, translate the key ideas into English and list the three main points

Limitations

Python 3.10 or newer is required. Most commands read data without a login, but subtitles, favorites, follows, history, the feed and all actions require authorization. Actions need a credential with the bili_jct cookie, otherwise the tool reports that the credential does not support writes.

Login works three ways: saved data in ~/.bilibili-cli/credential.json, cookies from Chrome, Firefox, Edge or Brave, and QR-code login. Audio extraction needs the audio extra (the av library). On a 412 error wait and lower --max. Use from Russia is not described in the repository, so check Bilibili's availability in advance.

How to disable. Delete the skill from the agent's skills directory, run uv tool uninstall bilibili-cli or pipx uninstall bilibili-cli, and delete the ~/.bilibili-cli folder with the saved login data.

FAQ

How do I install bilibili-cli?

With uv tool install bilibili-cli or pipx install bilibili-cli. For audio extraction add the audio extra in quotes: uv tool install "bilibili-cli[audio]". The agent skill installs with npx skills add jackwener/bilibili-cli.

How do I get a Bilibili video's subtitles through an agent?

With bili video BV1ABcsztEcY --subtitle. The timestamped version uses --subtitle-timeline, and SRT export uses -st --subtitle-format srt. Subtitles need an account login.

Do I need to log in?

Reading videos, search, trending and ranking need no login. Subtitles, favorites, follows, history, the feed and actions require authorization: bili login shows a QR code, and the tool picks up browser cookies on its own.

What does the HTTP 412 error mean?

Bilibili's anti-scraping protection triggered. Wait and retry with a lower --max.

How is bilibili-cli different from Agent-Reach?

bilibili-cli goes deep on one service and can act on behalf of an account. Agent-Reach reads many platforms at once, Bilibili among them, without such a set of commands.

Discussion

No questions or reviews yet.

CLI tools

A Claude Code skill that downloads a YouTube video, splits it into semantic chapters, cuts chosen clips, translates subtitles and burns bilingual ones in

SkillExtended access2.3KRepository stars

yt-fts downloads subtitles of YouTube channels and playlists into SQLite and finds phrases with links to the exact second, plus semantic search and chat

CLIBroad access1.8KRepository stars

YouTube Skills

YouTube Skills for AI Agents

A set of skills that gives an agent YouTube transcripts, video and channel search, and playlist extraction over one API

SkillExtended access1.1KRepository stars

A skill and CLI for translating and dubbing video: transcription, translation, voice synthesis and subtitles

SkillExtended access1.1KRepository stars

A skill that teaches the agent to build narrated videos through narrator-ai-cli: source, template, music, voice, script and composing

SkillExtended access3.1KRepository stars
Editors’ pick

The /watch skill turns a link or file into frames and captions, or with a Gemini key hands the whole video to Google for the agent to answer from

SkillBroad access19.1KRepository stars

Comparison with similar tools

Entries that share the main search query, and how they differ.

EntryOfficialAuthenticationRepository starsMain difference
bilibili-cli (this entry)no1,102
Agent Reachno101,004reads Twitter, Reddit, YouTube, GitHub, Bilibili and other platforms as one set, without single-service depth
OpenCLIno30,548turns any site into a command and works in your logged-in browser
YouTube Transcript MCP Servernonot required492an MCP server for YouTube video transcripts with timestamps

README in short

The README, in English and Chinese, lists features, install through uv or pipx, a full command list with examples, three authorization tiers and the structured output schema. A separate section explains using the tool as an agent skill and recommends subtitles for summaries. It ends with troubleshooting for common errors and links to sibling CLIs by the same author.

README badge

Original SKILL.md

---
name: bilibili-cli
description: CLI skill for Bilibili (哔哩哔哩, B站) with token-efficient YAML output for AI agents to browse videos, users, search, trending, dynamics, favorites, and interactions from the terminal
author: jackwener
version: "0.6.2"
tags:
  - bilibili
  - 哔哩哔哩
  - b站
  - video
  - social-media
  - cli
---

# bilibili-cli Skill

A CLI tool for interacting with Bilibili (哔哩哔哩). Use it to fetch video info, search content, browse user profiles, and perform interactions like liking or triple-clicking.

## Agent Defaults

When you need machine-readable output:

1. Prefer `--yaml` first because it is usually more token-efficient than pretty JSON.
2. Use `--json` only when downstream tooling strictly requires JSON.
3. Keep result sets small with `--max`, `--page`, or `--offset`.
4. Prefer specific commands over broad ones. Example: use `bili user-videos 946974 --max 3 --yaml` instead of fetching large timelines.
5. When summarizing a video, fetch subtitles first. Subtitles usually contain the video's core content and are the best primary source for summaries.
6. Only fall back to `--ai`, comments, or audio extraction when subtitles are unavailable or clearly insufficient.

## Prerequisites

```bash
# Install (requires Python 3.10+)
uv tool install bilibili-cli
# Or: pipx install bilibili-cli

# If you need audio extraction support (requires PyAV)
uv tool install "bilibili-cli[audio]"
# Or: pipx install "bilibili-cli[audio]"

# Upgrade to latest (recommended to avoid API errors)
uv tool upgrade bilibili-cli
# Or: pipx upgrade bilibili-cli
```

## Authentication

Most read commands work without login. Subtitles, favorites/following/watch-later/history, feed, and interactions require login.

```bash

Report a problem

Foxx AIbilibili-cli
Foxx AI

I am Foxx AI and I have already vetted this tool. Ask about install, setup or anything else, and I will keep it simple.