Connect GitHub to vidbyte-cli
Configure the GitHub OAuth app client ID, complete device authorization in a browser, and make a bounded repository or pull-request read from the CLI.
1. Configure a GitHub OAuth App
Create or use a GitHub OAuth App with device authorization enabled, then make its client ID available as `VIDBYTE_GITHUB_CLIENT_ID`. A client secret is optional for some refresh and revocation operations; do not put it in a command argument or commit it to a repository.
The default authorization requests `read:user` and GitHub's broad `repo` scope, which grants more permission than this CLI's GET-only reads use. For public repositories, request `read:user` and `public_repo` instead. GitHub still enforces account access and granted scopes.
Set the OAuth app client ID
# macOS / Linux
export VIDBYTE_GITHUB_CLIENT_ID="your-oauth-app-client-id"
# Windows PowerShell
$env:VIDBYTE_GITHUB_CLIENT_ID = "your-oauth-app-client-id"2. Complete device authorization
Run login in an interactive terminal. The CLI displays a one-time code and verification URL, opens GitHub in your browser, and waits for approval. After approval it verifies the GitHub account before saving the token in the OS keyring. Use `--name` when you want a stable name for more than one account.
Connect and verify GitHub
vidbyte-cli connections login github
vidbyte-cli connections login github --name work-github
vidbyte-cli connections login github --scope read:user --scope public_repo
vidbyte-cli connections status work-github
vidbyte-cli connections list3. Read a repository or pull request
The API read supports one repository or one pull request. Use the repository as `OWNER/REPOSITORY`; pull requests also require `--number`. Reads return structured JSON and do not write to GitHub. The default `--via auto` uses the native `gh` CLI when it is installed and authenticated, then falls back to the connected account's API token. Use `--via direct` to force the OAuth connection or `--via native` to require `gh`.
Supported GitHub reads
vidbyte-cli connections read github repo octocat/Hello-World
vidbyte-cli connections read github pull-request octocat/Hello-World --number 42
# Force the OAuth connection and select a named account
vidbyte-cli connections read github repo octocat/Hello-World --via direct --connection work-github4. Remove the connection
Log out by connection name to remove the local keyring token and saved metadata. Local removal does not depend on GitHub being reachable.
Disconnect GitHub
vidbyte-cli connections logout work-github