# Gmail Setup for Hermes Agent ## Step 1: Create Google Cloud OAuth Credentials (~5 min) 1. Go to [console.cloud.google.com](https://console.cloud.google.com) 2. Create a new project (or use existing): "Hermes Assistant" 3. Enable these APIs: - Gmail API - Google Calendar API - Google Drive API (optional) 4. Go to **APIs & Services → Credentials → Create Credentials → OAuth 2.0 Client ID** 5. Application type: **Desktop app** 6. Name: "Hermes Agent" 7. Download the JSON file → save as `~/.hermes/google-credentials.json` ## Step 2: Configure Hermes Add to `~/.hermes/.env`: ``` GOOGLE_CLIENT_ID=your-client-id.apps.googleusercontent.com GOOGLE_CLIENT_SECRET=your-client-secret ``` Or place the downloaded JSON at `~/.hermes/google-credentials.json`. ## Step 3: Authorize ```bash hermes setup google-workspace ``` This opens a browser auth flow (or gives you a URL to paste). Sign in with m3taversal@gmail.com and grant permissions. Token is saved locally. Since this is a VPS (no browser), you'll get a URL — open it on your laptop, authorize, paste the code back into the terminal. ## Step 4: Test ```bash hermes "Show me my last 5 emails" hermes "What's on my calendar today?" hermes "Draft a reply to the last email from [name]" ``` ## Security Notes - OAuth tokens stored locally in `~/.hermes/` (chmod 600) - Hermes only accesses what you authorized — revoke anytime at [myaccount.google.com/permissions](https://myaccount.google.com/permissions) - The VPS is SSH-only access, no public web ports exposed to Hermes