bim-google

Push Revit schedules, site assessments, and warning logs directly into shared Google Sheets — no manual export, no copy-paste, no formatting by hand. Read values from a shared Doc and pipe them into Revit parameters. One-time sign-in; every subsequent call is silent.

Read and write Google Sheets and Docs from the command line. No manual export, no copy-paste.

Authentication

One-time browser sign-in. Credentials cached locally. Your agent runs bim google login; a browser window opens, you click Allow, done. Every subsequent call refreshes the token silently.

bim google login        # opens browser — one-time setup
bim google whoami       # verify signed in
bim google doctor --json

Requires a network connection at login time and at each API call. All data stays in your Google account.

Sheets verbs

Verb What it does
bim google sheets read --spreadsheet <id-or-url> Stream rows as NDJSON; first row is the header
bim google sheets append --spreadsheet <id-or-url> [--with-header] Append NDJSON rows from stdin; --with-header writes column names first
bim google sheets write --spreadsheet <id-or-url> --range <A1:Z100> Overwrite a specific range from stdin NDJSON

--spreadsheet accepts either a spreadsheet ID or a full Google Sheets URL.

--range accepts A1 notation or a bare sheet tab name (Sheet1, Data). Default: Sheet1.

Docs verbs

Verb What it does
bim google docs read --doc <id-or-url> Return {title, text, word_count, char_count}
bim google docs read --doc <id-or-url> --raw Return full Google Docs API JSON
bim google docs append --doc <id-or-url> --text "..." Append plain text to end of document

Drive verbs

Verb What it does
bim google drive list Stream NDJSON of Drive files created by this app
bim google drive pick Open Drive Picker in browser; returns {file_id, name} of selected file
bim google drive download --file <id> --output <path> Download a Drive file to a local path
bim google drive upload [--input <path>] --name <name> Upload a file to Drive; returns {file_id, web_view_link}

drive pick opens picker.bimcli.com in your default browser. The OAuth token is passed in the URL fragment (never sent to the server). Select a file and the command returns its ID within seconds. Only files created by this app are visible (drive.file scope).

Pipe compositions

# Push a Revit sheet list into a shared tracker
bim revit schedule export Sheets | bim google sheets append --spreadsheet <id> --with-header

# Push model warnings into a Sheet for review
bim revit warnings list | bim google sheets append --spreadsheet <id> --with-header

# Read spec values from a Doc and push into Revit parameters
bim google docs read --doc <id> | bim revit param set --by Mark

# Read a Sheet, write matching params to Revit
bim google sheets read --spreadsheet <id> | bim revit param set --by Mark

BYO client ID (power users)

By default, bim-google authenticates using Everbeach's built-in Google Cloud project. If your org requires its own OAuth app — for compliance, quota isolation, or Google Workspace policy enforcement — you can supply your own client credentials at login time.

Step 1 — Create a Cloud project and OAuth client

  1. Go to console.cloud.google.com → APIs & Services → Credentials.
  2. Create a new OAuth 2.0 Client ID. Choose Desktop app as the application type.
  3. Enable the APIs you need: Google Sheets API, Google Docs API, Google Drive API.
  4. Download the credential JSON. It looks like:
{
  "installed": {
    "client_id": "YOUR_CLIENT_ID.apps.googleusercontent.com",
    "client_secret": "YOUR_SECRET",
    "auth_uri": "https://accounts.google.com/o/oauth2/auth",
    "token_uri": "https://oauth2.googleapis.com/token",
    "redirect_uris": ["http://localhost"]
  }
}

Step 2 — Login with your credential file

bim google login --client-id-file /path/to/client_secret.json

The flag overrides the built-in client ID for this login session only. The resulting token is cached locally and auto-refreshed on subsequent calls — you do not need to pass --client-id-file again until you log out and re-authenticate.

Note: Tokens issued by your own client ID are stored in the same cache location as the default ones. Running bim google logout clears them. If you switch between client IDs, log out first to avoid using a token issued by the previous client.

Gotchas

For agent use: /google/llms.txt