Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/gemini-extension-update.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@googleworkspace/cli": patch
---

Fix Gemini extension installation issue by removing redundant authentication settings and update the documentation.
6 changes: 6 additions & 0 deletions CONTEXT.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

The `gws` CLI provides dynamic access to Google Workspace APIs (Drive, Gmail, Calendar, Sheets, Admin, etc.) by parsing Discovery Documents at runtime.

## Rules of Engagement for Agents

* **Schema Discovery:** *If you don't know the exact JSON payload structure, run `gws schema <resource>.<method>` first to inspect the schema before executing.*
* **Context Window Protection:** *Workspace APIs (like Drive and Gmail) return massive JSON blobs. ALWAYS use field masks when listing or getting resources by appending `--params '{"fields": "id,name"}'` to avoid overwhelming your context window.*
* **Dry-Run Safety:** *Always use the `--dry-run` flag for mutating operations (create, update, delete) to validate your JSON payload before actual execution.*

## Core Syntax

```bash
Expand Down
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,20 @@ The `gws-shared` skill includes an `install` block so OpenClaw auto-installs the
</details>


## Gemini CLI Extension

1. Authenticate the CLI first:
```bash
gws setup
```

2. Install the extension into the Gemini CLI:
```bash
gemini extensions install https://github.com/googleworkspace/cli
```

Installing this extension gives your Gemini CLI agent direct access to all `gws` commands and Google Workspace agent skills. Because `gws` handles its own authentication securely, you simply need to authenticate your terminal once prior to using the agent, and the extension will automatically inherit your credentials.

## Advanced Usage

### Multipart Uploads
Expand Down
34 changes: 1 addition & 33 deletions gemini-extension.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,37 +2,5 @@
"name": "google-workspace-cli",
"version": "latest",
"description": "CLI tool for managing Google Workspace resources dynamically using Discovery APIs.",
"contextFileName": "CONTEXT.md",
"settings": [
{
"name": "Credentials File",
"description": "Path to the Google Workspace authorized user credentials or service account JSON file.",
"envVar": "GOOGLE_WORKSPACE_CLI_CREDENTIALS_FILE",
"sensitive": false
},
{
"name": "OAuth Client ID",
"description": "Client ID for OAuth authentication.",
"envVar": "GOOGLE_WORKSPACE_CLI_CLIENT_ID",
"sensitive": false
},
{
"name": "OAuth Client Secret",
"description": "Client Secret for OAuth authentication.",
"envVar": "GOOGLE_WORKSPACE_CLI_CLIENT_SECRET",
"sensitive": true
},
{
"name": "Sanitize Template",
"description": "Resource name of the Model Armor template to use for sanitization (e.g., projects/P/locations/L/templates/T).",
"envVar": "GOOGLE_WORKSPACE_CLI_SANITIZE_TEMPLATE",
"sensitive": false
},
{
"name": "Impersonated User",
"description": "Email address of the user to impersonate (requires Domain-Wide Delegation).",
"envVar": "GOOGLE_WORKSPACE_CLI_IMPERSONATED_USER",
"sensitive": false
}
]
"contextFileName": "CONTEXT.md"
}
Loading