Google Sheets
Google Sheets
Section titled “Google Sheets”Set the OAuth client ID supplied by your Google Cloud project. Installed-app clients can omit the secret.
export GOOGLE_CLIENT_ID="...apps.googleusercontent.com"export GOOGLE_CLIENT_SECRET="..." # when required by the clientbun sheets loginbun sheets statusThe login uses an authorization-code callback on localhost, validates OAuth state, supports refresh tokens, and requests Sheets plus Drive metadata access. On macOS credentials are stored in Keychain. Other environments use an AES-GCM encrypted local vault; set BROWSER_AUTOMATION_CREDENTIAL_KEY to provide its key explicitly.
bun sheets accountsbun sheets listbun sheets inspect SPREADSHEET_ID --sheet=Users --range=A:Ebun sheets preview SPREADSHEET_ID --sheet=Users --limit=10bun sheets read SPREADSHEET_ID --from-row=2 --to-row=100bun sheets write SPREADSHEET_ID --sheet=Users --row=2 --values='{"status":"ready"}'bun sheets logout --account=user@example.comSpreadsheet URLs and IDs are accepted. Select a tab/range with --sheet, --gid, --range, and --header-row; provider URIs use equivalent gid, range, and headerRow query parameters.
preview defaults to 10 rows, while read defaults to at most 1,000 CLI-output rows unless --limit is supplied. --from-row and --to-row are absolute spreadsheet row numbers, including the header row in their numbering.
Use --account=user@example.com on Sheets and workflow commands when more than one account is stored.
sheets logout revokes one account at a time. Pass --account to select it; without the flag, only the current default account is logged out.