Skip to content

feat(gmail): add thread attachments command#27

Merged
steipete merged 9 commits intoopenclaw:mainfrom
salmonumbrella:feat/gmail-thread-attachments-v2
Jan 5, 2026
Merged

feat(gmail): add thread attachments command#27
steipete merged 9 commits intoopenclaw:mainfrom
salmonumbrella:feat/gmail-thread-attachments-v2

Conversation

@salmonumbrella
Copy link
Copy Markdown
Contributor

Summary

  • Adds gog gmail thread attachments <threadId> command that lists all attachments in an email thread
  • Shows filename, size (human-readable format like "1.2 MB"), and MIME type for each attachment
  • Optional --download flag to download all attachments in one command
  • Optional --out-dir to specify download destination
  • Supports both JSON and text output formats

Usage

# List all attachments in a thread
gog gmail thread attachments <threadId>

# List attachments with JSON output
gog gmail thread attachments <threadId> --output json

# Download all attachments from a thread
gog gmail thread attachments <threadId> --download

# Download to specific directory
gog gmail thread attachments <threadId> --download --out-dir ./attachments

Test plan

  • Build passes
  • Existing Gmail tests pass
  • Manual testing with real threads

🤖 Generated with Claude Code

salmonumbrella and others added 7 commits January 2, 2026 07:09
Adds `gog gmail thread attachments <threadId>` command that lists all
attachments in an email thread with human-readable sizes.

Features:
- Lists attachments across all messages in a thread
- Shows filename, size (human-readable), and MIME type
- Optional --download flag to download all attachments
- Optional --out-dir to specify download directory
- Supports both JSON and text output formats

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add pre-flight keychain accessibility check to AuthTokensImportCmd.Run
to fail early if the keychain is locked, rather than after the user has
already completed the import process.

Also adds the EnsureKeychainAccess function to the secrets package which
performs a write/delete test to verify keychain accessibility on macOS.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Wrap keychain access error for wrapcheck linter
- Add blank lines before returns for wsl linter
- Define static error for err113 linter

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Enables `gog mail` and `gog email` as shortcuts for `gog gmail`.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add a headers map with common email headers (from, to, cc, bcc, subject,
date) to the JSON output of `gog gmail get`. This makes header extraction
much simpler:

  # Before (error-prone due to jq operator precedence)
  jq '.message.payload.headers[] | select(.name == "To") | .value'

  # After
  jq '.headers.to'

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@steipete steipete merged commit 72f251f into openclaw:main Jan 5, 2026
3 of 5 checks passed
steipete added a commit that referenced this pull request Jan 5, 2026
manascb1344 pushed a commit to manascb1344/gogcli that referenced this pull request Jan 15, 2026
* feat(gmail): add thread attachments command

Adds `gog gmail thread attachments <threadId>` command that lists all
attachments in an email thread with human-readable sizes.

Features:
- Lists attachments across all messages in a thread
- Shows filename, size (human-readable), and MIME type
- Optional --download flag to download all attachments
- Optional --out-dir to specify download directory
- Supports both JSON and text output formats

🤖 Generated with [Claude Code](https://claude.com/claude-code)

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

* feat(auth): check keychain before token import

Add pre-flight keychain accessibility check to AuthTokensImportCmd.Run
to fail early if the keychain is locked, rather than after the user has
already completed the import process.

Also adds the EnsureKeychainAccess function to the secrets package which
performs a write/delete test to verify keychain accessibility on macOS.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

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

* style: group const declarations for gofumpt

🤖 Generated with [Claude Code](https://claude.com/claude-code)

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

* fix: address lint issues in store.go

- Wrap keychain access error for wrapcheck linter
- Add blank lines before returns for wsl linter
- Define static error for err113 linter

🤖 Generated with [Claude Code](https://claude.com/claude-code)

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

* feat(cli): add mail and email aliases for gmail command

Enables `gog mail` and `gog email` as shortcuts for `gog gmail`.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

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

* feat(gmail): add flattened headers to gmail get JSON output

Add a headers map with common email headers (from, to, cc, bcc, subject,
date) to the JSON output of `gog gmail get`. This makes header extraction
much simpler:

  # Before (error-prone due to jq operator precedence)
  jq '.message.payload.headers[] | select(.name == "To") | .value'

  # After
  jq '.headers.to'

🤖 Generated with [Claude Code](https://claude.com/claude-code)

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

* fix(gmail): include inline attachments

* fix(secrets): dedupe keychain helpers

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Co-authored-by: Peter Steinberger <steipete@gmail.com>
manascb1344 pushed a commit to manascb1344/gogcli that referenced this pull request Jan 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants