Device authorization

Connect GitHub to vidbyte-cli

Set up a GitHub OAuth App client ID, approve device authorization in your browser, and make a read-only repository or pull-request read from the CLI.

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.

Set the OAuth app client ID

bash
export VIDBYTE_GITHUB_CLIENT_ID="your-oauth-app-client-id"
  • Client secret — Optional for some refresh and revocation operations. Do not put it in a command argument or commit it to a repository.

  • GitHub enforces access — GitHub still enforces account access and the scopes you granted.

Complete device authorization

Run login in an interactive terminal. After you approve in the browser, the CLI verifies the GitHub account before saving the token in the OS keyring.

  1. Start device authorization

    The CLI displays a one-time code and a verification URL, then opens GitHub in your browser. Use --name for a stable name when you connect more than one account.

    Connect GitHub

    bash
    vidbyte-cli connections login github --name work-github
  2. Approve in your browser

    Enter the code on GitHub and approve the request. The CLI waits for approval, then verifies the account and saves the token.

  3. Check the connection

    Rechecks the GitHub account behind the connection name.

    Check the connection

    bash
    vidbyte-cli connections status work-github
Only need public repositories?

Request the narrower public_repo scope instead of the default repo scope.

Public repositories only

bash
vidbyte-cli connections login github --scope read:user --scope public_repo
Connect without a custom name

Leave out --name when you only connect one GitHub account.

Default connection name

bash
vidbyte-cli connections login github
See every saved connection

Lists saved connection names in the current profile.

List connections

bash
vidbyte-cli connections list

Read a repository or pull request

Reads return structured JSON and do not write to GitHub. Pass the repository as OWNER/REPOSITORY; pull requests also need --number.

Read a repository

bash
vidbyte-cli connections read github repo octocat/Hello-World

Choose how the CLI reaches GitHub

  • Auto (default) — --via auto uses the native gh CLI when it is installed and authenticated, then falls back to the connected account's API token.

  • Direct — --via direct forces the OAuth connection.

  • Native — --via native requires gh.

Direct read with a named account

bash
vidbyte-cli connections read github repo octocat/Hello-World --via direct --connection work-github

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

bash
vidbyte-cli connections logout work-github

Next steps