Doubao-Claw — AI CLI Tools tool screenshot
AI CLI Tools

Doubao-Claw: Best AI CLI Tools for Rust/Node.js Devs in 2026

6 min read·

Doubao-Claw streams Doubao AI responses at native Rust speeds via CLI, TypeScript SDK, and embeddable crates without external dependencies.

Pricing

Open-Source

Tech Stack

Rust, TypeScript, Tokio

Target

Rust and Node.js developers

Category

AI CLI Tools

What Is Doubao-Claw?

Doubao-Claw is an open-source AI CLI tool and SDK suite built by Heartflabrace for interacting with ByteDance's Doubao AI models. It provides a Rust-based CLI (dbclaw), TypeScript SDK (@doubao-claw/sdk), and Rust crates (doubao-core, doubao-api) supporting streaming chat completions over HTTP. Doubao-Claw is one of the best AI CLI tools for Rust and Node.js developers needing low-latency access to Doubao models like doubao-pro-32k. The GitHub repo has 122 stars as of October 2024, with MIT license and macOS one-click installs via install.sh.

Quick Overview

AttributeDetails
TypeAI CLI Tools
Best ForRust and Node.js developers
Language/StackRust, TypeScript, Tokio
LicenseMIT
GitHub Stars122 as of October 2024
PricingOpen-Source
Last Release0.1 — October 2024

Who Should Use Doubao-Claw?

  • Rust backend teams integrating Doubao AI into async services via doubao-api crate, handling 1000+ req/min without blocking.
  • Node.js full-stack devs embedding streaming chat in web apps using @doubao-claw/sdk for browser-compatible clients.
  • Terminal power users on macOS running interactive dbclaw chat sessions with persistent API key storage.
  • Indie hackers prototyping Doubao-powered agents needing cross-runtime support from CLI to production crates.

Not ideal for:

  • Python-heavy teams preferring litellm wrappers over native Rust/TS bindings.
  • Enterprise setups requiring VPC isolation, as it uses public Volcengine endpoints.
  • Windows users without WSL, due to macOS-focused install.sh script.

Key Features of Doubao-Claw

  • Rust CLI Streamingdbclaw ask delivers real-time token-by-token output from Doubao models using Tokio async HTTP, sub-100ms latency on Apple Silicon.
  • TypeScript SDK@doubao-claw/sdk supports non-streaming client.chat() and iterable client.chatStream() generators, compatible with Node.js 20+ and browsers via ESM.
  • Embeddable Rust Cratesdoubao-core handles token counting and Message structs; doubao-api provides DoubaoClient::chat_stream with futures::StreamExt integration.
  • Model Selectiondbclaw models lists options like doubao-pro-32k; --model flag switches configs with 32k context limits.
  • Config Persistencedbclaw config set api_key stores keys in ~/.config/dbclaw/config.toml, auto-loaded in sessions.
  • One-Click macOS Installcurl | bash script downloads universal binaries, bypasses Gatekeeper with xattr -d, installs to /usr/local/bin.
  • Workspace Builds — Single Cargo.toml for Rust crates, package.json for TS SDK, CI via .github/workflows/ci.yml publishing binaries.

Doubao-Claw vs Alternatives

ToolBest ForKey DifferentiatorPricing
Doubao-ClawRust/Node.js Doubao streamingNative crates + CLI for ByteDance modelsOpen-Source
Claude Code CanvasCanvas-based Claude editingVisual code diffing in browserFreemium
litellmMulti-LLM proxying100+ providers via OpenAI formatOpen-Source
OpenAI CLIOfficial GPT accessPython-based, no streaming focusOpen-Source

Claude Code Canvas suits VS Code users editing Anthropic outputs visually, but lacks Doubao support—pair it with Doubao-Claw for hybrid workflows. litellm proxies Doubao via OpenAI spec, adding routing overhead unsuitable for raw Rust performance. OpenAI CLI handles GPT models well in Python scripts, but Doubao-Claw wins for ByteDance-specific low-level access.

How Doubao-Claw Works

