Relock: record the >= pin form
947d5f3a
Video platform management CLI and MCP server — YouTube + Twitch unified in one interface.
Upload videos, edit metadata, check analytics, schedule streams, manage chat, and get a cross-platform overview of your content channels.
Requires a C toolchain. On Guix:
guix shell -m ../sigil/manifest.scmBuild:
sigil build --redirects dev-redirects.sglRun tests:
sigil test# Platform overview (subscribers, followers, live status)
tube status
# List recent YouTube videos with stats
tube videos --limit 20
# Upload a video to YouTube
tube upload video.mp4 --title "My Video" --description "About this video" --privacy unlisted
# Analytics summary (YouTube + Twitch combined)
tube analytics --days 30
# View stream schedule across platforms
tube stream-schedule --platform both
# Start a broadcast
tube go-live --title "Weekly Livestream" --platform both
# Send a chat message
tube chat "Hello everyone!" --platform twitchtube serveThis starts an MCP server exposing the following tools:
| Tool | Description |
|---|---|
tube/upload | Upload video to YouTube |
tube/videos | List recent videos with stats |
tube/analytics | Cross-platform analytics summary |
tube/schedule | View stream schedule (YouTube + Twitch) |
tube/go-live | Start broadcast on one or both platforms |
tube/chat | Send message to live chat |
tube/status | Platform overview (subs, followers, live status) |
Set client credentials and use tube auth to authorize:
export YOUTUBE_CLIENT_ID="your-google-client-id"
export YOUTUBE_CLIENT_SECRET="your-google-client-secret"
export TWITCH_CLIENT_ID="your-twitch-client-id"
export TWITCH_CLIENT_SECRET="your-twitch-client-secret"
# Authorize each platform (opens browser, stores tokens)
tube auth youtube
tube auth twitchTokens are stored in ~/.config/sigil/<service>/tokens.json and automatically refreshed when expired.
For manual token management, set access tokens directly:
| Variable | Required | Description |
|---|---|---|
YOUTUBE_ACCESS_TOKEN | For YouTube write ops | YouTube OAuth2 access token |
YOUTUBE_API_KEY | For YouTube read ops | YouTube Data API key |
TWITCH_CLIENT_ID | For Twitch | Twitch application client ID |
TWITCH_ACCESS_TOKEN | For Twitch | Twitch OAuth2 access token |
TUBE_DEFAULT_PLATFORM | No | Default platform: youtube, twitch, or both (default: both) |
| Variable | Description |
|---|---|
YOUTUBE_CLIENT_ID | Google Cloud OAuth2 client ID |
YOUTUBE_CLIENT_SECRET | Google Cloud OAuth2 client secret |
TWITCH_CLIENT_ID | Twitch application client ID |
TWITCH_CLIENT_SECRET | Twitch application client secret |
You only need credentials for the platforms you want to use. If you only have YouTube credentials, Twitch operations will gracefully report that credentials are missing, and vice versa.
src/tube/ config.sgl — Environment-based configuration youtube.sgl — YouTube operations (wraps sigil-youtube) twitch.sgl — Twitch operations (wraps sigil-twitch) tools.sgl — MCP tool definitions + shared helpers main.sgl — Dual CLI/MCP entry point
tube follows the dual CLI/MCP server pattern used by fjo and tally. The same business logic serves both the command-line interface and MCP tool handlers.
BSD-3-Clause
$ git clone https://codeberg.org/sigil/tube
One page per file, and every line has a permalink.
Relock: record the >= pin form
947d5f3a
47e51ad6
Pin dependencies to version tags
fbd58da6
a48678f9
85fe8707
d29f37b1
The last 20 commits keep a page here. Everything older lives in the clone.