nerveband

YouTube API CLI

Developmentv1.0.2
By nervebandUpdated 2026-05-113 versions · latest released 2026-01-27yt-api-cli@clawhub_nerveband/yt-api-cli
BackendScripting

According to AlphaMoat, as of 2026-09, YouTube API CLI has 4,002 downloads and 3 stars — ranked #2,557 of 5,078 AI skills overall, and #336 of 577 in Development.

Installs
422
Downloads
4.0K
Stars
3
Overall Rank
#2,557
Top 51% overall · Top 59% in Development
PlatformInstallsDownloadsStarsComments
ClawHub ↗1193.5K3-
SkillHub ↗4224.0K3—

Platforms count differently and update at different times.

What this skill does

It documents video search, account listings, uploads, playlists and channel updates with structured output. Valid Google Cloud credentials and enabled YouTube API access are required. Check permissions and use dry-run before requested changes; authentication examples do not guarantee account compatibility.

Profile published 2026-10-27

What you can do with it

  • Inspect a channel or prepare playlist and upload operations

When to use it

  • When managing authorized YouTube resources

Example prompts

Generated from the skill’s documentation as examples; not results of actual runs.

List my playlists and preview the requested changes without uploading or publishing.

Monthly Trend

Downloads4.0K
2.8K3.5K4.1K2026-03 · Downloads 2.9K2026-05 · Downloads 3.1K2026-06 · Downloads 3.2K2026-07 · Downloads 3.4K2026-08 · Downloads 3.5K2026-09 · Downloads 4.0K26-0326-09
Stars3
2342026-03 · Stars 32026-05 · Stars 32026-06 · Stars 32026-07 · Stars 32026-08 · Stars 32026-09 · Stars 326-0326-09

The counting method changed in 2026-09: skills with the same name are now counted separately by author, and the full catalog is covered. Dashed lines show months before the change; they are not compared with later months, and no growth is computed across the change.

MonthDownloadsMoMStars
2026-094.0K—3
2026-083.5K+2.4%3
2026-073.4K+7.4%3
2026-063.2K+1.8%3
2026-053.1K—3
2026-032.9K—3

SKILL.md (original)

The author’s original file, shown as plain text without edits or review by AlphaMoat. Links are not clickable; check commands before running them. Fetched 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.
Show all (202 lines)
## 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

Popular in Development

Data month: 2026-09 · Downloads, stars and installs are aggregated monthly from public skill registries (ClawHub, SkillHub). See methodology.