Growth-oriented YouTube analytics from your terminal.
- Channel overview — subscribers, views, and video count at a glance
- Analytics dashboard — views, watch time, subscribers, revenue over any period
- Video deep dive — packaging, retention, engagement, growth, monetization, and audience breakdown for a single video
- Diagnostics — automated insights (CTR, retention, sub conversion) with actionable recommendations
- Top videos — rank videos by any metric (views, revenue, likes, etc.)
- Multi-account — manage multiple YouTube channels with named aliases
- Flexible output — colored tables (default), JSON (
--json), or plain TSV (--plain) - Custom queries — arbitrary metrics, dimensions, filters, and sorting
go install github.com/shubs/youtube-analytics-cli/cmd/yt@latestgit clone https://github.com/shubs/youtube-analytics-cli.git
cd youtube-analytics-cli
make build
# Binary is at ./bin/ytYou need Google Cloud OAuth 2.0 credentials with the YouTube Analytics and YouTube Data API enabled. See CONTRIBUTING.md for details.
yt auth setup <CLIENT_ID> <CLIENT_SECRET>yt auth loginThis opens your browser for OAuth consent. The token is stored securely in your system keyring.
# Channel overview
yt channel
# Last 28 days analytics
yt analytics overview
# Last 7 days
yt analytics overview --since 7d
# Top 10 videos by views
yt videos top --since 90d
# Deep dive on a specific video
yt video <VIDEO_ID>
# Revenue breakdown by country
yt analytics revenue -d country --since 90d
# Output as JSON
yt analytics overview --json| Command | Description |
|---|---|
yt auth setup |
Configure OAuth client credentials |
yt auth login [alias] |
Authenticate with YouTube |
yt auth logout <alias> |
Remove stored credentials |
yt auth list |
List configured accounts |
yt auth status |
Show authentication status |
yt channel |
Show channel information |
yt channel stats |
Channel stats with period comparison |
yt analytics overview |
Key metrics overview |
yt analytics query |
Custom analytics query |
yt analytics revenue |
Revenue breakdown |
yt analytics demographics |
Age and gender demographics |
yt analytics traffic |
Traffic source breakdown |
yt videos list |
List recent videos |
yt videos top |
Top videos by metric |
yt video <ID> |
Deep dive dashboard for a video |
yt version |
Show version information |
- Go 1.24+
- Google Cloud project with OAuth 2.0 credentials (Desktop app type)
- APIs enabled: YouTube Data API v3 and YouTube Analytics API