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
export VIDBYTE_GITHUB_CLIENT_ID="your-oauth-app-client-id"Set the OAuth app client ID
$env: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.
Start device authorization
The CLI displays a one-time code and a verification URL, then opens GitHub in your browser. Use
--namefor a stable name when you connect more than one account.Connect GitHub
bashvidbyte-cli connections login github --name work-githubApprove 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.
Check the connection
Rechecks the GitHub account behind the connection name.
Check the connection
bashvidbyte-cli connections status work-github
Only need public repositories?
Request the narrower public_repo scope instead of the default repo scope.
Public repositories only
vidbyte-cli connections login github --scope read:user --scope public_repoConnect without a custom name
Leave out --name when you only connect one GitHub account.
Default connection name
vidbyte-cli connections login githubSee every saved connection
Lists saved connection names in the current profile.
List connections
vidbyte-cli connections listRead 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
vidbyte-cli connections read github repo octocat/Hello-WorldRead a pull request
vidbyte-cli connections read github pull-request octocat/Hello-World --number 42Choose how the CLI reaches GitHub
Auto (default) —
--via autouses the nativeghCLI when it is installed and authenticated, then falls back to the connected account's API token.Direct —
--via directforces the OAuth connection.Native —
--via nativerequiresgh.
Direct read with a named account
vidbyte-cli connections read github repo octocat/Hello-World --via direct --connection work-githubRemove 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