Connect Google Drive to vidbyte-cli
Configure a Google OAuth installed-app client, approve read-only Drive access in a browser, and fetch one selected file through the CLI.
1. Create an installed-app OAuth client
In Google Cloud, enable the Drive API and create an OAuth client ID for a desktop app. Download its client JSON. Keep that file private: the CLI reads the installed-app configuration for the login and does not copy the file into its metadata store.
Pass the JSON path with `--client-secrets` or set `VIDBYTE_GOOGLE_CLIENT_SECRETS`. The default `drive.readonly` scope can read files visible to the account, while each CLI read still targets one selected file.
Provide the installed-app client file
vidbyte-cli connections login google-drive --client-secrets ./client_secret.json
# Or configure the path once for this shell
export VIDBYTE_GOOGLE_CLIENT_SECRETS="$HOME/.config/vidbyte/client_secret.json"
vidbyte-cli connections login google-drive
# Windows PowerShell
$env:VIDBYTE_GOOGLE_CLIENT_SECRETS = "$HOME/.config/vidbyte/client_secret.json"
vidbyte-cli connections login google-drive2. 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. Use `--name` to distinguish multiple Google accounts.
Connect and verify Drive
vidbyte-cli connections login google-drive --name personal-drive
vidbyte-cli connections status personal-drive
vidbyte-cli connections list3. Read one selected file
Pass a Drive file ID or a supported Drive/Docs URL. The CLI reads file metadata and content for that selection only. Google Docs export as text, Sheets as CSV, and Slides as PDF; ordinary files are downloaded with a size bound. A file must be visible to the connected account and within the granted Drive scope.
Read a Drive file
vidbyte-cli connections read google-drive file <FILE_ID>
vidbyte-cli connections read google-drive file "https://drive.google.com/file/d/<FILE_ID>/view" --connection personal-drive4. 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