Commit Graph

95 Commits

Author SHA1 Message Date
Peter Steinberger
6430dd1a99
fix(secrets): time out macOS keyring operations
Co-authored-by: Sardor Umarov <sardoru@gmail.com>
2026-04-27 11:22:17 +01:00
Peter Steinberger
8135cc3ff8
fix(secrets): make file keyring keys Windows-safe
Co-authored-by: solomonneas <srneas@gmail.com>
2026-04-27 11:20:48 +01:00
Peter Steinberger
068ff0e593
feat(backup): expand workspace backup coverage 2026-04-27 11:13:40 +01:00
Peter Steinberger
6f917ee74e
feat(backup): add workspace service adapters 2026-04-27 10:31:44 +01:00
Peter Steinberger
ee9b552dcd
feat(backup): add plaintext read and export commands 2026-04-27 10:15:26 +01:00
Peter Steinberger
e49e9f45c3
feat(backup): add encrypted Google backups 2026-04-27 09:19:06 +01:00
Peter Steinberger
64ab3772bf
feat(gmail,contacts): land label style and contact gender
Co-authored-by: iskkw9973 <ishikawam.dev@gmail.com>
Co-authored-by: klodr <klodr@users.noreply.github.com>
2026-04-20 19:17:47 +01:00
Peter Steinberger
dbeca138c3
docs: add generated command reference 2026-04-20 19:06:53 +01:00
spencer-c-reed
13a1aaea13
feat(gmail): add forward command
Add `gog gmail forward` / `gog gmail fwd` with optional notes, verified send-as selection, forwarded headers, thread metadata, and attachment carry-over.

Hardening in this landing pass:
- include forward/fwd in Gmail no-send guard paths
- enforce per-account no-send before any Gmail API fetch/send work
- de-duplicate forwarded header formatting and test service setup
- update README, spec, and changelog

Validation:
- make fmt
- go test ./internal/cmd -run Forward\|NoSend
- make lint && make test && make build
- make ci
- clawdbot live smoke: read-only gmail search/thread get, forward dry-run with real message id, --gmail-no-send forward blocked before send

Co-authored-by: Spencer Reed <spencer.cavendish.reed@gmail.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-20 17:28:27 +01:00
Alex Hillman
db3a32432c
feat(calendar): add secondary calendar creation
Adds `gog calendar create-calendar` / `new-calendar` for secondary Google Calendar creation with summary, description, timezone, and location.

Landing polish:
- removed unrelated `.byline` cache files from the PR branch
- validates IANA timezone names locally
- dry-run no longer opens the Calendar service
- includes location in text output
- added request/body, text, dry-run, and validation tests
- README/spec/CHANGELOG entries

Local verification:
- go test ./internal/cmd -run TestCalendarCreateCalendarCmd
- make lint
- make test
- make build
- make ci
- live Calendar smoke with clawdbot@gmail.com: created secondary calendar, verified summary/timezone/location, deleted it via the same auth path

Thanks @alexknowshtml.

Co-authored-by: Alex Hillman <alex@indyhall.org>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-20 17:14:11 +01:00
Gianfranco P
a1fd0a8333
feat(slides): add rendered slide thumbnails
Adds `gog slides thumbnail` / `thumb` for rendered slide thumbnail URLs and optional PNG/JPEG downloads.

Landing polish:
- supports `--out` with `--output` alias
- uses shared output-file helper for expansion, parent creation, and private perms
- preserves close/write errors
- adds missing presentation-id test plus docs/spec/CHANGELOG

Local verification:
- go test ./internal/cmd -run TestSlidesThumbnail
- make lint
- make test
- make build
- make ci
- live Slides smoke with clawdbot@gmail.com: created deck, listed slide, downloaded medium PNG thumbnail, verified PNG bytes, trashed deck

Thanks @gianpaj.

Co-authored-by: gianpaj <gianpa@gmail.com>
2026-04-20 16:52:53 +01:00
Ben Lewis
5d332f7746
feat(drive): convert Markdown uploads to Docs
Adds Markdown upload conversion to Google Docs via `--convert` / `--convert-to doc`, strips leading YAML frontmatter by default, and provides `--keep-frontmatter` for the opt-out path.

Landing polish:
- byte-based frontmatter stripping with BOM/CRLF coverage
- Drive upload media tests for stripped and preserved frontmatter
- README/spec/CHANGELOG coverage

Local verification:
- focused `go test ./internal/cmd -run ...`
- make lint
- make test
- make build
- make ci
- live Drive smoke with clawdbot@gmail.com: converted Markdown upload, Markdown export verified no frontmatter, opt-out verified preserved content, both files trashed

Thanks @johnbenjaminlewis.

Co-authored-by: Ben Lewis <johnbenjaminlewis@gmail.com>
2026-04-20 16:39:48 +01:00
takashiyamaguchi
c73bb23fec
feat(auth): add credentials remove command
Adds `gog auth credentials remove [<client>|all]` with token/domain cleanup, JSON output, dry-run support, docs, and regression tests.

Local verification:
- make fmt
- make lint
- make test
- make build
- make ci

Thanks @yamagucci.

Co-authored-by: takashiyamaguchi <yama0628taka@gmail.com>
2026-04-20 16:32:03 +01:00
Peter Steinberger
2d0533557c
docs(readme): sync examples with CLI 2026-04-20 16:15:51 +01:00
Peter Steinberger
d84148a424
feat(gmail): add command and send safety guards
Co-authored-by: EricYangTL <eric@topazlabs.com>
Co-authored-by: spookyuser <16196262+spookyuser@users.noreply.github.com>
Co-authored-by: VeteranBV <henrysowell@gmail.com>
2026-04-20 16:05:19 +01:00
Peter Steinberger
c4665c4bff
feat(auth): add ads service and keyring namespace override
Co-authored-by: Umar Khan <ufkhan97@gmail.com>

