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

bash
vidbyte-cli connections login google-drive --client-secrets ./client_secret.json
  • Keep 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.readonly can 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.

  1. Start sign-in

    Opens Google's consent page in your browser. Use --name to tell multiple Google accounts apart.

    Connect Drive

    bash
    vidbyte-cli connections login google-drive --name personal-drive
  2. Approve in your browser

    Grant read-only Drive access. The CLI verifies your account before it saves the tokens.

  3. Check the connection

    Rechecks the Google account behind the connection name.

    Check the connection

    bash
    vidbyte-cli connections status personal-drive
See every saved connection

Lists saved connection names in the current profile.

List connections

bash
vidbyte-cli connections list

Read 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

bash
vidbyte-cli connections read google-drive file <FILE_ID>
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

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

bash
vidbyte-cli connections logout personal-drive

Next steps