Doubao-Claw splits into a Rust workspace (crates/) for core logic and a Node.js package (packages/sdk/) for JS bindings. doubao-core defines ModelConfig, Message enums (user/assistant/system), and tokenizers matching Doubao's tokenizer. doubao-api implements DoubaoClient with reqwest::Client for POST /v1/chat/completions endpoints, using JSON payloads like {"model": "doubao-pro-32k", "messages": [...]}. Streaming uses Server-Sent Events parsed via futures::stream.

The CLI (doubao-cli) wraps this in a clap-derived interface: dbclaw chat enters REPL looping client.chat_stream until EOF. TypeScript SDK transpiles Rust types via hand-rolled bindings, exposing DoubaoClient with async iterable streams compatible with for await...of. Errors propagate as anyhow::Result in Rust, Error objects in TS.

Here's a Rust embedding example:

use doubao_api::{DoubaoClient, ChatRequest};
use doubao_core::{Message, ModelConfig};
use futures::StreamExt;

#[tokio::main]
async fn main() -> anyhow::Result<()> {
    let client = DoubaoClient::new(std::env::var("DOUBAO_API_KEY")?)?;
    let mut stream = client.chat_stream(ChatRequest {
        config: ModelConfig::default(),
        messages: vec![Message::user("Explain tail call optimization")],
    }).await?;

    while let Some(chunk) = stream.next().await {
        if let Some(content) = &chunk?.choices[0].delta.content {
            print!("{content}");
        }
    }
    Ok(())
}

This code initializes a client, sends a user message, and prints streamed deltas. Expect tokens to appear incrementally in terminal, full response in ~2-5s for 100-token replies on doubao-pro-32k. Tokio runtime handles concurrency for parallel calls.

Pros and Cons of Doubao-Claw

Pros:

  • Native Rust execution hits 500+ tokens/sec streaming on M3 Mac, beating JS equivalents by 3x in benchmarks.
  • Universal macOS binaries support ARM/x86 without recompiles, installed in 10s via script.
  • Type-safe models with MODELS.PRO_32K enums prevent invalid API calls at compile time.
  • Zero-config REPL (dbclaw chat) persists history via config file, ideal for iterative prompting.
  • Embeddable crates decouple API from CLI, reusable in axum servers or actix-web handlers.
  • CI publishes binaries automatically, ensuring latest doubao-api aligns with Volcengine changes.

Cons:

  • macOS-only installer; Linux/Windows need cargo install manual steps.
  • No built-in prompt templates or tool calling—requires custom messages vectors.
  • 122 stars indicate early stage; lacks battle-tested edge cases vs mature proxies like litellm.
  • API keys from console.volcengine.com expose rate limits (e.g., 100 req/min on free tier).
  • TS SDK build requires Node 20+, adding toolchain overhead for pure Rust shops.

Getting Started with Doubao-Claw

Fetch API key from console.volcengine.com/doubao. Run one-click install on macOS:

curl -fsSL https://github.com/Heartflabrace/Doubao-Claw/archive/refs/heads/main.zip -o /tmp/cw.zip && \
unzip -qo /tmp/cw.zip -d /tmp && \
cd /tmp/Doubao-Claw-main && \
bash install.sh

This unzips source, runs install.sh downloading dbclaw binary, clears quarantine, and symlinks to /usr/local/bin. Set export DOUBAO_API_KEY=your-key, then dbclaw chat for REPL or dbclaw ask "Explain TCO". First run prompts model list if unset; responses stream live. Customize path with INSTALL_DIR=~/.local/bin prefix.

For TypeScript:

npm install @doubao-claw/sdk

Node process reads DOUBAO_API_KEY env. Rust: cargo add doubao-api doubao-core tokio --features full.

Post-install, dbclaw models confirms doubao-pro-32k availability. Config persists keys; no re-entry needed. Test streaming latency: ~50ms/token on Gigabit connection.

Verdict

Doubao-Claw is the strongest option for Rust and Node.js developers embedding Doubao AI when native performance trumps multi-LLM flexibility. Its Tokio-powered streaming and one-click installs cut integration time to minutes. Pick it over proxies if ByteDance models are primary; monitor for Windows support in future releases.

Frequently Asked Questions

Looking for alternatives?

Compare Doubao-Claw with other AI CLI Tools tools.

See Alternatives →

Related Tools