Skip to content

Checking your reading list…

Retry

Stay curious. Build better.

Appearance

Choose how BestHub looks on this device.

Changes apply immediately.

Search articles

Open Discover with these filters

Suggested searches

Reader activity
0 Useful 3 Views 4 min Read — No ratings
Industry Insights
4 min read

Douyin Launches Official CLI: AI Agents Can Now Control Your Account

Douyin's new douyin-open-cli v1.0.4 provides a single 18MB cross-platform binary with nine built-in skills for authentication, video, search, comments, history, and AI avatar management, enabling tools like Claude Code and Codex to interact with Douyin via structured JSON APIs while enforcing user confirmation for write actions.

Douyin Releases Official CLI for AI Agent Integration

Douyin Open Platform has released the official command-line tool douyin-open-cli version 1.0.4, with the accompanying Douyin CLI Open Interface Usage Guide taking effect on December 2, 2026. This follows similar CLI releases from Feishu, DingTalk, and Doubao earlier this year, signaling a trend of major Chinese platforms building command-line entry points specifically for AI agents.

Installation and Architecture

The tool is distributed as a single ~18MB executable covering macOS, Linux, and Windows with no Node.js dependency and no administrator rights required. The installer places the binary in ~/.local/bin and syncs the official skill set to ~/.agents/skills/douyin-open-cli/. Nine skill modules are included: login, video, search, comments, history, and AI avatar (split into avatar and high-code-avatar). The CLI checks for updates every 24 hours and supports automatic upgrades on macOS and Linux.

Douyin official CLI v1.0.4 command overview and auto-installed skill directory structure
Douyin official CLI v1.0.4 command overview and auto-installed skill directory structure

Conversational Authentication Flow

Authentication is redesigned for conversational tools. Running douyin-open-cli auth login --begin generates a local QR code image and outputs its path as qr_image_path. The AI assistant displays the image in the chat; the user scans it with the Douyin app and confirms. A subsequent --complete call retrieves the local credential token.

Data Retrieval via Structured JSON

Video content: video text fetches the video transcript directly via the official API, avoiding manual download and subtitle extraction.

Search: V3 search supports filtering by like count, publish time, and duration.

Comments: Both top-level comments and threaded replies are accessible.

History: Authorized access to the user's own watch and search history.

All responses are structured JSON, making them easy for agents to parse.

Controlled Content Publishing

Write operations are tightly constrained. Users can upload local videos and custom covers up to 300MB, set visibility, and post comments or replies. However, the official skills enforce a confirmation protocol: every write action must first list the actual files, target account, final copy, and cover, and then require an explicit --yes flag to execute. A vague instruction like "help me post" is insufficient, and automatic retries on timeout or unconfirmed results are prohibited.

AI Avatar: Dual-Mode, Three Scenarios, Hot-Switchable

The most notable capability is the AI avatar system, exposed through two command groups: avatar – zero-code hosted mode. high-code-avatar – custom code mode.

Both modes operate across three in-app scenarios: video comment sections, AI chat windows, and private one-on-one messages. Different scenarios can use different modes simultaneously, and switching modes does not require rebuilding the avatar.

Douyin official CLI AI avatar dual-mode comparison and three in-app scenario hot-switch architecture
Douyin official CLI AI avatar dual-mode comparison and three in-app scenario hot-switch architecture

Zero-Code Hosted Mode

The system generates a persona from the user's historical videos. The user records an audio clip ≤8MB to clone their voice.

High-Code Custom Mode

Pull the official Node.js project template.

Customize reply, greeting, and recommendation functions.

Integrate Douyin Ark model endpoints, business knowledge bases, e-commerce product cards, and mini-program cards into the conversation flow.

Test locally, then package as a ZIP ≤20MB and upload.

Cloud deployment takes ~3–5 minutes; the comment section or private messages can then be handed over to the new code.

Quick Start Commands

tmp_dir="$(mktemp -d)"
curl --fail --location --proto '=https' --proto-redir '=https' \
  'https://lf-aihub.douyinpic.com/obj/developer/douyin-open-cli/install.sh' \
  --output "$tmp_dir/install.sh" && sh "$tmp_dir/install.sh"

douyin-open-cli auth login
douyin-open-cli video list --count 10

Windows users can use the PowerShell script from the installation guide or manually verify the ZIP package.

Current Limitations

Marked as an experimental client; some APIs depend on server-side channels and current authorization scope.

Linux ARM64 devices cannot yet use the companion PC device SDK.

AI avatar does not support group chat via CLI.

CLI cannot initiate direct messages or conversations from the terminal; it only handles configuration and deployment. Actual interactions must occur inside the Douyin app.

Security and Permissions

A single QR login requests full permissions for the current CLI version.

The official usage guide states that actions triggered via third-party tools are treated as the user's own actions.

AI-generated content must carry legally required labels.

Authorization can be revoked at any time in Douyin's settings → authorization management.

Reference

Douyin Open CLI Installation Guide: https://lf-aihub.douyinpic.com/obj/developer/douyin-open-cli/douyin-open-cli-installation-guide.md

For attribution, corrections or content rights, contactadmin@besthub.dev

Report an issue with this article

Discussion 0

Write a comment

Sign in to join the discussion

No public comments on this page. Sign in to comment