home / http-apis / twitch-cli

Twitch CLI

Official · Twitch
665

Official Twitch CLI for Helix API calls, token workflows, EventSub simulation, and local mock Twitch testing.

$brew install twitchdev/twitch/twitch-cli
Language
Go
Stars
665
Category
HTTP & APIs
Agent
Ready
Agent Compatibility
JSON Output
Agent Skill
MCP Support
AI Analysis

Twitch CLI is Twitch's official developer command line for working against Helix APIs, generating tokens, and testing Twitch integrations locally. It is aimed at extension, bot, and backend developers who need a shell-level way to hit Twitch endpoints or simulate Twitch behavior.

What It Enables
  • Call Helix endpoints from the terminal with stored client credentials, query params, request bodies, verbose headers, and optional autopagination.
  • Generate, validate, refresh, and revoke app or user access tokens for local development and scripted integration checks.
  • Emit mock EventSub webhook or WebSocket events and run a local mock API server to test Twitch-connected apps without relying on production traffic.
Agent Fit
  • twitch api can return raw JSON and uses non-zero exit codes for non-2xx responses, which fits inspect, retry, and verification loops.
  • twitch event trigger prints generated payload JSON directly, so agents can create fixtures or forward test events without writing their own generators.
  • Best for agents exercising Twitch developer workflows in dev or CI-like environments; it is a narrower fit for general Twitch account management because auth and setup still involve prompts or browser-mediated login.
Caveats
  • Token and API commands depend on a Twitch developer app with a client ID and secret, and user-token flows usually require browser or device-code interaction.
  • Structured output is uneven across the CLI, and the mock API docs note that some surfaces such as EventSub and extensions are not fully covered by the local mock server.