Skip to content

Publish to YouTube

reelson publish <slug> uploads the rendered video to channels listed under "channels" in reelson.config.json. reelson channels init adds starter ones.

reelson.config.json
"channels": {
"youtube": { "type": "youtube", "privacy": "unlisted", "playlist": "PL…", "footer": "https://acme.test" },
"shorts": { "type": "youtube", "format": "portrait", "privacy": "public", "tags": ["acme"] }
}
  • format picks the render: landscape (the default), portrait or square. Render it first.
  • The title comes from video.json. The description is the subtitle plus the numbered steps, then the channel’s footer. To word them yourself, use video.json "publish": { "title", "description", "tags" }.
  • The .srt captions go up too ("captions": false skips them), and the video is added to playlist.
  • channelId (UC…) guards against signing in to the wrong channel.
  1. In a Google Cloud project, enable the YouTube Data API v3.

  2. Set up the OAuth consent screen and add yourself as a test user.

  3. Create an OAuth client of type Desktop app. Put its id and secret in the .env next to reelson.config.json:

    .env
    YOUTUBE_CLIENT_ID=….apps.googleusercontent.com
    YOUTUBE_CLIENT_SECRET=…
  4. Sign in through the browser (pick the brand channel if the account has several):

    Terminal window
    reelson channels login youtube
    reelson channels # who each channel is logged in as

Sign-ins are kept in ~/.config/reelson/credentials/, never in the project.

Terminal window
reelson publish <slug> --dry-run # what would go up
reelson publish <slug> --to youtube,shorts # or --all-channels; asks without either

What went where is kept in the demo’s published.json (commit it). Publishing again skips those channels unless you pass one of these:

Flag Does
--replace After a re-record: uploads the new render and makes the old video private (never deletes it). YouTube can’t swap the file behind a URL, so the id changes. Link through a URL of your own and point it at the new id.
--update Fixes the words: rewrites the title, description, tags, captions and playlist. The URL, views and comments stay, and the video file and privacy are untouched.
--again Uploads a second copy.