Read-only file access
Connect Google Drive to vidbyte-cli
Set up a Google OAuth installed-app client, approve read-only Drive access in your browser, and fetch one selected file through the CLI.
Create an installed-app OAuth client
In Google Cloud, enable the Drive API and create an OAuth client ID for a desktop app, then download its client JSON. Pass the JSON path with --client-secrets or set VIDBYTE_GOOGLE_CLIENT_SECRETS.
Pass the client file
vidbyte-cli connections login google-drive --client-secrets ./client_secret.jsonSet the path for this shell
export VIDBYTE_GOOGLE_CLIENT_SECRETS="$HOME/.config/vidbyte/client_secret.json"
vidbyte-cli connections login google-driveSet the path for this session
$env:VIDBYTE_GOOGLE_CLIENT_SECRETS = "$HOME/.config/vidbyte/client_secret.json"
vidbyte-cli connections login google-driveKeep the file private — The CLI reads the installed-app configuration for the login and does not copy the file into its metadata store. Do not commit it.
Default scope —
drive.readonlycan read files visible to the account, while each CLI read still targets one selected file.
Approve Drive access in your browser
The CLI starts a temporary localhost callback, opens Google's consent page, and uses PKCE and state validation to complete authorization. After it verifies your account, it stores OAuth tokens in the OS keyring.
Start sign-in
Opens Google's consent page in your browser. Use
--nameto tell multiple Google accounts apart.Connect Drive
bashvidbyte-cli connections login google-drive --name personal-driveApprove in your browser
Grant read-only Drive access. The CLI verifies your account before it saves the tokens.
Check the connection
Rechecks the Google account behind the connection name.
Check the connection
bashvidbyte-cli connections status personal-drive
See every saved connection
Lists saved connection names in the current profile.
List connections
vidbyte-cli connections listRead one selected file
Pass a Drive file ID or a supported Drive or Docs URL. The CLI reads file metadata and content for that selection only.
Read a Drive file
vidbyte-cli connections read google-drive file <FILE_ID>Read a Drive file by URL
vidbyte-cli connections read google-drive file "https://drive.google.com/file/d/<FILE_ID>/view" --connection personal-drive- Google Docs
- What you getExported as text
- Google Sheets
- What you getExported as CSV
- Google Slides
- What you getExported as PDF
- Other files
- What you getDownloaded with a size bound
| File type | What you get |
|---|---|
| Google Docs | Exported as text |
| Google Sheets | Exported as CSV |
| Google Slides | Exported as PDF |
| Other files | Downloaded with a size bound |
A file must be visible to the connected account and within the granted Drive scope.
Remove the connection
Log out by connection name to revoke the token where possible and remove its local keyring entry and metadata.
Disconnect Google Drive
vidbyte-cli connections logout personal-drive