🐹 GopherUpload

A simple CLI-based YouTube Video Uploader 🎬 ⬆️ 🚀

Windows | macOS | Linux Go MIT License

What is GopherUpload?

GopherUpload is a lightweight command-line tool that uploads videos to YouTube using the YouTube Data API v3.

📤 Video Uploads

Upload videos with custom metadata directly from your terminal.

📝 Custom Metadata

Set title, description, and tags from a metadata.json file.

🖼️ Custom Thumbnails

Automatically upload thumbnail.png with your video.

📅 Scheduled Publishing

Schedule videos to publish at a specific date and time.

🏷️ Hashtags Support

Automatically append hashtags to your video descriptions.

⚡ Lightweight & Fast

Built with Go for maximum performance and minimal overhead.

Quick Start

Get started in seconds

# 1. Authenticate with Google
gopherupload login

# 2. Upload a video
gopherupload upload "outputs/My Video Folder"

Installation

Prerequisites

Build from Source

# Clone the repository
git clone https://github.com/yourusername/gopherupload.git
cd gopherupload

# Get dependencies
go mod tidy

# Build the application
go build -o gopherupload

# (Optional) Move to PATH
# Windows: move gopherupload.exe to a directory in your PATH
# macOS/Linux: sudo mv gopherupload /usr/local/bin/

Configuration

1. Google OAuth2 Credentials

  1. Go to the Google Cloud Console
  2. Create a new project or select an existing one
  3. Enable the YouTube Data API v3 from the API Library
  4. Go to "Credentials" → "Create Credentials" → "OAuth client ID"
  5. Select "Desktop app" as the application type
  6. Download the credentials JSON file
  7. Save it as client_secrets.json in the GopherUpload directory

2. Application Config (Optional)

Create a config.json file to set upload defaults:

{
  "upload_defaults": {
    "default_privacy": "public",
    "default_category": "22",
    "default_description": "Uploaded with GopherUpload",
    "default_tags": ["video", "upload"]
  }
}

Category IDs

IDCategory
1Film & Animation
2Autos & Vehicles
10Music
15Pets & Animals
17Sports
20Gaming
22People & Blogs (default)
23Comedy
24Entertainment
25News & Politics
26Howto & Style
27Education
28Science & Technology

Usage

Authentication

Before uploading, authenticate with your Google account:

gopherupload login
Note: The token is valid for ~1 hour. Run login again when it expires.

Upload a Video

gopherupload upload <directory>

The directory should contain:

Directory Structure Example

outputs/My Video/
├── My Video.mp4        # Required: video file
├── metadata.json       # Optional: metadata
└── thumbnail.png       # Optional: thumbnail

metadata.json Format

{
  "youtube": {
    "title": "My Awesome Video",
    "description": "This is a great video about...",
    "tags": ["tutorial", "coding", "golang"],
    "hashtags": ["#programming", "#tech"],
    "schedule": {
      "publish_date": "2025-12-31",
      "publish_time": "10:00"
    }
  }
}
FieldTypeDescription
titlestringVideo title (uses filename if empty)
descriptionstringVideo description
tagsarraySearch tags (no # symbol)
hashtagsarrayHashtags (with # symbol, appended to description)
schedule.publish_datestringPublish date (YYYY-MM-DD)
schedule.publish_timestringPublish time (HH:MM, system timezone)

Commands

gopherupload login Authenticate with Google
gopherupload upload <directory> Upload video from directory
gopherupload help Show detailed help

Troubleshooting

"Token not found" error

Run gopherupload login to authenticate.

"Multiple .mp4 files found" error

The upload directory must contain exactly one .mp4 file.

"Scheduled time is in the past" warning

The video will upload as public immediately instead of scheduled.

Upload quota exceeded

YouTube API has daily quota limits. See YouTube API Quotas for details.