nerveband

YouTube API CLI

開発v1.0.2
作者:nerveband更新日 2026-05-11全 3 バージョン · 最新版の公開日 2026-01-27yt-api-cli@clawhub_nerveband/yt-api-cli
バックエンド開発スクリプトツール

AlphaMoatによると、2026-09時点でYouTube API CLIのダウンロード数は4,002、スター数は3で、AIスキル全体5,078件中2,557位、開発では577件中336位です。

インストール数
422
ダウンロード数
4002
スター数
3
総合順位
#2,557
全体の上位 51% · 開発の上位 59%
プラットフォームインストール数ダウンロード数スター数コメント
ClawHub ↗11935383-
SkillHub ↗42240023—

プラットフォームごとに集計方法と集計時点が異なります。

このスキルでできること

動画検索、アカウント一覧、アップロード、再生リスト、チャンネル更新と構造化出力を説明します。有効な Google Cloud 認証と API 有効化が必要です。変更前に権限と事前検証を確認し、認証例が全アカウントに対応するとは限りません。

資料公開日 2026-10-27

できること

  • チャンネルを調べ、リストや投稿操作を準備する

使う場面

  • 許可された YouTube リソースを管理するとき

プロンプト例

スキルのドキュメントをもとに生成した例であり、実際の実行結果ではありません。

再生リストを示し、変更をプレビューして。アップロードや公開はしないで。

月次の推移

ダウンロード数4002
2823345640892026-03 · ダウンロード数 29102026-05 · ダウンロード数 31112026-06 · ダウンロード数 31662026-07 · ダウンロード数 33992026-08 · ダウンロード数 34812026-09 · ダウンロード数 400226-0326-09
スター数3
2342026-03 · スター数 32026-05 · スター数 32026-06 · スター数 32026-07 · スター数 32026-08 · スター数 32026-09 · スター数 326-0326-09

2026-09 から集計方法を変更し、同名スキルを作者ごとに分けて集計し、全スキルを対象にしました。破線は変更前の月で、変更後のデータとは直接比較せず、変更をまたぐ増減も計算していません。

月ダウンロード数前月比スター数
2026-094002—3
2026-083481+2.4%3
2026-073399+7.4%3
2026-063166+1.8%3
2026-053111—3
2026-032910—3

SKILL.md 原文

作者が公開した元のファイルをテキストのまま表示しています。AlphaMoat による編集や審査はしていません。リンクはクリックできません。コマンドは内容を確認してから実行してください。取得日 2026-10-23。

4.5 KB・ClawHub v1.0.2
---
name: yt-api-cli
description: Manage your YouTube account from the command line. Complete CLI for YouTube Data API v3 - list/search videos, upload, manage playlists, and more.
metadata: {"clawdbot":{"emoji":"▶️","os":["darwin","linux"],"requires":{"env":["YT_API_AUTH_TYPE", "YT_API_CLIENT_ID", "YT_API_CLIENT_SECRET"]}}}
---

# yt-api-cli

Manage your YouTube account from the terminal. A complete CLI for the YouTube Data API v3.
すべて表示(全 202 行)
## Installation

```bash
# Using go install
go install github.com/nerveband/youtube-api-cli/cmd/yt-api@latest

# Or download from releases
curl -L -o yt-api https://github.com/nerveband/youtube-api-cli/releases/latest/download/yt-api-darwin-arm64
chmod +x yt-api
sudo mv yt-api /usr/local/bin/
```

## Setup

### 1. Google Cloud Console Setup

1. Go to [Google Cloud Console](https://console.cloud.google.com)
2. Create/enable YouTube Data API v3
3. Create OAuth 2.0 credentials (Desktop app)
4. Download client configuration

### 2. Configure yt-api

```bash
mkdir -p ~/.yt-api
cat > ~/.yt-api/config.yaml << EOF
default_auth: oauth
default_output: json
oauth:
  client_id: "YOUR_CLIENT_ID"
  client_secret: "YOUR_CLIENT_SECRET"
EOF
```

### 3. Authenticate

```bash
yt-api auth login  # Opens browser for Google login
yt-api auth status # Check auth state
```

## Commands

### List Operations

```bash
# List your videos
yt-api list videos --mine

# List channel videos
yt-api list videos --channel-id UC_x5XG1OV2P6uZZ5FSM9Ttw

# List playlists
yt-api list playlists --mine

# List subscriptions
yt-api list subscriptions --mine
```

### Search

```bash
# Basic search
yt-api search --query "golang tutorial"

# With filters
yt-api search --query "music" --type video --duration medium --order viewCount
```

### Upload Operations

```bash
# Upload video
yt-api upload video ./video.mp4 \
  --title "My Video" \
  --description "Description here" \
  --tags "tag1,tag2" \
  --privacy public

# Upload thumbnail
yt-api upload thumbnail ./thumb.jpg --video-id VIDEO_ID
```

### Playlist Management

```bash
# Create playlist
yt-api insert playlist --title "My Playlist" --privacy private

# Add video to playlist
yt-api insert playlist-item --playlist-id PLxxx --video-id VIDxxx
```

### Channel Operations

```bash
# Get channel info
yt-api list channels --id UCxxx --part snippet,statistics

# Update channel description
yt-api update channel --id UCxxx --description "New description"
```

## Output Formats

```bash
# JSON (default - LLM-friendly)
yt-api list videos --mine

# Table (human-readable)
yt-api list videos --mine -o table

# YAML
yt-api list videos --mine -o yaml

# CSV
yt-api list videos --mine -o csv > videos.csv
```

## Global Flags

| Flag | Short | Description |
|------|-------|-------------|
| `--output` | `-o` | Output format: json (default), yaml, csv, table |
| `--quiet` | `-q` | Suppress stderr messages |
| `--config` | | Path to config file |
| `--auth-type` | | Auth method: oauth (default), service-account |

## Environment Variables

| Variable | Description |
|----------|-------------|
| `YT_API_AUTH_TYPE` | Auth method: oauth or service-account |
| `YT_API_OUTPUT` | Default output format |
| `YT_API_CLIENT_ID` | OAuth client ID |
| `YT_API_CLIENT_SECRET` | OAuth client secret |
| `YT_API_CREDENTIALS` | Path to service account JSON |

## Authentication Methods

### OAuth 2.0 (Default)
Best for interactive use and accessing your own YouTube account.

```bash
yt-api auth login  # Opens browser
```

### Service Account
Best for server-side automation.

```bash
yt-api --auth-type service-account --credentials ./key.json list videos
```

## Quick Diagnostic Commands

```bash
yt-api info                      # Full system state
yt-api info --test-connectivity  # Verify API access
yt-api info --test-permissions   # Check credential capabilities
yt-api auth status               # Authentication details
yt-api version                   # Version info
```

## Error Handling

Exit codes:
- `0` - Success
- `1` - General error
- `2` - Authentication error
- `3` - API error (quota, permissions)
- `4` - Input error

## For LLMs and Automation

- JSON output by default
- Structured errors as JSON objects
- `--quiet` mode for parsing
- `--dry-run` validates without executing
- Stdin support for piping data

## Notes

- Requires valid Google Cloud credentials with YouTube Data API v3 enabled
- OAuth tokens stored in `~/.yt-api/tokens.json` (0600 permissions)
- Default output is JSON (LLM-optimized)
- Supports all YouTube Data API v3 resources

## Source

GitHub: https://github.com/nerveband/youtube-api-cli

開発の人気スキル

データ月:2026-09 · ダウンロード数、スター数、インストール数は公開スキルレジストリ(ClawHub、SkillHub)から月単位で集計しています。詳しくはデータの方法論をご覧ください。