@chhsiching/doubao-cli
v1.2.0
Published
豆包 AI 命令行工具 — 通过 bb-browser CLI 化豆包 Web 端所有功能
Maintainers
Readme
doubao-cli
A command-line interface for interacting with Doubao AI through browser automation.
Built on top of bb-browser — a CLI + MCP server for programmatic browser control.
Quick Start
Prerequisites
- Node.js >= 18
- Google Chrome or Chromium
- A Doubao account
Install
git clone [email protected]:ChHsiching/doubao-cli.git
cd doubao-cli
npm installThis automatically installs bb-browser and copies adapters into place.
Login
# Phone + verification code (recommended)
./doubao-cli login 13800138000 # Send code to phone
./doubao-cli login 13800138000 123456 # Login with code
# Or interactive mode — prompts for phone and code
./doubao-cli loginIf phone login is unavailable, use browser login as a fallback:
./doubao-cli login --webA Chrome window opens for manual login. After completing login, press Enter in the terminal.
After login, verify with:
./doubao-cli accountUsage
./doubao-cli "hello" # Quick chat
./doubao-cli image "a cat wearing sunglasses" # Generate image
./doubao-cli translate --to-english "你好" # Translate
./doubao-cli coding "write quicksort" # Coding mode
./doubao-cli math "solve x^2 + 3x - 4 = 0" # Math mode
./doubao-cli help # All commandsAvailable Commands
| Command | Description |
|---------|-------------|
| doubao-cli "message" | Send a message |
| doubao-cli image <desc> | AI image generation |
| doubao-cli translate <text> | Translation |
| doubao-cli coding <prompt> | Code assistant |
| doubao-cli math <problem> | Math solver |
| doubao-cli writing <prompt> | Writing assistant |
| doubao-cli research <topic> | Deep research |
| doubao-cli ppt <topic> | PPT generation |
| doubao-cli login | Login (interactive) |
| doubao-cli login --web | Login (browser) |
| doubao-cli list | List conversations |
| doubao-cli new | New conversation |
| doubao-cli last | Last response |
| doubao-cli retry | Regenerate response |
| doubao-cli account | Account info |
How It Works
doubao-cli uses bb-browser to drive a local Chrome instance via the Chrome DevTools Protocol. It operates entirely within your own browser session — no API keys, no third-party servers, no data leaves your machine.
Disclaimer
This project is created for educational and personal learning purposes only.
It is a browser automation tool that helps users interact with their own web sessions via the command line. It does not bypass authentication, scrape data at scale, or access any non-public APIs.
The name "doubao" refers to the Doubao web application for identification purposes only. This project is not affiliated with, endorsed by, or connected to ByteDance or the Doubao team.
Users are solely responsible for ensuring their use complies with the terms of service of any web platform.
License
This project is licensed under CC BY-NC 4.0. Commercial use is not permitted.
