catbus README

The project's README from github.com/cv-cat/catbus. As one markdown file: README.md.

catbus — 上车,开往任何平台

一个命令,开往 10 个平台。
小红书 · 抖音 · TikTok · B 站 · 快手 · 微博 · 闲鱼 · 淘宝 · 京东 · X
即将上车:Instagram · YouTube · Facebook · 知乎 · 微信公众号 · 今日头条 · 得物 · 拼多多 · 美团 · 大众点评


npm License: MIT Node TypeScript Platforms Agent Ready

简体中文 · English · 繁體中文 · 日本語 · 한국어

快速上手 · 能力矩阵 · 各平台 · 示例 · 给 Agent 用


每个平台都有自己的一套接口、签名、登录方式和数据格式。catbus 把它们装进同一辆车:同一套命令、同一种 JSON、同一个登录态目录。换平台,只需要换一个词。

❤️ Sponsor

Vectrust

Sponsored by Vectrust @ OpenDev Org & NextRouter Alliance

想出现在这里?

✨ catbus 是什么

catbus(猫巴士)是一个命令行工具,用统一的语法调用 10 个中外主流平台的 web 端能力:搜索、详情、评论、用户、推荐流、下载、发布、私信、直播弹幕……

catbus xhs      item search 露营 --sort latest
catbus douyin   item search 露营 --sort latest
catbus bilibili item search 露营 --sort latest
catbus x        item search camping --sort latest

四个平台,四条几乎一样的命令,输出同一种结构的 JSON。笔记、作品、稿件、推文一律叫 item,搜索一律叫 search,点赞一律叫 like。学一次,十个平台都会用。

已支持的 10 个平台与正在开发的 10 个平台

🚀 为什么是 catbus

🧭 同义同名

含义相同的能力,在所有平台上用同一个命令、同一组参数、同一种输出。用了平台原生叫法(note、aweme、tweet……)也没关系,catbus 会告诉你该用哪个词。

📦 只需要 Node

不需要 Python、编译器或任何系统依赖。原生依赖全部带预编译包,覆盖 Windows、macOS、Linux 的 x64 / arm64(含 musl),8 个目标系统在 CI 上逐一冒烟。

🤖 为 AI Agent 而生

stdout 只有 JSON,退出码稳定,错误里带着下一步该执行的命令;catbus platforms 输出完整的能力清单。自带 Agent 技能 与 llms.txt。

🔐 登录态只在你的电脑上

扫码、短信、cookie 导入都支持,凭证按 平台 × 端 × 账号 隔离在 ~/.catbus/(0700 / 0600),多账号随时切换。不收集、不上传任何数据,没有遥测。

🧪 与上游逐字节一致

每个请求的 URL、header 顺序、cookie、body 和签名,都在固定的随机数与时钟下和上游实现逐字节对拍。560+ 份对拍数据、940+ 个离线测试守住每一次改动。

🛡️ 浏览器级的网络栈

与真 Chrome 一致的 TLS / HTTP2 指纹,上游签名 JS 原样在沙箱里运行,滑块、点选验证码用本地的 ONNX 与 OpenCV 自动识别。

📊 一些数字

🚌 平台 ⌨️ 已实现命令 🧪 对拍数据 ✅ 离线测试 💻 目标系统
10 300+ 560+ 940+ 8

🏗️ 架构

catbus 架构

🤖 为 AI Agent 而生

catbus 从第一天起就按「被程序调用」来设计:

catbus platforms douyin | jq '.data.commands[] | select(.status=="implemented") | .resource + " " + .action'

一条命令把 catbus 技能装进 Claude Code、Cursor、Codex 等 Agent:

npx skills add cv-cat/catbus

技能按需加载:总纲只有一页,涉及哪个平台、做哪类事(采集、发布、直播私信、排错)才读对应的子文件,并且内置了安全红线——登录交给你、写操作先确认、发布默认仅自己可见、遇到风控就停。

⚡ 30 秒上车

npm i -g catbus-cli

catbus doctor                 # 检查环境
catbus bilibili auth login    # 扫码登录
catbus bilibili item search 猫 --limit 20

