@neonwatty/youtube-cli
v1.0.0
Published
CLI tool for uploading and managing YouTube Shorts
Maintainers
Readme
youtube-cli
CLI tool for managing YouTube Shorts.
Setup
Google Cloud Setup
- Create a project at Google Cloud Console
- Enable YouTube Data API v3
- Create OAuth 2.0 credentials (Web application type)
- Add
http://localhost:3000as authorized redirect URI
Requirements
- Node.js 18+
yt-dlp(for clone command):brew install yt-dlpffmpeg(for validation):brew install ffmpeg
Installation
make installOr manually:
npm install
npm run build
npm linkSecrets Configuration
Option A: Doppler (Recommended)
# Connect to Doppler project
make doppler-connect
# Run commands (secrets auto-injected)
make auth
make list ARGS="--max 20"Option B: Local .env File
cp .env.example .env
# Edit .env with your credentialsOption C: Local client_secrets.json
Download OAuth credentials from Google Cloud Console as client_secrets.json.
Commands
youtube auth
Authenticate with YouTube (required before other commands).
youtube list [options]
List your channel's videos.
| Option | Description |
| -------------------- | ------------------------------------ |
| --max, -n <num> | Max videos to show (default: 10) |
| --privacy <status> | Filter: public, private, unlisted |
| --format <type> | Output: table, json (default: table) |
youtube list
youtube list --max 20 --format json
youtube list --privacy publicyoutube upload <file> [options]
Upload a video as a YouTube Short.
| Option | Description |
| -------------------------- | -------------------------------------------- |
| --title, -t <title> | Video title (required) |
| --description, -d <desc> | Video description |
| --tags <t1,t2,...> | Comma-separated tags |
| --privacy <status> | public, private, unlisted (default: private) |
| --skip-validation | Skip Shorts requirements check |
| --force | Upload even if validation fails |
youtube upload video.mp4 --title "My Short"
youtube upload video.mp4 -t "Gaming Clip" -d "Epic moment" --tags gaming,clips --privacy publicyoutube update <video-id> [options]
Update metadata on an existing video.
| Option | Description |
| -------------------------- | --------------------- |
| --title, -t <title> | New title |
| --description, -d <desc> | New description |
| --tags <t1,t2,...> | Replace tags |
| --privacy <status> | Change privacy status |
youtube update abc123 --title "New Title"
youtube update abc123 --privacy unlisted
youtube update abc123 -t "Title" -d "Description" --tags tag1,tag2youtube clone <video-id> [options]
Download a video and re-upload with new metadata.
| Option | Description |
| -------------------------- | ---------------------------------- |
| --title, -t <title> | Title for clone (required) |
| --description, -d <desc> | Description (defaults to original) |
| --tags <t1,t2,...> | Tags (defaults to original) |
| --privacy <status> | Privacy (default: private) |
| --keep-file | Keep downloaded video file |
youtube clone abc123 --title "Cloned Video"
youtube clone abc123 -t "New Version" --privacy public --keep-fileyoutube validate <file>
Check if a video meets YouTube Shorts requirements (duration, aspect ratio).
youtube validate video.mp4