#!/usr/bin/env node // yt.mjs — aesthetic.computer YouTube posting pipeline. // // Zero-dependency CLI for the AC YouTube channel (signed in as // mail@aesthetic.computer). Handles the one-time OAuth consent, then // uploads videos via the YouTube Data API v3 resumable endpoint. // // Credentials live in the vault, NOT this repo: // aesthetic-computer-vault/youtube/client.json — OAuth client (Desktop app) // aesthetic-computer-vault/youtube/token.json — saved refresh token // // ── one-time setup ─────────────────────────────────────────────────── // 1. console.cloud.google.com → project `aesthetic-computer` // → APIs & Services → Library → enable "YouTube Data API v3". // 2. APIs & Services → Credentials → Create credentials // → OAuth client ID → Application type "Desktop app". // Download the JSON, save it to // aesthetic-computer-vault/youtube/client.json // 3. node toolchain/youtube/yt.mjs auth // → opens a browser, sign in as mail@aesthetic.computer, approve. // The refresh token is written to the vault; uploads are scripted // from then on (no browser needed again). // // ── usage ──────────────────────────────────────────────────────────── // node toolchain/youtube/yt.mjs auth // node toolchain/youtube/yt.mjs whoami // node toolchain/youtube/yt.mjs upload \ // --title "..." \ // --description-file (or --description "...") \ // --tags a,b,c \ // --privacy private|unlisted|public (default: private) \ // --category 10 (default: 10 = Music) \ // --thumbnail (optional) \ // --playlist (optional) \ // --made-for-kids (default: not for kids) // // Every upload also writes a sidecar