get-claudia 1.54.3 → 1.54.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,20 @@
2
2
 
3
3
  All notable changes to Claudia will be documented in this file.
4
4
 
5
+ ## 1.54.4 (2026-03-14)
6
+
7
+ ### The One-Click Setup Release
8
+
9
+ Google Workspace setup went from 15 minutes to 2. Real user testing revealed painful friction in API enablement, broken OAuth URLs, missing API documentation, and a config typo that silently broke auth for new installs.
10
+
11
+ - **One-click API enablement** -- `npx get-claudia google` now generates a single URL that enables all required APIs for your chosen tier (4/8/11 APIs) in one browser page. No more visiting each API individually.
12
+ - **Tiered API reference** -- New `TIER_APIS` mapping in `google-setup.js` with `extractProjectNumber()` and `buildApiEnableUrl()` exports. Project number is auto-extracted from the Client ID.
13
+ - **Re-auth documentation** -- All setup docs now include step 9: if you enable new APIs after initial sign-in, delete `~/.workspace-mcp/token.json` and restart Claude Code.
14
+ - **BUG FIX: env var mismatch** -- `template-v2/CLAUDE.md` referenced `GOOGLE_CLIENT_ID` instead of `GOOGLE_OAUTH_CLIENT_ID`. New users following docs would get silent auth failures. Fixed.
15
+ - **Principle 15: URL Integrity** -- New principle across all three `claudia-principles.md` copies: never modify, reformat, or line-wrap URLs. Prevents Claudia from corrupting OAuth URLs.
16
+ - **Complete API list** -- Docs now list all 11 APIs across tiers (added Slides, Forms, Apps Script, Chat, People API) instead of a vague "and any others you want."
17
+ - **12 new tests** -- `extractProjectNumber` (4 tests), `buildApiEnableUrl` (4 tests), `TIER_APIS` structure (4 tests). All 26 google-setup tests pass.
18
+
5
19
  ## 1.54.0 (2026-03-05)
6
20
 
7
21
  ### The Compound Tools Release
@@ -6,6 +6,68 @@
6
6
  import { existsSync, readFileSync, writeFileSync } from 'node:fs';
7
7
  import { join } from 'node:path';
8
8
 
9
+ /**
10
+ * Google API IDs required per tool tier.
11
+ * Each higher tier is a superset of the one below it.
12
+ */
13
+ export const TIER_APIS = {
14
+ core: [
15
+ 'gmail.googleapis.com',
16
+ 'calendar-json.googleapis.com',
17
+ 'drive.googleapis.com',
18
+ 'people.googleapis.com',
19
+ ],
20
+ extended: [
21
+ 'gmail.googleapis.com',
22
+ 'calendar-json.googleapis.com',
23
+ 'drive.googleapis.com',
24
+ 'people.googleapis.com',
25
+ 'docs.googleapis.com',
26
+ 'sheets.googleapis.com',
27
+ 'tasks.googleapis.com',
28
+ 'chat.googleapis.com',
29
+ ],
30
+ complete: [
31
+ 'gmail.googleapis.com',
32
+ 'calendar-json.googleapis.com',
33
+ 'drive.googleapis.com',
34
+ 'people.googleapis.com',
35
+ 'docs.googleapis.com',
36
+ 'sheets.googleapis.com',
37
+ 'tasks.googleapis.com',
38
+ 'chat.googleapis.com',
39
+ 'slides.googleapis.com',
40
+ 'forms.googleapis.com',
41
+ 'script.googleapis.com',
42
+ ],
43
+ };
44
+
45
+ /**
46
+ * Extract the numeric GCP project number from a Google OAuth Client ID.
47
+ * Client IDs follow the format: <project-number>-<random>.apps.googleusercontent.com
48
+ * Returns null if the ID doesn't match the expected format.
49
+ */
50
+ export function extractProjectNumber(clientId) {
51
+ if (!clientId) return null;
52
+ const match = clientId.match(/^(\d+)-/);
53
+ return match ? match[1] : null;
54
+ }
55
+
56
+ /**
57
+ * Build a one-click URL that enables all APIs for a given tier in the GCP console.
58
+ * Returns a generic library URL if projectNumber is null.
59
+ */
60
+ export function buildApiEnableUrl(projectNumber, tier) {
61
+ const effectiveTier = TIER_APIS[tier] ? tier : 'core';
62
+ const apis = TIER_APIS[effectiveTier];
63
+
64
+ if (!projectNumber) {
65
+ return 'https://console.cloud.google.com/apis/library';
66
+ }
67
+
68
+ return `https://console.cloud.google.com/flows/enableapi?apiid=${apis.join(',')}&project=${projectNumber}`;
69
+ }
70
+
9
71
  /**
10
72
  * Detect old Google MCP server entries in .mcp.json.
11
73
  * Returns { hasOldGmail, hasOldCalendar, hasWorkspace }.
package/bin/index.js CHANGED
@@ -6,7 +6,7 @@ import { fileURLToPath } from 'url';
6
6
  import { spawn } from 'child_process';
7
7
  import { homedir } from 'os';
8
8
  import { createInterface } from 'readline';
9
- import { setupGoogleWorkspace, detectOldGoogleMcp } from './google-setup.js';
9
+ import { setupGoogleWorkspace, detectOldGoogleMcp, extractProjectNumber, buildApiEnableUrl, TIER_APIS } from './google-setup.js';
10
10
 
11
11
  const __filename = fileURLToPath(import.meta.url);
12
12
  const __dirname = dirname(__filename);
@@ -1391,13 +1391,13 @@ See the memory-manager skill for the full tool reference.`;
1391
1391
  // skill-index.json not found, skip skills section
1392
1392
  }
1393
1393
 
1394
- const googleSection = `## Google Workspace Integration (New!)
1394
+ const googleSection = `## Google Workspace Integration
1395
1395
 
1396
- Claudia can now connect to your full Google Workspace: Gmail, Calendar, Drive, Docs, Sheets, Tasks, and more through one server.
1396
+ Claudia connects to your full Google Workspace: Gmail, Calendar, Drive, Docs, Sheets, Tasks, and more through one server.
1397
1397
 
1398
- **Quick setup:** Run \`npx get-claudia google\` to configure it interactively.
1398
+ **Quick setup:** Run \`npx get-claudia google\` to configure it interactively. It will generate a one-click URL to enable all required APIs at once.
1399
1399
 
1400
- Or see the Google Integration Setup section in CLAUDE.md for manual configuration.`;
1400
+ Or see the Google Integration Setup section in CLAUDE.md for manual configuration. If you enable new APIs later, remember to re-authenticate (delete ~/.workspace-mcp/token.json and restart Claude Code).`;
1401
1401
 
1402
1402
  const content = `# Updated to v${version} (${date})
1403
1403
 
@@ -1509,12 +1509,26 @@ async function runGoogleSetup() {
1509
1509
  console.log(` ${colors.green}✓${colors.reset} Old Gmail/Calendar entries removed`);
1510
1510
  }
1511
1511
 
1512
+ // Build one-click API enablement URL
1513
+ const projectNumber = extractProjectNumber(clientId);
1514
+ const apiUrl = buildApiEnableUrl(projectNumber, tier);
1515
+ const apiCount = (TIER_APIS[tier] || TIER_APIS.core).length;
1516
+
1512
1517
  console.log('');
1513
1518
  console.log(` ${colors.boldYellow}Next steps:${colors.reset}`);
1514
- console.log(` 1. Enable APIs in your GCP project: Gmail, Calendar, Drive, etc.`);
1515
- console.log(` ${colors.dim}https://console.cloud.google.com/apis/library${colors.reset}`);
1516
- console.log(` 2. Restart Claude Code`);
1517
- console.log(` 3. First run will open your browser for Google sign-in`);
1519
+ console.log('');
1520
+ if (projectNumber) {
1521
+ console.log(` 1. ${colors.bold}Enable all ${apiCount} APIs at once${colors.reset} (one click):`);
1522
+ console.log(` ${colors.cyan}${apiUrl}${colors.reset}`);
1523
+ } else {
1524
+ console.log(` 1. ${colors.bold}Enable APIs${colors.reset} in your GCP project:`);
1525
+ console.log(` ${colors.cyan}${apiUrl}${colors.reset}`);
1526
+ console.log(` ${colors.dim}Enable: ${(TIER_APIS[tier] || TIER_APIS.core).join(', ')}${colors.reset}`);
1527
+ }
1528
+ console.log(` 2. ${colors.bold}Restart Claude Code${colors.reset} for the new MCP server to connect`);
1529
+ console.log(` 3. First run will open your browser for ${colors.bold}Google sign-in${colors.reset}`);
1530
+ console.log(` 4. ${colors.dim}If you enable more APIs later, sign out and re-authenticate${colors.reset}`);
1531
+ console.log(` ${colors.dim}(delete ~/.workspace-mcp/token.json and restart Claude Code)${colors.reset}`);
1518
1532
  console.log('');
1519
1533
  console.log(` ${colors.dim}Try: "check my inbox", "what's on my calendar", "search my Drive for..."${colors.reset}`);
1520
1534
  console.log('');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "get-claudia",
3
- "version": "1.54.3",
3
+ "version": "1.54.4",
4
4
  "description": "An AI assistant who learns how you work.",
5
5
  "keywords": [
6
6
  "claudia",
@@ -263,6 +263,20 @@ Better yet, do not store it at all. Store the pointer: "Pipeline status is in pi
263
263
 
264
264
  ---
265
265
 
266
+ ## 15. URL Integrity
267
+
268
+ **Never modify, reformat, or line-wrap URLs.**
269
+
270
+ When outputting a URL (OAuth links, API console links, sign-in URLs, any URL):
271
+ - Copy it character-for-character. Do not "clean up" or reformat.
272
+ - Do not insert line breaks, spaces, or markdown formatting inside the URL.
273
+ - Do not URL-encode characters that were not encoded in the original.
274
+ - If a URL is long, output it on its own line. Never wrap it.
275
+
276
+ Corrupted URLs waste user time and break authentication flows.
277
+
278
+ ---
279
+
266
280
  ## What I Never Do
267
281
 
268
282
  - Pretend to know things I don't
@@ -277,6 +291,7 @@ Better yet, do not store it at all. Store the pointer: "Pipeline status is in pi
277
291
  - Use em dashes (the hallmark of lazy AI writing)
278
292
  - Store volatile counts, statuses, or dated facts in MEMORY.md without pointers to canonical sources
279
293
  - Reference internal implementation details in conversation: skill files, rule files, hook names, CLI command internals, or internal system names. These are part of who I am - I follow them silently without narrating them.
294
+ - Modify, reformat, or line-wrap URLs
280
295
 
281
296
  ---
282
297
 
@@ -405,14 +405,21 @@ The MCP tools from Rube will have names like `SLACK_SEND_MESSAGE`, `NOTION_CREAT
405
405
 
406
406
  ### Google Integration Setup
407
407
 
408
+ **Recommended:** Run `npx get-claudia google` for a guided setup that generates a one-click API enablement URL.
409
+
408
410
  The workspace-mcp server requires your own Google Cloud credentials. Each user sets this up once:
409
411
 
410
412
  1. Go to [Google Cloud Console](https://console.cloud.google.com/)
411
413
  2. Create a new project (or select an existing one)
412
- 3. Enable the APIs you need:
413
- - Go to APIs & Services > Library
414
- - Search for and enable: **Gmail API**, **Google Calendar API**, **Google Drive API**, **Google Docs API**, **Google Sheets API**, **Google Tasks API**, **People API** (Contacts)
415
- - You can enable more later as needed
414
+ 3. Enable the APIs for your chosen tier:
415
+
416
+ | Tier | APIs to enable |
417
+ |------|---------------|
418
+ | **core** (43 tools) | Gmail API, Google Calendar API, Google Drive API, People API |
419
+ | **extended** (83 tools) | Core + Google Docs API, Google Sheets API, Tasks API, Google Chat API |
420
+ | **complete** (111 tools) | Extended + Google Slides API, Google Forms API, Apps Script API |
421
+
422
+ Go to APIs & Services > Library and enable each API. You can also use the one-click URL from `npx get-claudia google` to enable them all at once.
416
423
  4. Create OAuth credentials:
417
424
  - Go to APIs & Services > Credentials
418
425
  - Click "Create Credentials" > "OAuth client ID"
@@ -423,19 +430,20 @@ The workspace-mcp server requires your own Google Cloud credentials. Each user s
423
430
  5. Add credentials to `.mcp.json`:
424
431
  - Open `.mcp.json` in the project root
425
432
  - Find the `google_workspace` server entry
426
- - Set the `GOOGLE_CLIENT_ID` and `GOOGLE_CLIENT_SECRET` environment variables:
433
+ - Set the `GOOGLE_OAUTH_CLIENT_ID` and `GOOGLE_OAUTH_CLIENT_SECRET` environment variables:
427
434
  ```json
428
435
  "env": {
429
- "GOOGLE_CLIENT_ID": "your-client-id.apps.googleusercontent.com",
430
- "GOOGLE_CLIENT_SECRET": "your-client-secret"
436
+ "GOOGLE_OAUTH_CLIENT_ID": "your-client-id.apps.googleusercontent.com",
437
+ "GOOGLE_OAUTH_CLIENT_SECRET": "your-client-secret"
431
438
  }
432
439
  ```
433
440
  6. Choose your tool tier:
434
- - The default is `--tool-tier core` (43 tools), which covers most needs
441
+ - The default is `--tool-tier core` (43 tools), which covers Gmail, Calendar, Drive, and Contacts
435
442
  - For more capabilities, change to `--tool-tier extended` (83 tools) or `--tool-tier complete` (111 tools) in the server args
436
443
  7. Restart Claude Code. On first run, the server opens your browser for Google sign-in. Tokens are stored locally for future sessions.
444
+ 8. **Re-authentication after enabling new APIs:** If you enable additional APIs after your initial sign-in, you must re-authenticate. Delete `~/.workspace-mcp/token.json` and restart Claude Code to trigger a new sign-in with the updated scopes.
437
445
 
438
- **Migrating from the old setup:** If you previously used separate Gmail and Calendar MCP servers, the same GCP project works. Just enable any additional APIs (Drive, Docs, Sheets, Tasks, People) in your existing project, copy over the Client ID and Client Secret, and update `.mcp.json` to use the `google_workspace` server entry instead of the old individual entries.
446
+ **Migrating from the old setup:** If you previously used separate Gmail and Calendar MCP servers, the same GCP project works. Just enable any additional APIs in your existing project, copy over the Client ID and Client Secret into `GOOGLE_OAUTH_CLIENT_ID` and `GOOGLE_OAUTH_CLIENT_SECRET`, and update `.mcp.json` to use the `google_workspace` server entry instead of the old individual entries.
439
447
 
440
448
  ---
441
449