| name | youtube |
| description | Download file(s) from GigaFile (gigafile.nu) and upload to YouTube as private. Optionally stop after download only. |
| metadata | {"openclaw":{"requires":{"bins":["uv"],"env":["YOUTUBE_CREDENTIALS_PATH"]},"primaryEnv":"YOUTUBE_CREDENTIALS_PATH","os":["darwin","linux"]}} |
GigaFile → YouTube Pipeline
Download file(s) from ギガファイル便 and upload to YouTube as private.
Usage
Download + Upload (default)
uv run {baseDir}/main.py --url <gigafile_url> --channel <channel_alias>
Download only
uv run {baseDir}/main.py --url <gigafile_url> --download-only
Upload only
uv run {baseDir}/main.py --upload-only --file <path> --channel <channel_alias>
uv run {baseDir}/main.py --upload-only --file <path1> --file <path2> --channel <channel_alias>
Arguments
--url: GigaFile URL (e.g. https://124.gigafile.nu/0607-xxx) — required unless --upload-only
--channel: YouTube channel alias — required unless --download-only
--download-only: Stop after download, skip YouTube upload
--upload-only: Skip download, upload local files specified with --file
--file: Local file path to upload (required with --upload-only, repeatable)
Output
Download + Upload success
{"status": "success", "channel_alias": "main", "channel_title": "My Channel", "channel_id": "UCxxx", "uploaded": [{"video_id": "abc", "url": "https://youtu.be/abc", "title": "video", "source_file": "video.mov", "privacy": "private"}]}
Download only success
{"status": "success", "files": [{"path": "/tmp/video.mov", "filename": "video.mov", "size_bytes": 6734352}]}
Error
{"status": "error", "code": "URL_EXPIRED", "message": "..."}
Error Codes
URL_INVALID: Not a gigafile.nu URL
URL_EXPIRED: URL has expired or file no longer exists
DOWNLOAD_FAILED: Network error during download
MISSING_URL: --url omitted (required unless --upload-only)
MISSING_CHANNEL: --channel omitted without --download-only
MISSING_FILE: --file omitted with --upload-only
INVALID_ARGS: --download-only and --upload-only specified together
AUTH_REQUIRED: credentials.json missing for YouTube OAuth
API_ERROR_403: YouTube API quota exceeded or insufficient permissions
UNKNOWN_ERROR: Unexpected failure
First-Time Setup
- Go to Google Cloud Console → enable YouTube Data API v3
- Create OAuth 2.0 credentials (Desktop app) → download as
credentials.json
- Set
YOUTUBE_CREDENTIALS_PATH=/path/to/credentials.json
- Run once — browser opens for Google OAuth →
token_<alias>.json saved automatically
Channel Alias
--channel is a user-defined alias that maps to a saved token file.
--channel main → token_main.json
--channel gaming → token_gaming.json
Subsequent runs reuse the saved token automatically.
First run for a new alias
When token_<alias>.json does not exist, browser OAuth is required. Before running the command, ask the user to open YouTube in their browser and switch to the target channel. This ensures the correct account is selected in the OAuth flow.
Tell the user: "Please open YouTube in your browser and make sure you are signed in to the channel you want to use for --channel <alias>. Then let me know when you are ready."
Once confirmed, run the command — the browser will open for Google OAuth and token_<alias>.json will be saved automatically.