Skip to content
Open
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
1 change: 1 addition & 0 deletions .agents/skills/gog-chat/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ gog --readonly --account user@example.com chat --help

| Command | Purpose |
| --- | --- |
| `attachments` | Message attachments (read-only download) |
| `dm` | Direct messages |
| `messages` | Chat messages |
| `spaces` | Chat spaces |
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

## 0.48.1 - Unreleased

- Chat: include attachment metadata (`name`, `contentName`, `contentType`, `source`, data reference) in `chat messages list --json`, and add read-only `chat attachments download` for uploaded attachments; Drive attachments point to `gog drive download`. (#1320) — thanks @voska.

## 0.48.0 - 2026-11-05

**Highlights:** New backups stay local until you configure a remote; existing configurations keep working. Store service-account keys in the keyring, search Gmail IDs efficiently, and use environment-backed watch tokens, with Calendar fixes and security dependency updates.
Expand Down
2 changes: 2 additions & 0 deletions docs/commands.generated.md
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,8 @@ Generated from `gog schema --json`.
- [`gog calendar (cal) users [flags]`](commands/gog-calendar-users.md) - List workspace users (use their email as calendar ID)
- [`gog calendar (cal) working-location (wl) --from=STRING --to=STRING --type=STRING [<calendarId>] [flags]`](commands/gog-calendar-working-location.md) - Set working location (home/office/custom)
- [`gog chat <command> [flags]`](commands/gog-chat.md) - Google Chat
- [`gog chat attachments <command>`](commands/gog-chat-attachments.md) - Message attachments (read-only download)
- [`gog chat attachments download <name> [flags]`](commands/gog-chat-attachments-download.md) - Download a message's attachments read-only (spaces.messages.get + media.download)
- [`gog chat dm <command>`](commands/gog-chat-dm.md) - Direct messages
- [`gog chat dm send (create,post) <email> [flags]`](commands/gog-chat-dm-send.md) - Send a direct message
- [`gog chat dm space (find,setup) <email>`](commands/gog-chat-dm-space.md) - Find or create a DM space
Expand Down
4 changes: 3 additions & 1 deletion docs/commands/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Every `gog` command has a generated docs page. The source of truth is the live CLI schema; run `make docs-commands` after changing command names, flags, help text, aliases, or arguments.

Generated pages: 781.
Generated pages: 783.

## Top-level Commands

Expand Down Expand Up @@ -207,6 +207,8 @@ Generated pages: 781.
- [gog calendar users](gog-calendar-users.md) - List workspace users (use their email as calendar ID)
- [gog calendar working-location](gog-calendar-working-location.md) - Set working location (home/office/custom)
- [gog chat](gog-chat.md) - Google Chat
- [gog chat attachments](gog-chat-attachments.md) - Message attachments (read-only download)
- [gog chat attachments download](gog-chat-attachments-download.md) - Download a message's attachments read-only (spaces.messages.get + media.download)
- [gog chat dm](gog-chat-dm.md) - Direct messages
- [gog chat dm send](gog-chat-dm-send.md) - Send a direct message
- [gog chat dm space](gog-chat-dm-space.md) - Find or create a DM space
Expand Down
49 changes: 49 additions & 0 deletions docs/commands/gog-chat-attachments-download.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# `gog chat attachments download`

> Generated from `gog schema --json`. Do not edit this page by hand; run `make docs-commands`.

Download a message's attachments read-only (spaces.messages.get + media.download)

## Usage

```bash
gog chat attachments download <name> [flags]
```

## Parent

- [gog chat attachments](gog-chat-attachments.md)

## Flags

| Flag | Type | Default | Help |
| --- | --- | --- | --- |
| `--access-token` | `string` | | Use provided access token directly (bypasses stored refresh tokens; token expires in ~1h) |
| `-a`<br>`--account`<br>`--acct` | `string` | | Account email, alias, or auto for authenticated Google API commands |
| `--client` | `string` | | OAuth client name (selects stored credentials + token bucket) |
| `--color` | `string` | auto | Color output: auto\|always\|never |
| `--disable-commands` | `string` | | Comma-separated list of disabled commands; dot paths allowed |
| `-n`<br>`--dry-run`<br>`--dryrun`<br>`--noop`<br>`--preview` | `bool` | | Do not make changes; print intended actions and exit successfully |
| `--enable-commands` | `string` | | Comma-separated list of enabled command prefixes; dot paths allowed (restricts CLI) |
| `--enable-commands-exact` | `string` | | Comma-separated list of exact enabled commands; dot paths allowed and parent commands do not enable children |
| `-y`<br>`--force`<br>`--assume-yes`<br>`--yes` | `bool` | | Skip confirmations for destructive commands |
| `--gmail-no-send` | `bool` | false | Block Gmail send operations (agent safety) |
| `-h`<br>`--help` | `kong.helpFlag` | | Show context-sensitive help. |
| `--home` | `string` | | Override gogcli config/data/state/cache root (equivalent to GOG_HOME) |
| `-j`<br>`--json`<br>`--machine` | `bool` | false | Output JSON to stdout (best for scripting) |
| `--no-input`<br>`--non-interactive`<br>`--noninteractive` | `bool` | | Never prompt; fail instead (useful for CI) |
| `--out`<br>`--output` | `string` | | Output file (one attachment) or directory (default: the current directory) |
| `--overwrite` | `bool` | | Overwrite an existing file |
| `-p`<br>`--plain`<br>`--tsv` | `bool` | false | Output stable, parseable text to stdout (TSV; no colors) |
| `--quota-project` | `string` | | Google Cloud project to bill for API usage (sent as X-Goog-User-Project; some APIs require it with --access-token or ADC) |
| `--readonly` | `bool` | false | Block mutating API requests at runtime; auth add also requests read-only OAuth scopes |
| `--results-only` | `bool` | | In JSON mode, emit only the primary result (drops envelope fields like nextPageToken) |
| `--select`<br>`--pick`<br>`--project` | `string` | | In JSON mode, select comma-separated fields (best-effort; supports dot paths). Desire path: use --fields for most commands. |
| `-v`<br>`--verbose` | `bool` | | Enable verbose logging |
| `--version` | `kong.VersionFlag` | | Print version and exit |
| `--wrap-untrusted` | `bool` | false | In JSON/raw output, wrap fetched text fields in external untrusted-content markers |

## See Also

- [gog chat attachments](gog-chat-attachments.md)
- [Command index](README.md)
51 changes: 51 additions & 0 deletions docs/commands/gog-chat-attachments.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# `gog chat attachments`

> Generated from `gog schema --json`. Do not edit this page by hand; run `make docs-commands`.

Message attachments (read-only download)

## Usage

```bash
gog chat attachments <command>
```

## Parent

- [gog chat](gog-chat.md)

## Subcommands

- [gog chat attachments download](gog-chat-attachments-download.md) - Download a message's attachments read-only (spaces.messages.get + media.download)

## Flags

| Flag | Type | Default | Help |
| --- | --- | --- | --- |
| `--access-token` | `string` | | Use provided access token directly (bypasses stored refresh tokens; token expires in ~1h) |
| `-a`<br>`--account`<br>`--acct` | `string` | | Account email, alias, or auto for authenticated Google API commands |
| `--client` | `string` | | OAuth client name (selects stored credentials + token bucket) |
| `--color` | `string` | auto | Color output: auto\|always\|never |
| `--disable-commands` | `string` | | Comma-separated list of disabled commands; dot paths allowed |
| `-n`<br>`--dry-run`<br>`--dryrun`<br>`--noop`<br>`--preview` | `bool` | | Do not make changes; print intended actions and exit successfully |
| `--enable-commands` | `string` | | Comma-separated list of enabled command prefixes; dot paths allowed (restricts CLI) |
| `--enable-commands-exact` | `string` | | Comma-separated list of exact enabled commands; dot paths allowed and parent commands do not enable children |
| `-y`<br>`--force`<br>`--assume-yes`<br>`--yes` | `bool` | | Skip confirmations for destructive commands |
| `--gmail-no-send` | `bool` | false | Block Gmail send operations (agent safety) |
| `-h`<br>`--help` | `kong.helpFlag` | | Show context-sensitive help. |
| `--home` | `string` | | Override gogcli config/data/state/cache root (equivalent to GOG_HOME) |
| `-j`<br>`--json`<br>`--machine` | `bool` | false | Output JSON to stdout (best for scripting) |
| `--no-input`<br>`--non-interactive`<br>`--noninteractive` | `bool` | | Never prompt; fail instead (useful for CI) |
| `-p`<br>`--plain`<br>`--tsv` | `bool` | false | Output stable, parseable text to stdout (TSV; no colors) |
| `--quota-project` | `string` | | Google Cloud project to bill for API usage (sent as X-Goog-User-Project; some APIs require it with --access-token or ADC) |
| `--readonly` | `bool` | false | Block mutating API requests at runtime; auth add also requests read-only OAuth scopes |
| `--results-only` | `bool` | | In JSON mode, emit only the primary result (drops envelope fields like nextPageToken) |
| `--select`<br>`--pick`<br>`--project` | `string` | | In JSON mode, select comma-separated fields (best-effort; supports dot paths). Desire path: use --fields for most commands. |
| `-v`<br>`--verbose` | `bool` | | Enable verbose logging |
| `--version` | `kong.VersionFlag` | | Print version and exit |
| `--wrap-untrusted` | `bool` | false | In JSON/raw output, wrap fetched text fields in external untrusted-content markers |

## See Also

- [gog chat](gog-chat.md)
- [Command index](README.md)
1 change: 1 addition & 0 deletions docs/commands/gog-chat.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ gog chat <command> [flags]

## Subcommands

- [gog chat attachments](gog-chat-attachments.md) - Message attachments (read-only download)
- [gog chat dm](gog-chat-dm.md) - Direct messages
- [gog chat messages](gog-chat-messages.md) - Chat messages
- [gog chat spaces](gog-chat-spaces.md) - Chat spaces
Expand Down
9 changes: 5 additions & 4 deletions internal/cmd/chat.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
package cmd

type ChatCmd struct {
Spaces ChatSpacesCmd `cmd:"" name:"spaces" help:"Chat spaces"`
Messages ChatMessagesCmd `cmd:"" name:"messages" help:"Chat messages"`
Threads ChatThreadsCmd `cmd:"" name:"threads" help:"Chat threads"`
DM ChatDMCmd `cmd:"" name:"dm" help:"Direct messages"`
Spaces ChatSpacesCmd `cmd:"" name:"spaces" help:"Chat spaces"`
Messages ChatMessagesCmd `cmd:"" name:"messages" help:"Chat messages"`
Threads ChatThreadsCmd `cmd:"" name:"threads" help:"Chat threads"`
DM ChatDMCmd `cmd:"" name:"dm" help:"Direct messages"`
Attachments ChatAttachmentsCmd `cmd:"" name:"attachments" help:"Message attachments (read-only download)"`
}
Loading
Loading