# Send YouTube API CLI to your agent
Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.
## Fast path
- Download the package from Yavira.
- Extract it into a folder your agent can access.
- Paste one of the prompts below and point your agent at the extracted folder.
## Suggested prompts
### New install

```text
I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete.
```
### Upgrade existing

```text
I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run.
```
## Machine-readable fields
```json
{
  "schemaVersion": "1.0",
  "item": {
    "slug": "yt-api-cli",
    "name": "YouTube API CLI",
    "source": "tencent",
    "type": "skill",
    "category": "开发工具",
    "sourceUrl": "https://clawhub.ai/nerveband/yt-api-cli",
    "canonicalUrl": "https://clawhub.ai/nerveband/yt-api-cli",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadUrl": "/downloads/yt-api-cli",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=yt-api-cli",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "packageFormat": "ZIP package",
    "primaryDoc": "SKILL.md",
    "includedAssets": [
      "SKILL.md"
    ],
    "downloadMode": "redirect",
    "sourceHealth": {
      "source": "tencent",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-05-07T17:22:31.273Z",
      "expiresAt": "2026-05-14T17:22:31.273Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=afrexai-annual-report",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=afrexai-annual-report",
        "contentDisposition": "attachment; filename=\"afrexai-annual-report-1.0.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null
      },
      "scope": "source",
      "summary": "Source download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this source.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/yt-api-cli"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    }
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/yt-api-cli",
    "downloadUrl": "https://openagent3.xyz/downloads/yt-api-cli",
    "agentUrl": "https://openagent3.xyz/skills/yt-api-cli/agent",
    "manifestUrl": "https://openagent3.xyz/skills/yt-api-cli/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/yt-api-cli/agent.md"
  }
}
```
## Documentation

### yt-api-cli

Manage your YouTube account from the terminal. A complete CLI for the YouTube Data API v3.

### Installation

# 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/

### 1. Google Cloud Console Setup

Go to Google Cloud Console
Create/enable YouTube Data API v3
Create OAuth 2.0 credentials (Desktop app)
Download client configuration

### 2. Configure yt-api

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

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

### List Operations

# 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

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

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

### Upload Operations

# 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

# 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

# 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

# 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

FlagShortDescription--output-oOutput format: json (default), yaml, csv, table--quiet-qSuppress stderr messages--configPath to config file--auth-typeAuth method: oauth (default), service-account

### Environment Variables

VariableDescriptionYT_API_AUTH_TYPEAuth method: oauth or service-accountYT_API_OUTPUTDefault output formatYT_API_CLIENT_IDOAuth client IDYT_API_CLIENT_SECRETOAuth client secretYT_API_CREDENTIALSPath to service account JSON

### OAuth 2.0 (Default)

Best for interactive use and accessing your own YouTube account.

yt-api auth login  # Opens browser

### Service Account

Best for server-side automation.

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

### Quick Diagnostic Commands

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
## Trust
- Source: tencent
- Verification: Indexed source record
- Publisher: nerveband
- Version: 1.0.2
## Source health
- Status: healthy
- Source download looks usable.
- Yavira can redirect you to the upstream package for this source.
- Health scope: source
- Reason: direct_download_ok
- Checked at: 2026-05-07T17:22:31.273Z
- Expires at: 2026-05-14T17:22:31.273Z
- Recommended action: Download for OpenClaw
## Links
- [Detail page](https://openagent3.xyz/skills/yt-api-cli)
- [Send to Agent page](https://openagent3.xyz/skills/yt-api-cli/agent)
- [JSON manifest](https://openagent3.xyz/skills/yt-api-cli/agent.json)
- [Markdown brief](https://openagent3.xyz/skills/yt-api-cli/agent.md)
- [Download page](https://openagent3.xyz/downloads/yt-api-cli)