CLI that clips ~the last 30 seconds of a live Twitch streamer, downloads the mp4, and optionally extracts the audio to mp3.
- Register an app at https://dev.twitch.tv/console/apps with redirect URI
http://localhost:3000/callback. - Copy
.env.exampleto.envand fill inTWITCH_CLIENT_IDandTWITCH_CLIENT_SECRET. bun install
bun run src/cli.ts <streamer> [--mp3] [--out ./clips]
First run opens a browser to authorize (token cached at
~/.config/clip-maker/tokens.json and auto-refreshed thereafter).
bun run build
./clip-maker <streamer> --mp3
The binary bundles the Bun runtime but NOT yt-dlp/ffmpeg, which must still be installed on the target machine.
- Twitch decides clip length (~25-30s); duration is not caller-settable.
- The channel must be live at the moment you run the command.