Skip to content

Commit 67da19f

Browse files
committed
📝 Add Chinese README
1 parent 82d1353 commit 67da19f

File tree

11 files changed

+250
-7
lines changed

11 files changed

+250
-7
lines changed

README.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
![Yutu](./asset/yutu.svg)
1+
![Yutu](./assets/yutu.svg)
22

33
# `yutu`
44

@@ -22,9 +22,9 @@
2222

2323
[![yutu - build a fully automated YouTube Channel!](https://api.producthunt.com/widgets/embed-image/v1/featured.svg?post_id=988886&theme=light)](https://www.producthunt.com/posts/yutu?embed=true&utm_source=badge-featured&utm_medium=badge&utm_souce=badge-yutu)
2424

25-
`yutu` is a fully functional MCP server and CLI for YouTube to automate your YouTube workflows. It can manipulate almost all YouTube resources, like videos, playlists, channels, comments, captions, and more.
25+
`yutu` is a fully functional MCP server and CLI for YouTube to automate your YouTube workflows. It can manipulate almost all YouTube resources, like videos, playlists, channels, comments, captions, and more. [中文文档](./README_zh.md)
2626

27-
[![mcp demo](./asset/mcp-demo.gif)](https://asciinema.org/a/wXIHU4ciFBAKrHfaFNkMoIs12)
27+
[![mcp demo](./assets/mcp-demo.gif)](https://asciinema.org/a/wXIHU4ciFBAKrHfaFNkMoIs12)
2828

2929
## Table of Contents
3030

@@ -160,7 +160,7 @@ Verify the integrity and provenance of `yutu` using its associated cryptographic
160160
## MCP Server
161161

162162
[![Install in VS Code](https://img.shields.io/badge/VS_Code-Install_Server-0098FF?style=for-the-badge&logo=visualstudiocode&logoColor=white)](https://insiders.vscode.dev/redirect/mcp/install?name=yutu&config=%7B%22type%22%3A%20%22stdio%22%2C%22command%22%3A%20%22yutu%22%2C%22args%22%3A%20%5B%22mcp%22%5D%2C%22env%22%3A%20%7B%22YUTU_CREDENTIAL%22%3A%20%22%2Fabsolute%2Fpath%2Fto%2Fclient_secret.json%22%2C%22YUTU_CACHE_TOKEN%22%3A%20%22%2Fabsolute%2Fpath%2Fto%2Fyoutube.token.json%22%7D%7D)
163-
[![Install MCP Server](https://cursor.com/deeplink/mcp-install-light.svg)](https://cursor.com/install-mcp?name=yutu&config=JTdCJTIyY29tbWFuZCUyMiUzQSUyMnl1dHUlMjBtY3AlMjIlMkMlMjJlbnYlMjIlM0ElN0IlMjJZVVRVX0NSRURFTlRJQUwlMjIlM0ElMjIlMkZhYnNvbHV0ZSUyRnBhdGglMkZ0byUyRmNsaWVudF9zZWNyZXQuanNvbiUyMiUyQyUyMllVVFVfQ0FDSEVfVE9LRU4lMjIlM0ElMjIlMkZhYnNvbHV0ZSUyRnBhdGglMkZ0byUyRnlvdXR1YmUudG9rZW4uanNvbiUyMiU3RCU3RA%3D%3D)
163+
[![Install in Cursor](https://cursor.com/deeplink/mcp-install-light.svg)](https://cursor.com/install-mcp?name=yutu&config=JTdCJTIyY29tbWFuZCUyMiUzQSUyMnl1dHUlMjBtY3AlMjIlMkMlMjJlbnYlMjIlM0ElN0IlMjJZVVRVX0NSRURFTlRJQUwlMjIlM0ElMjIlMkZhYnNvbHV0ZSUyRnBhdGglMkZ0byUyRmNsaWVudF9zZWNyZXQuanNvbiUyMiUyQyUyMllVVFVfQ0FDSEVfVE9LRU4lMjIlM0ElMjIlMkZhYnNvbHV0ZSUyRnBhdGglMkZ0byUyRnlvdXR1YmUudG9rZW4uanNvbiUyMiU3RCU3RA%3D%3D)
164164

165165
As a [MCP server](https://modelcontextprotocol.io/introduction), `yutu` can be used in MCP clients like [Claude Desktop](https://modelcontextprotocol.io/quickstart/user), [VS Code](https://code.visualstudio.com/) or [Cursor](https://docs.cursor.com/), which allows you to interact with YouTube resources in a chat-like interface.
166166

@@ -187,7 +187,8 @@ You can add `yutu` as a MCP server in VS Code or Cursor by clicking correspondin
187187
## Usage
188188

189189
```shell
190-
❯ yutu is a fully functional MCP server and CLI for YouTube, which can manipulate almost all YouTube resources
190+
❯ yutu
191+
yutu is a fully functional MCP server and CLI for YouTube, which can manipulate almost all YouTube resources
191192

192193
Usage:
193194
yutu [flags]
@@ -230,11 +231,11 @@ Use "yutu [command] --help" for more information about a command.
230231
231232
## Features
232233
233-
Please refer to [FEATURES.md](./FEATURES.md) for more information.
234+
Please refer to [FEATURES.md](docs/FEATURES.md) for more information.
234235
235236
## Contributing
236237
237-
Please refer to [CONTRIBUTING.md](./CONTRIBUTING.md) for more information.
238+
Please refer to [CONTRIBUTING.md](docs/CONTRIBUTING.md) for more information.
238239
239240
## Star History
240241

README_zh.md

Lines changed: 242 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,242 @@
1+
![Yutu](./assets/yutu.svg)
2+
3+
# `yutu`
4+
5+
[![Static Badge](https://img.shields.io/badge/gitmoji-%F0%9F%98%BF%F0%9F%90%B0%F0%9F%90%A7%E2%9D%A4%EF%B8%8F%E2%80%8D%F0%9F%A9%B9-love?style=flat-square&labelColor=%23EDD1CC&color=%23FF919F)](https://gitmoji.dev)
6+
[![Go Report Card](https://goreportcard.com/badge/github.com/eat-pray-ai/yutu?style=flat-square)](https://goreportcard.com/report/github.com/eat-pray-ai/yutu)
7+
[![GitHub License](https://img.shields.io/github/license/eat-pray-ai/yutu?style=flat-square)](https://github.com/eat-pray-ai/yutu?tab=Apache-2.0-1-ov-file)
8+
[![Go Reference](https://pkg.go.dev/badge/github.com/eat-pray-ai/yutu?style=flat-square)](https://pkg.go.dev/github.com/eat-pray-ai/yutu)
9+
[![Go Coverage](https://github.com/eat-pray-ai/yutu/wiki/coverage.svg)](https://raw.githack.com/wiki/eat-pray-ai/yutu/coverage.html)
10+
11+
[![GitHub Repo stars](https://img.shields.io/github/stars/eat-pray-ai/yutu?style=flat-square&logo=github)](https://github.com/eat-pray-ai/yutu/stargazers)
12+
[![GitHub Downloads](https://img.shields.io/github/downloads/eat-pray-ai/yutu/total?style=flat-square)](https://github.com/eat-pray-ai/yutu/releases/latest)
13+
[![GitHub Actions build Status](https://img.shields.io/github/actions/workflow/status/eat-pray-ai/yutu/publish.yml?style=flat-square&logo=githubactions)](https://github.com/eat-pray-ai/yutu/actions/workflows/publish.yml)
14+
[![GitHub Actions CodeQL Status](https://img.shields.io/github/actions/workflow/status/eat-pray-ai/yutu/codeql.yml?style=flat-square&logo=githubactions&label=CodeQL)](https://github.com/eat-pray-ai/yutu/actions/workflows/codeql.yml)
15+
[![GitHub Actions test Status](https://img.shields.io/github/actions/workflow/status/eat-pray-ai/yutu/test.yml?style=flat-square&logo=githubactions&label=test)](https://github.com/eat-pray-ai/yutu/actions/workflows/test.yml)
16+
[![Trust Score](https://archestra.ai/mcp-catalog/api/badge/quality/eat-pray-ai/yutu)](https://archestra.ai/mcp-catalog/eat-pray-ai__yutu)
17+
18+
[![GitHub Release](https://img.shields.io/github/v/release/eat-pray-ai/yutu?sort=semver&style=flat-square&logo=go)](https://github.com/eat-pray-ai/yutu/releases/latest)
19+
[![Homebrew Formula Version](https://img.shields.io/homebrew/v/yutu?style=flat-square&logo=homebrew)](https://formulae.brew.sh/formula/yutu)
20+
[![WinGet Package Version](https://img.shields.io/winget/v/eat-pray-ai.yutu?style=flat-square&label=%F0%9F%93%A6%20winget
21+
)](https://winstall.app/apps/eat-pray-ai.yutu)
22+
23+
[![yutu - build a fully automated YouTube Channel!](https://api.producthunt.com/widgets/embed-image/v1/featured.svg?post_id=988886&theme=light)](https://www.producthunt.com/posts/yutu?embed=true&utm_source=badge-featured&utm_medium=badge&utm_souce=badge-yutu)
24+
25+
`yutu` 是一个全功能的 MCP 服务器和 YouTube CLI 工具,用于自动化您的 YouTube 工作流程。它可以操作几乎所有的 YouTube 资源,如视频、播放列表、频道、评论、字幕等。
26+
27+
[![mcp demo](./assets/mcp-demo.gif)](https://asciinema.org/a/wXIHU4ciFBAKrHfaFNkMoIs12)
28+
29+
## 目录
30+
31+
- [前提条件](#前提条件)
32+
- [安装](#安装)
33+
- [GitHub Actions](#github-actions)
34+
- [Docker](#docker)
35+
- [Gopher](#gopher)
36+
- [Linux](#linux)
37+
- [macOS](#macos)
38+
- [Windows](#windows)
39+
- [验证安装](#验证安装)
40+
- [MCP 服务器](#mcp-服务器)
41+
- [使用方法](#使用方法)
42+
- [功能特性](#功能特性)
43+
- [贡献](#贡献)
44+
45+
## 前提条件
46+
47+
开始之前,您需要在 [Google Cloud Platform](https://console.cloud.google.com/) 上创建一个账户来创建**项目**,并为该项目启用以下 API,位置在 `APIs & Services -> Enable APIs and services -> + ENABLE APIS AND SERVICES`
48+
49+
- [YouTube Data API v3(必需)](https://console.cloud.google.com/apis/api/youtubeanalytics.googleapis.com/overview)
50+
- [YouTube Analytics API(可选)](https://console.cloud.google.com/apis/api/youtubeanalytics.googleapis.com/overview)
51+
- [YouTube Reporting API(可选)](https://console.cloud.google.com/apis/api/youtubereporting.googleapis.com/overview)
52+
53+
启用 API 后,创建一个 `OAuth content screen`,将您自己设置为测试用户,然后创建一个类型为 `Web Application``OAuth Client ID`,将 `http://localhost:8216` 作为重定向 URI。
54+
55+
将此凭据下载到本地机器,命名为 `client_secret.json`,它应该看起来像这样:
56+
57+
```json
58+
{
59+
"web": {
60+
"client_id": "11181119.apps.googleusercontent.com",
61+
"project_id": "yutu-11181119",
62+
"auth_uri": "https://accounts.google.com/o/oauth2/auth",
63+
"token_uri": "https://oauth2.googleapis.com/token",
64+
"auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
65+
"client_secret": "XXXXXXXXXXXXXXXX",
66+
"redirect_uris": [
67+
"http://localhost:8216"
68+
]
69+
}
70+
}
71+
```
72+
73+
要验证此凭据,请运行以下命令:
74+
75+
```shell
76+
❯ yutu auth --credential client_secret.json
77+
```
78+
79+
浏览器窗口将打开,要求您授权访问您的 YouTube 账户。授权后,将生成一个令牌并保存到 `youtube.token.json`
80+
81+
```json
82+
{
83+
"access_token": "ya29.XXXXXXXXX",
84+
"token_type":"Bearer",
85+
"refresh_token":"1//XXXXXXXXXX",
86+
"expiry":"2024-05-26T18:49:56.1911165+08:00"
87+
}
88+
```
89+
90+
默认情况下,`yutu` 将从当前目录读取 `client_secret.json``youtube.token.json``--credential/-c``--cacheToken/-t` 标志仅在 `auth` 子命令中可用。要在所有子命令中修改默认路径,请设置这些环境变量:
91+
92+
```shell
93+
export YUTU_CREDENTIAL=client_secret.json
94+
export YUTU_CACHE_TOKEN=youtube.token.json
95+
#
96+
❯ YUTU_CREDENTIAL=client_secret.json YUTU_CACHE_TOKEN=youtube.token.json yutu subcommand --flag value
97+
```
98+
99+
## 安装
100+
101+
您可以直接从[发布页面](https://github.com/eat-pray-ai/yutu/releases/latest)下载 `yutu`,或使用以下您喜欢的方法。
102+
103+
### GitHub Actions
104+
105+
yutu 有两个可用的 action,一个是通用 action,另一个专用于上传视频到 YouTube。更多信息请参考 [youtube-action](https://github.com/eat-pray-ai/youtube-action)[youtube-uploader](https://github.com/eat-pray-ai/youtube-uploader)
106+
107+
### Docker
108+
109+
```shell
110+
❯ docker pull ghcr.io/eat-pray-ai/yutu:latest
111+
❯ docker run --rm ghcr.io/eat-pray-ai/yutu:latest
112+
# 确保 client_secret.json 在当前目录中
113+
❯ docker run --rm -it -u $(id -u):$(id -g) -v $(pwd):/app ghcr.io/eat-pray-ai/yutu:latest auth
114+
```
115+
116+
### Gopher
117+
118+
```shell
119+
❯ go install github.com/eat-pray-ai/yutu@latest
120+
```
121+
122+
### Linux
123+
124+
```shell
125+
❯ curl -sSfL https://raw.githubusercontent.com/eat-pray-ai/yutu/main/scripts/install.sh | bash
126+
```
127+
128+
### macOS
129+
130+
使用 [Homebrew🍺](https://brew.sh/) 安装 `yutu`(推荐),或运行 shell 脚本。
131+
132+
```shell
133+
❯ brew install yutu
134+
135+
#
136+
❯ curl -sSfL https://raw.githubusercontent.com/eat-pray-ai/yutu/main/scripts/install.sh | bash
137+
```
138+
139+
### Windows
140+
141+
```shell
142+
❯ winget install yutu
143+
```
144+
145+
### 验证安装
146+
147+
使用其关联的加密签名证明来验证 `yutu` 的完整性和来源。
148+
149+
```shell
150+
# Docker
151+
❯ gh attestation verify oci://ghcr.io/eat-pray-ai/yutu:latest --repo eat-pray-ai/yutu
152+
153+
# Linux 和 macOS(如果使用 shell 脚本安装)
154+
❯ gh attestation verify $(which yutu) --repo eat-pray-ai/yutu
155+
156+
# Windows
157+
❯ gh attestation verify $(where.exe yutu.exe) --repo eat-pray-ai/yutu
158+
```
159+
160+
## MCP 服务器
161+
162+
[![在 VS Code 中安装](https://img.shields.io/badge/VS_Code-Install_Server-0098FF?style=for-the-badge&logo=visualstudiocode&logoColor=white)](https://insiders.vscode.dev/redirect/mcp/install?name=yutu&config=%7B%22type%22%3A%20%22stdio%22%2C%22command%22%3A%20%22yutu%22%2C%22args%22%3A%20%5B%22mcp%22%5D%2C%22env%22%3A%20%7B%22YUTU_CREDENTIAL%22%3A%20%22%2Fabsolute%2Fpath%2Fto%2Fclient_secret.json%22%2C%22YUTU_CACHE_TOKEN%22%3A%20%22%2Fabsolute%2Fpath%2Fto%2Fyoutube.token.json%22%7D%7D)
163+
[![在 Cursor 中安装](https://cursor.com/deeplink/mcp-install-light.svg)](https://cursor.com/install-mcp?name=yutu&config=JTdCJTIyY29tbWFuZCUyMiUzQSUyMnl1dHUlMjBtY3AlMjIlMkMlMjJlbnYlMjIlM0ElN0IlMjJZVVRVX0NSRURFTlRJQUwlMjIlM0ElMjIlMkZhYnNvbHV0ZSUyRnBhdGglMkZ0byUyRmNsaWVudF9zZWNyZXQuanNvbiUyMiUyQyUyMllVVFVfQ0FDSEVfVE9LRU4lMjIlM0ElMjIlMkZhYnNvbHV0ZSUyRnBhdGglMkZ0byUyRnlvdXR1YmUudG9rZW4uanNvbiUyMiU3RCU3RA%3D%3D)
164+
165+
作为一个 [MCP 服务器](https://modelcontextprotocol.io/introduction)`yutu` 可以在 MCP 客户端中使用,如 [Claude Desktop](https://modelcontextprotocol.io/quickstart/user)[VS Code](https://code.visualstudio.com/)[Cursor](https://docs.cursor.com/) 等,这允许您通过聊天的形式与 YouTube 资源进行交互。
166+
167+
在将 `yutu` 用作 MCP 服务器之前,请确保已安装 `yutu`(参见[安装](#安装)部分),并且您有有效的 `client_secret.json``youtube.token.json` 文件(参考[前提条件](#前提条件)部分)。
168+
169+
您可以通过点击上面相应的徽章将 `yutu` 添加为 VS Code 或 Cursor 中的 MCP 服务器,或手动将以下配置添加到您的 MCP 客户端。记得将 `YUTU_CREDENTIAL``YUTU_CACHE_TOKEN` 的值替换为您本地机器上的正确路径。
170+
171+
```json
172+
{
173+
"yutu": {
174+
"type": "stdio",
175+
"command": "yutu",
176+
"args": [
177+
"mcp"
178+
],
179+
"env": {
180+
"YUTU_CREDENTIAL": "/absolute/path/to/client_secret.json",
181+
"YUTU_CACHE_TOKEN": "/absolute/path/to/youtube.token.json"
182+
}
183+
}
184+
}
185+
```
186+
187+
## 使用方法
188+
189+
```shell
190+
❯ yutu
191+
yutu is a fully functional MCP server and CLI for YouTube, which can manipulate almost all YouTube resources
192+
193+
Usage:
194+
yutu [flags]
195+
yutu [command]
196+
197+
Available Commands:
198+
activity List YouTube activities
199+
auth Authenticate with YouTube API
200+
caption Manipulate YouTube captions
201+
channel Manipulate YouTube channels
202+
channelBanner Insert Youtube channel banner
203+
channelSection Manipulate YouTube channel sections
204+
comment Manipulate YouTube comments
205+
commentThread Manipulate YouTube comment threads
206+
completion Generate the autocompletion script for the specified shell
207+
help Help about any command
208+
i18nLanguage List YouTube i18n languages
209+
i18nRegion List YouTube i18n regions
210+
mcp Start MCP server
211+
member List channel's members' info
212+
membershipsLevel List memberships levels' info
213+
playlist Manipulate YouTube playlists
214+
playlistImage Manipulate YouTube playlist images
215+
playlistItem Manipulate YouTube playlist items
216+
search Search for YouTube resources
217+
subscription Manipulate YouTube subscriptions
218+
superChatEvent List Super Chat events for a channel
219+
thumbnail Set thumbnail for a video
220+
version Show the version of yutu
221+
video Manipulate YouTube videos
222+
videoAbuseReportReason List YouTube video abuse report reasons
223+
videoCategory List YouTube video categories
224+
watermark Manipulate YouTube watermarks
225+
226+
Flags:
227+
-h, --help help for yutu
228+
229+
Use "yutu [command] --help" for more information about a command.
230+
```
231+
232+
## 功能特性
233+
234+
请参考 [FEATURES.md](docs/FEATURES.md) 获取更多信息。
235+
236+
## 贡献
237+
238+
请参考 [CONTRIBUTING.md](docs/CONTRIBUTING.md) 获取更多信息。
239+
240+
## Star 历史
241+
242+
[![Star History Chart](https://api.star-history.com/svg?repos=eat-pray-ai/yutu&type=Date)](https://star-history.com/#eat-pray-ai/yutu&Date)
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)