也可以用 Docker 或从源码安装,完整步骤见 快速上手。

📚 文档

🚀 快速上手 从安装到导出第一批数据
🔑 登录 · ⚙️ 配置 · 🐳 Docker 扫码 / cookie、多账号、代理、容器
📤 输出与错误处理 信封、归一化类型、分页、退出码
🧭 各平台说明 · 🗂️ 能力矩阵 每个平台支持什么、怎么传参
🧪 示例脚本 跨平台搜索、导出评论、备份作品、录直播弹幕
📐 AGENTS.md catbus 的规范本身
❓ 常见问题 为什么要登录、遇到风控怎么办……

🤝 参与

欢迎 issue 和 PR:新平台、新命令、平台接口变了、文档改进都可以。开始之前读一下 CONTRIBUTING.md 和 AGENTS.md(规范先行,请求必须有对拍)。安全问题请按 SECURITY.md 私下报告。

📈 Star 趋势

Star History Chart

🍔 交流群

如果你对爬虫和 AI Agent 感兴趣,可以加入群聊一起讨论~

ps:群满或二维码过期时,请提 issue,或者通过微信 / QQ 提醒

group-1 group-2 group-3 group-4 (2000 人 QQ 群)
group1 group2 group3 group4
⚠️ 免责声明
  • 本项目仅供学习和研究使用,请勿用于商业用途或任何违法用途。
  • 使用时请遵守各平台的用户协议和服务条款,以及你所在地的法律法规;不要采集、传播他人的隐私数据,不要对平台造成过大的请求压力。
  • 自动化操作可能触发平台风控,导致验证码、限流乃至账号被封禁。由使用本项目产生的一切后果由使用者自行承担。
  • 本项目与上述任何平台都没有关联,也未获得其授权或认可。各平台名称和商标归其所有者所有。

📄 License

MIT © 2026 cv-cat


catbus
上车,开往任何平台 · All aboard, every platform.

catbus (cv-cat/catbus)

Searching Database…

445 ·GitHub
What is this?catbus is a command-line tool that lets you talk to 10 major Chinese and international platforms (Xiaohongshu, Douyin, TikTok, Bilibili, Kuaishou, Weibo, Xianyu, Taobao, JD, X) through one consistent set of commands and JSON output, instead of learning each platform's own API.
Is catbus a library I import, or a standalone CLI?It is a standalone CLI you run from the terminal; it also ships Agent Skills and an llms.txt so AI coding agents like Claude Code, Cursor, or Codex can call it directly rather than you embedding it as a library.
How do I get it running?The README points to a '30-second quick start' that installs via Node, with Docker and from-source as alternative paths covered in the docs.
Do I need Python or any compiler toolchain first?No - Node.js is the only requirement. All native dependencies ship as precompiled binaries for Windows, macOS, and Linux on both x64 and arm64 (including musl), tested across 8 target systems in CI.
What happens if a platform's anti-bot system catches me?Automated use can trigger a platform's risk control, which may show up as captchas, rate limiting, or account bans; catbus surfaces this explicitly as a RISKCONTROL error with a next-step hint instead of silently retrying.
How does catbus make sure its requests actually match what the real app sends?Every request's URL, header order, cookies, body, and signature are byte-for-byte diffed against the upstream clients using fixed random seeds and clocks, backed by 560+ diff datasets and 940+ offline tests.
How does it get past slider and click captchas?It runs the platform's own signing JavaScript in a sandbox and presents a Chrome-matching TLS/HTTP2 fingerprint, then solves slider and click-style captchas locally using ONNX and OpenCV.
What makes the output easy for an AI agent to chain together?Every command returns the same {ok, data, page, error} envelope, failed calls include an error.hint with the next command to run, and every result object carries an id and url so it can feed straight into the next call.
Can catbus post content or send messages, not just scrape?Yes - it supports publishing, direct messages, and reading live danmaku, but write actions require an explicit -y flag and published content defaults to visible-only-to-you for safety.
Creator
cv-cat
Size
3.8 MB
Stars
445
Age
21d
Commits · 90 Days