# OpenCLI Agent Pack: Google Workspace CLI

Use this when an AI agent needs to work with `gws`.

## What this CLI is for
The official CLI from Google. Drive, Gmail, Calendar, Sheets, and Chat from one official CLI. Start with `gws auth setup` and go from there. Supports structured output — good for scripts and agents.

Best for: Searching Google Workspace mail, files, and calendars from the terminal or an agent.

## Agent readiness
Great for agents (90/100)
- Structured output is available for parsing.
- Supports non-interactive/scripted use.
- Dry-run or preview mode can reduce risk.
- Works well in CI or repeatable automation.

## Install
```sh
brew install googleworkspace-cli
```

## Verify before real work
```sh
gws --help
```
Expected signal: gws responds locally; authenticate before real work.

## Safe starting commands
```sh
gws --help
```

```sh
gws auth setup
```

```sh
gws gmail users messages list --params '{"userId": "me", "q": "is:unread newer_than:7d", "maxResults": 5}'
```

```sh
gws calendar events list --params '{"calendarId": "primary", "maxResults": 5}' --dry-run
```

## Guardrails for agents
- Verify identity/account before running task commands.
- Network access is required; avoid leaking secrets in logs.
- Start read-only, then ask before mutations.

## Suggested agent instruction
You may use Google Workspace CLI (`gws`) for searching google workspace mail, files, and calendars from the terminal or an agent.. First install it if missing, then run the verify command. Start with read-only or inspection commands. Summarize what you found before changing anything. Ask for confirmation before commands that mutate remote state, spend money, deploy, delete data, merge code, or expose secrets.

Source: OpenCLI
