Commit Graph

715 Commits

Author SHA1 Message Date
Peter Steinberger
2bd8c347d0 fix(auth): preserve extra scopes replay and satisfy lint on current main (#421) (thanks @peteradams2026)
Some checks failed
ci / test (push) Has been cancelled
ci / worker (push) Has been cancelled
ci / windows (push) Has been cancelled
ci / darwin-cgo-build (push) Has been cancelled
2026-03-08 03:17:52 +00:00
Zainan Victor Zhou
b10c81a989 feat(auth): add --extra-scopes flag for fine-grained custom OAuth scope selection
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 03:14:44 +00:00
Peter Steinberger
97540c9f0d docs(changelog): credit watch token redaction landing (#136) (thanks @paveg) 2026-03-08 03:12:03 +00:00
Ryota Ikezawa
b49d9d4b92
fix(security): redact webhook bearer token in watch status output (#136)
The hook_token was printed in plaintext via `gmail watch status`, which
could leak the bearer token through terminal scrollback, CI logs, or
screen sharing.  Token is now masked by default (first 4 chars + length)
in both text and JSON output.  A new `--show-secrets` flag on the status
subcommand reveals the full value when explicitly requested.

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-03-08 03:11:32 +00:00
Peter Steinberger
7cc6acaeb7 fix(admin): harden directory command support (#403) (thanks @dl-alexandre) 2026-03-08 02:29:47 +00:00
Dalton Alexandre
1216e6282f feat(admin): add user and group management via Admin Directory API
Implements Google Admin SDK Directory API support for Workspace user and

group management with domain-wide delegation.

New commands:

- gog admin users list --domain example.com

- gog admin users get user@example.com

- gog admin users create user@example.com --given John --family Doe

- gog admin users suspend user@example.com

- gog admin groups list --domain example.com

- gog admin groups members list group@example.com

- gog admin groups members add group@example.com user@example.com --role MEMBER

- gog admin groups members remove group@example.com user@example.com

Closes #340

Note: This is a focused implementation of core user/group management.

For full GAM feature parity (PR #179), additional work would be needed

for: alerts, licenses, org units, printers, reports, vault, SSO, etc.
2026-03-08 02:29:47 +00:00
Fernando Pina dos Santos
ebdb23bf8e feat(chat): add messages reactions create/list/delete commands 2026-03-08 02:23:54 +00:00
Fernando Pina dos Santos
380d88c1a2 feat(chat): add messages reactions create/list/delete commands 2026-03-08 02:23:54 +00:00
Peter Steinberger
3c696c987d fix(sheets): harden named range support (#278) (thanks @TheCrazyLex) 2026-03-08 02:21:07 +00:00
Alex Naidis
1da21969a8 feat(sheets): add named ranges support
Adds a new `sheets named-ranges` command group to list/get/add/update/delete
named ranges via Sheets batchUpdate.

Extends range handling so `sheets format` and data-validation copy can target
named ranges, improves A1 parsing for GridRange-backed operations, and includes
reviewed safety/regression updates for range resolution and SheetId force-send.
2026-03-08 02:21:07 +00:00
Peter Steinberger
f94860c969 feat(docs): add pageless mode support (#300) (thanks @shohei-majima) 2026-03-08 02:16:10 +00:00
Peter Steinberger
efeef87498 test(contacts): satisfy relation parser lint checks (#351) (thanks @karbassi) 2026-03-08 01:31:46 +00:00
Peter Steinberger
e01388ad5f fix(contacts): satisfy relation lint checks (#351) (thanks @karbassi) 2026-03-08 01:31:46 +00:00
Peter Steinberger
b4ad4c76e4 feat(contacts): document relation field support (#351) (thanks @karbassi) 2026-03-08 01:31:46 +00:00
Ali Karbassi
05efcc18c9 feat(contacts): add --relation flag to create and update commands
Add CLI support for the People API relations field (spouse, child,
friend, etc.) via --relation type=person. Extract shared parseKeyValuePairs
helper to reduce duplication with --custom parsing.

Also fix pre-existing compile error in contactsApplyPersonName and
contactsApplyPersonOrganization parameter signatures.
2026-03-08 01:31:46 +00:00
Peter Steinberger
59898358f6 fix(gmail): satisfy label rename vet check (#391) (thanks @adam-zethraeus) 2026-03-08 01:17:29 +00:00
Peter Steinberger
b935d76592 feat(gmail): harden label rename resolution (#391) (thanks @adam-zethraeus) 2026-03-08 01:17:29 +00:00
adamz
a462f1da4b Gmail label renaming functionality 2026-03-08 01:17:29 +00:00
Peter Steinberger
d448264a27 feat(gmail): add single-message modify command (#281) (thanks @zerone0x) 2026-03-08 01:07:53 +00:00
zerone0x
643a255679 feat(gmail): add messages modify command for single-message label changes
Adds `gog gmail messages modify <messageId> --add <labels> --remove <labels>`
so users can add/remove labels on individual messages, not just threads.

Previously only `gmail thread modify` (all messages in a thread) and
`gmail batch modify` (multiple message IDs) were available. This fills the
gap for single-message label operations like trash, archive, or custom
label assignment.

Fixes #277

Co-Authored-By: Claude <noreply@anthropic.com>
2026-03-08 01:07:53 +00:00
Peter Steinberger
f22763c999 test(sheets): tighten update-note request coverage (#430) (thanks @andybergon) 2026-03-08 01:05:21 +00:00
Peter Steinberger
10a3511158 feat(sheets): update notes with repeatCell (#430) (thanks @andybergon) 2026-03-08 01:05:21 +00:00
Andrea Bergonzo
c4ea272db5 feat(sheets): add update-note command to write cell notes
The existing `notes` command reads cell notes but cannot write them.
Add `update-note` (alias: `set-note`) to set or clear notes via
batchUpdate with updateCells + fields: "note".

Supports --note for inline text, --note-file for file content,
single cells and ranges. Naming follows slides update-notes pattern.

Closes #429

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 01:05:21 +00:00
Peter Steinberger
70c751c400 test(auth): satisfy oauth redirect lint rules (#398) (thanks @salmonumbrella) 2026-03-08 00:59:23 +00:00
Peter Steinberger
efffd2dcd7 feat(auth): support redirect-uri in manual flows (#398) (thanks @salmonumbrella) 2026-03-08 00:59:23 +00:00
salmonumbrella
5ea6d607fb feat(auth): add --redirect-uri to remote/manual oauth flow 2026-03-08 00:59:23 +00:00
Peter Steinberger
52e34ac4a7 test(auth): remove rebase marker (#399) (thanks @carrotRakko) 2026-03-08 00:55:48 +00:00
Mitsuyuki Osabe
5919a7ed1e feat(auth): support pure service account mode without impersonation
Skip setting cfg.Subject when the subject matches the service account's
own client_email.  This lets a service account access only resources
explicitly shared with it, without requiring Domain-Wide Delegation.

Closes steipete/gogcli#346

✍️ Author: Claude Code with @carrotRakko (AI-written, human-approved)
2026-03-08 00:55:48 +00:00
Peter Steinberger
b8df361598 fix(calendar): preserve zero-minute popup reminders (#316) (thanks @salmonumbrella) 2026-03-08 00:38:37 +00:00
salmonumbrella
32991d4216 fix(calendar): force-send zero-minute reminder overrides 2026-03-08 00:38:37 +00:00
Peter Steinberger
2652d2a65c refactor(auth): simplify account and token-source resolution 2026-03-07 23:48:50 +00:00
Peter Steinberger
11efb052e5 feat(auth): add direct access-token mode (#419) (thanks @mmkal) 2026-03-07 23:39:43 +00:00
DBH
12a237deba
Fix: Clarify RFC3339 timezone requirement for calendar events (#409)
* Clarify RFC3339 timezone requirement for calendar events

* docs(calendar): clarify timestamp timezone requirement (#409) (thanks @dbhurley)

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-03-07 23:34:16 +00:00
Zeldris
ccfb573051
docs: brew official formula (#361)
* docs: brew official formula

* docs(install): note official Homebrew formula (#361) (thanks @zeldrisho)

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-03-07 23:32:53 +00:00
salmonumbrella
5576cd2d38
test(gmail): add regression coverage for CC in plain gmail get output (#343)
* test(gmail): add regression coverage for cc output in gmail get metadata

* fix(gmail): preserve cc metadata output in plain get (#343) (thanks @salmonumbrella)

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-03-07 23:31:07 +00:00
Christoph Stenglein
9471d81127
feat(root): show help if no args were provided (#342)
* feat(root): show help if no args were provided

* fix(root): show help when no args are provided (#342) (thanks @cstenglein)

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-03-07 23:28:32 +00:00
salmonumbrella
c04963b1ee
fix(security): guard risky filter/delegate/public-share actions (#317)
* fix(security): require confirmation for risky share/delegate/filter actions

* fix(lint): resolve contacts lints and format execute tests

* fix(security): guard risky share and delegate flows (#317) (thanks @salmonumbrella)

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-03-07 23:25:54 +00:00
Mahsum Aktaş
b6c5c79d42
fix(sheets): respect --plain flag for TSV output in metadata command (#298)
* fix(sheets): use tableWriter helper in metadata to respect --plain TSV output

The `sheets metadata` command was using `tabwriter.NewWriter` directly
instead of the `tableWriter` helper, which converts tab characters to
spaces for visual alignment. This broke `--plain` mode, which documents
stable TSV output for piping to external tools.

Changes:
- Replace direct `tabwriter.NewWriter` in `SheetsMetadataCmd` with
  `tableWriter(ctx)` helper (which already respects `IsPlain`)
- Remove unused `text/tabwriter` import from sheets.go
- Fix type mismatch in `contactsApplyPersonName` and
  `contactsApplyPersonOrganization` function signatures (#285)
- Add tests for plain TSV output in both `sheets get` and
  `sheets metadata` commands

Fixes #209
Fixes #285

* fix(sheets): respect plain TSV output in metadata (#298) (thanks @mahsumaktas)

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-03-07 23:23:33 +00:00
Peter Steinberger
ee63b190b2 test(auth,calendar): cover replay flags and timezone fallbacks 2026-03-07 23:02:32 +00:00
Peter Steinberger
cc3daa8e52 refactor(timezone): reuse shared timezone loading helpers 2026-03-07 22:58:59 +00:00
Peter Steinberger
04868d7e1b refactor(timezone): centralize timezone location loading 2026-03-07 22:58:38 +00:00
Peter Steinberger
c2ff0b6bda fix(secrets): tighten token verification tests (#270) (thanks @zerone0x) 2026-03-07 22:58:13 +00:00
zerone0x
19113b2a37 fix(secrets): verify token persisted after keyring write
On macOS, the Keychain can silently write 0-byte entries when it is
locked in a headless/server environment, even though Set returns no
error.  The pre-flight check (EnsureKeychainAccess) does not catch
every case because the Keychain can appear unlocked yet still drop
data.

Add a read-back verification after SetToken writes the primary token.
If the read-back fails or returns empty data, return an actionable
error that suggests switching to the file-based keyring backend.

Fixes #206

Co-Authored-By: Claude <noreply@anthropic.com>
2026-03-07 22:55:57 +00:00
Peter Steinberger
5d5ce28d47 fix(help): reuse full-help mode constant 2026-03-07 22:53:59 +00:00
Peter Steinberger
52f91e36b8 fix(calendar): harden primary timezone fallback 2026-03-07 22:52:19 +00:00
Peter Steinberger
248623f1df docs(changelog): note recurring timezone fix (#392) (thanks @salmonumbrella) 2026-03-07 22:47:24 +00:00
salmonumbrella
f3a957a1bc fix(lint): avoid err shadow in recurrence timezone enrichment 2026-03-07 22:47:24 +00:00
salmonumbrella
bc6d342e60 fix(calendar): preserve RRULE values and enforce recurring timezone 2026-03-07 22:47:24 +00:00
doodaaatimmy-creator
e50dba7a4a docs(changelog): note remote auth replay fix 2026-03-07 22:46:35 +00:00
doodaaatimmy-creator
43724ba380 fix(auth): preserve remote step 2 replay flags 2026-03-07 22:46:35 +00:00