# YouTube posting pipeline Scripted uploads to the aesthetic.computer YouTube channel (signed in as **mail@aesthetic.computer**). Zero npm dependencies — `yt.mjs` talks to the YouTube Data API v3 directly over `fetch`. ## One-time setup Credentials live in the **vault**, never in this repo: ``` aesthetic-computer-vault/youtube/client.json OAuth client (Desktop app) aesthetic-computer-vault/youtube/token.json saved refresh token ``` 1. **Enable the API.** [console.cloud.google.com](https://console.cloud.google.com) → project `aesthetic-computer` → APIs & Services → Library → enable **YouTube Data API v3**. 2. **Make an OAuth client.** APIs & Services → Credentials → Create credentials → OAuth client ID → Application type **Desktop app**. Download the JSON, save it as `aesthetic-computer-vault/youtube/client.json`. - If the consent screen isn't configured yet, set it up as **External**, add `mail@aesthetic.computer` as a test user (the app can stay in "testing" — test-user refresh tokens issued to a Desktop client don't expire on the 7-day clock). 3. **Authorize.** ```bash node toolchain/youtube/yt.mjs auth ``` A browser opens — sign in as **mail@aesthetic.computer**, approve. The refresh token is written to the vault. Done once; uploads are fully scripted afterward. ## Commands ```bash # confirm which channel is wired up node toolchain/youtube/yt.mjs whoami # upload (defaults to PRIVATE so you review in YouTube Studio first) node toolchain/youtube/yt.mjs upload \ --title "..." \ --description-file \ --tags trance,waltz,aesthetic-computer \ --privacy private \ --category 10 \ --thumbnail ``` Flags: `--title` (required), `--description` / `--description-file`, `--tags a,b,c`, `--privacy private|unlisted|public` (default `private`), `--category` (default `10` = Music), `--thumbnail`, `--playlist `, `--made-for-kids`. Every upload drops a `