Co-authored-by: Matthias Kurz <m.kurz@irregular.at>
2026-04-20 15:29:03 +01:00
Peter Steinberger
68e0e2e6ba
chore(deps): update dependencies 2026-04-20 13:06:44 +01:00
Peter Steinberger
4067cc6e57
feat(gmail): add autoreply command 2026-03-13 17:02:21 +00:00
Peter Steinberger
e19bac1f1d feat(calendar): improve selection and recurring scope handling (#319) (thanks @salmonumbrella) 2026-03-09 03:16:58 +00:00
Peter Steinberger
77f0798461 fix(auth): add proxy-friendly OAuth callback flags (#227) (thanks @cyberfox) 2026-03-09 02:58:53 +00:00
penguinco
922c1fbb8b feat(slides): add create-from-template command with text replacement
Adds `gog slides create-from-template` command to create presentations
from templates with automatic placeholder text replacement.

Features:
- {{key}} placeholder format (auto-wrapped)
- Multiple replacement sources: --replace flags and --replacements JSON file
- Type conversion for JSON (numbers, booleans → strings)
- --exact flag for arbitrary string replacement
- Replacement statistics in output
- JSON/text output modes

Implementation:
- Copy template via Drive API
- Batch text replacement via Slides API ReplaceAllText
- Comprehensive error handling and validation
- 7 test cases covering all features and edge cases

Usage: gog slides create-from-template <templateId> <title> \
    --replace "key=value" \
    --replacements data.json
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-03-08 04:43:36 +00:00
Peter Steinberger
ffd8cd482b feat(docs): add html export format (#141) (thanks @in-liberty420) 2026-03-08 04:36:21 +00:00
Filip Prochazka
15e58b015d feat(docs): add markdown (md) export format via Google Drive API
Google added native text/markdown export support for Google Docs in
July 2024. This wires up the existing Drive export pipeline to support
--format md, leveraging Google's server-side conversion.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-08 04:24:23 +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
b4ad4c76e4 feat(contacts): document relation field support (#351) (thanks @karbassi) 2026-03-08 01:31:46 +00:00
Peter Steinberger
b935d76592 feat(gmail): harden label rename resolution (#391) (thanks @adam-zethraeus) 2026-03-08 01:17:29 +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
caf38a3d33
fix(gmail-watch): delay history fetch in watch serve (#397)
* fix(gmail-watch): delay history fetch in watch serve

* fix: land gmail watch fetch delay and changelog (#397) (thanks @salmonumbrella)

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-03-07 14:54:54 +00:00
Peter Steinberger
9eb42121e9 docs: update drive ls --all docs/changelog (#107) (thanks @struong) 2026-03-03 05:06:17 +00:00
Peter Steinberger
0041b1f86a fix(auth): document gmail scope + readonly scope behavior (#113) (thanks @salmonumbrella) 2026-03-03 03:58:53 +00:00
daniel
3e85dcf8ba feat(sedmat): add paragraph addressing and structure introspection
Add paragraph-number addressing (5d, 3s/.*/text/, $a/text/) and
`docs structure` / `docs cat -N` commands for paragraph-level
document manipulation.

New commands:
- `docs structure` — numbered paragraph list with types (text + JSON)
- `docs cat -N` — cat with [N] paragraph prefixes

Address syntax for `docs sed`:
- Nd (delete paragraph N), N,Md (range delete), $d (last)
- Ns/pat/repl/ (substitute within paragraph N)
- Na/text/ (append after N), Ni/text/ (insert before N)
- --tab flag for multi-tab document support

Testing:
- 24 new unit tests covering parseAddress (13 cases),
  parseFullExpr_Addressed (10 cases), resolveAddress (6 cases),
  and buildParagraphMap (8 cases). All pass.
- Manual testing against live Google Docs verified: structure,
  cat -N, addressed substitute, delete, append, insert, dollar
  addressing, and range delete.
- Bug found and fixed during manual testing: addressed a/text/
  and i/text/ were parsed by parseAICommand (expects a/pat/text/)
  which put text in the pattern field instead of replacement,
  producing empty paragraphs. Added parseAddressedAICommand for
  the single-field addressed form.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-01 14:15:08 -05:00
Vinston
b867e5beb7 docs(sed): sedmat v3.5 reference documentation 2026-02-23 09:34:41 -05:00
salmonumbrella
9977c0bedb
fix(gmail/calendar): ISO-2022-JP decoding, cc/bcc headers, calendar selection (#131)
* fix(gmail): decode ISO-2022-JP bodies

* fix(gmail): include cc/bcc in get output

* feat(calendar): allow selecting calendars in events

* test(gmail): add edge case tests for ISO-2022-JP decoding

Add tests for edge cases in ISO-2022-JP body decoding:
- Mixed ASCII and Japanese text (e.g., "Hello こんにちは World")
- Empty content with ISO-2022-JP charset header
- Malformed ISO-2022-JP sequences (graceful degradation)
- Truncated escape sequences

These tests verify the graceful fallback behavior in decodeBodyCharset
which returns original data if decoding fails.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* fix(calendar): validate unknown calendar names in resolveCalendarIDs

When a calendar name doesn't match any known calendar (not in bySummary
or byID maps), return an error listing the unrecognized names instead
of treating them as raw calendar IDs which causes cryptic Google API
errors.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* fix(calendar): validate unknown and ambiguous calendar name resolutions

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-02-16 06:56:42 +01:00
Peter Steinberger
8d7895df6c feat(gmail): land history types watch filtering (#168)
Co-authored-by: salmonumbrella <182032677+salmonumbrella@users.noreply.github.com>
2026-02-16 04:39:03 +01:00
Peter Steinberger
268c5b8e6f docs: refresh readme/spec for 0.11 2026-02-15 04:35:09 +01:00
Peter Steinberger
91c4c15884 chore(release): v0.11.0
Some checks failed
ci / test (push) Has been cancelled
ci / worker (push) Has been cancelled
ci / darwin-cgo-build (push) Has been cancelled
2026-02-15 04:28:24 +01:00
Peter Steinberger
f1c2b9dbab refactor(cmd): unify result output 2026-02-15 04:16:13 +01:00
Peter Steinberger
7dbf57e191 fix(drive): add trash output + delete tests 2026-02-15 01:35:11 +01:00
Peter Steinberger
3d9c618ce0 feat(drive): add --no-all-drives to ls/search 2026-02-14 20:43:10 +01:00
Peter Steinberger
e61769cb1b
feat(contacts): update contacts from JSON
Supersedes #200.

- Add `contacts update --from-file <path|->` + `--ignore-etag`
- Update mask from JSON keys; clears via `[]`/`null`
- ETag safety + resourceName validation
- Docs/tests/README/CHANGELOG updates

Co-authored-by: Jeremy Rossi <jeremy@jeremyrossi.com>
2026-02-14 15:31:14 +01:00
salmonumbrella
3371e3f3ad
feat(cli): agent ergonomics + gmail watch exclude labels (#201)
* feat(cli): improve agent ergonomics

* fix(cli): address code review findings

- Fix nil pointer dereference in confirmDestructive when flags is nil
- Deduplicate dry-run logic by delegating to dryRunExit
- Remove deprecated net.Error.Temporary() call (dead since Go 1.18)
- Add unit tests for resolveTasklistID and resolveCalendarID

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: resolve PR #201 conflicts and follow-ups (#201) (thanks @salmonumbrella)

* fix: resolve rebase fallout for PR #201 landing (#201) (thanks @salmonumbrella)

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-02-14 03:09:49 +01:00
Ross Sivertsen - Systems Sherpa
077f9a3620
contacts: support --birthday and --notes in contacts update (#233)
* contacts: allow updating birthday and notes

* fix(cli): unify date parsing + cover contacts birthday/notes (#233) (thanks @rosssivertsen)

---------

Co-authored-by: Ross Sivertsen <ross@canyoncreek.co>
Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-02-13 18:16:49 +01:00
Peter Steinberger
2ecdf2f147 feat(drive): add upload conversion flags
Add Drive upload conversion with auto detection (--convert) and explicit targets (--convert-to), preserve explicit --name values, and improve conversion behavior tests/docs for PR #240.

Co-authored-by: Daniel Weber <daniel@suno.com>
2026-02-13 16:38:19 +01:00
salmonumbrella
2df8ece2f6
fix(auth): enforce remote manual auth state (#187)
* fix(gmail): fallback to send-as list for display name

* refactor(gmail): remove dead code in primarySendAsDisplayNameFromList

The condition `primary == nil && sa.IsPrimary` inside the email-matching
block can never be true because `primary` is already unconditionally set
to `sa` when `sa.IsPrimary` is true earlier in the same loop iteration.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* test(gmail): add --from display name fallback to list test

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* feat(auth): persist manual oauth state

* feat(cli): add remote manual auth flow

* fix(auth): enforce remote manual auth state

* fix(auth): satisfy lint for manual auth flow

* fix(auth): harden remote manual auth state cache

* chore: update changelog for remote manual auth (#187) (thanks @salmonumbrella)

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-02-09 10:38:26 -08:00
Daniel Weber
e3cb940780
feat(drive): add --domain flag to share command (#192)
* feat(drive): add --domain flag to share command

Allow sharing files/folders with an entire Google Workspace domain
(e.g. `gog drive share <id> --domain=example.com --role=writer`).
This creates a "domain" type permission in the Drive API, enabling
the "Anyone in <org> with the link" sharing mode.

Also updates `permissions` output to display domain names.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* feat(drive): add --to target for share (#192) (thanks @Danielkweber)

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-02-06 16:42:39 -08:00
Peter Steinberger
99d957581f feat(auth): add multi-org login
Some checks failed
ci / test (push) Has been cancelled
ci / worker (push) Has been cancelled
ci / darwin-cgo-build (push) Has been cancelled
2026-01-22 04:04:14 +00:00
Mariano Belinky
c340914688 feat(gmail): add message search + decode bodies 2026-01-22 01:12:09 +00:00
salmonumbrella
4f29d8e250 feat(calendar): add timezone/local times to outputs 2026-01-21 10:57:37 +00:00
salmonumbrella
33685adafe feat: add chat support and expand people commands 2026-01-18 05:42:12 +00:00
salmonumbrella
2cdeb8bf73 feat(cli): expand calendar event types and tasks 2026-01-17 07:46:21 +00:00