yutu
以下摘录自该仓库的 README(片段) · 在 GitHub 读完整 README →
yutu is a CLI, MCP server, and AI agent to automate YouTube workflows — from uploading and optimizing videos to managing comments, playlists, and channel branding — and provides a skill for AI agents, so you can get more views, higher click-through rates, and stronger audience engagement with less manual effort. 中文文档
Table of Contents
- Prerequisites
- Installation
- Agent
- MCP Server
- Skills
- Usage
- Features
- Contributing
Prerequisites
An account on Google Cloud Platform is required. Set up the following:
1. **Create a GCP Project** and enable these APIs under APIs & Services -> Enable APIs and services:
- YouTube Data API v3 (Required)
- YouTube Analytics API (Optional)
- YouTube Reporting API (Optional)
2. **Create OAuth credentials**:
- Go to APIs & Services -> OAuth consent screen, create a consent screen with yourself as a test user
- Go to Credentials -> Create Credentials -> OAuth Client ID, select Desktop app
- Download the credential file and save it as client_secret.json, it should look like
3. **Authenticate**:
A browser window will open for you to grant YouTube access. After granting permission, a token is saved to youtube.token.json.
By default, yutu will read client_secret.json and youtube.token.json from the current directory, --credential/-c and --cacheToken/-t flags are available only in auth subcommand. To modify the default path in all subcommands, set these environment variables.
Global Environment Variables
| Variable | Description | Default |
|--------------------|----------------------------------------------|---------------------------|
| YUTU_CREDENTIAL | Path, Base64, or JSON of OAuth client secret | client_secret.json |
| YUTU_CACHE_TOKEN | Path, Base64, or JSON of cached OAuth token | youtube.token.json |
| YUTU_ROOT | Root directory for file resolution | Current working directory |
| YUTU_LOG_LEVEL | Log level: DEBUG, INFO, WARN, ERROR | INFO |
Installation
If you're using an AI agent, copy and paste the following prompt to finish the installation:
You can download yutu from releases page directly, or use the following methods as you prefer.
GitHub Actions
There are two actions available for yutu, one is for general purpose and the other is for uploading video to YouTube. Refer to youtube-action and youtube-uploader for more information.
Node.js
Docker
Gopher
Linux
macOS
Install yutu using Homebrew🍺(recommended), or run the shell script.
Windows
Verifying Installation
Verify the integrity and provenance of yutu using its associated cryptographically signed attestations.
Agent
yutu provides an agent mode (Miffy) to automate YouTube workflows. The agent can retrieve, create, update, and delete YouTube content, with built-in YouTube growth strategy and SEO expertise.
Agent Flags
| Flag | Description | Default |
|---------------------|--------------------------------------------------------------------------------|--------------------------------------------|