Initial commit

This commit is contained in:
Zhongwei Li
2025-11-29 18:23:24 +08:00
commit 30bbbc890a
10 changed files with 1323 additions and 0 deletions

View File

@@ -0,0 +1,14 @@
{
"name": "google-gmail-tool",
"description": "google-gmail-tool-plugin",
"version": "0.1.0",
"author": {
"name": "Dennis Vriend"
},
"skills": [
"./skills"
],
"commands": [
"./commands"
]
}

3
README.md Normal file
View File

@@ -0,0 +1,3 @@
# google-gmail-tool
google-gmail-tool-plugin

31
commands/auth-check.md Normal file
View File

@@ -0,0 +1,31 @@
---
description: Verify OAuth credentials and API access
argument-hint:
---
Verify Google OAuth credentials and API access.
## Usage
```bash
google-gmail-tool auth check [-v|-vv|-vvv]
```
## Environment Variables
- `GOOGLE_GMAIL_TOOL_CREDENTIALS_JSON`: Full OAuth2 credentials as JSON
- `GOOGLE_GMAIL_TOOL_CREDENTIALS`: Path to credentials JSON file
## Examples
```bash
# Check authentication status
google-gmail-tool auth check
# Check with verbose output
google-gmail-tool auth check -vv
```
## Output
Returns status for Gmail, Calendar, Tasks, and Drive API access.

40
commands/calendar-list.md Normal file
View File

@@ -0,0 +1,40 @@
---
description: List calendar events with time filtering
argument-hint: timerange
---
List calendar events with optional filtering.
## Usage
```bash
google-gmail-tool calendar list [--today] [--this-week] [--query "TEXT"]
```
## Arguments
- `--today`: Events for today
- `--tomorrow`: Events for tomorrow
- `--this-week`: Events this week (Monday-Sunday)
- `--days N`: Events for next N days
- `--query "TEXT"`: Search query (title, description, location)
- `-n N`: Max results (default: 100)
- `--text`: Output in text format
- `-v/-vv/-vvv`: Verbosity (INFO/DEBUG/TRACE)
## Examples
```bash
# List this week's events
google-gmail-tool calendar list --this-week
# Find meetings about project
google-gmail-tool calendar list --query "project meeting"
# Today's events in text format
google-gmail-tool calendar list --today --text
```
## Output
Returns JSON array with id, summary, start, end, location, attendees.

39
commands/drive-search.md Normal file
View File

@@ -0,0 +1,39 @@
---
description: Search Google Drive files and folders
argument-hint: name
---
Search for files and folders in Google Drive.
## Usage
```bash
google-gmail-tool drive search [--name "NAME"] [--type TYPE]
```
## Arguments
- `--name "NAME"`: Search by file/folder name
- `--type TYPE`: Filter by type (document, spreadsheet, folder, pdf)
- `--owner me|others|anyone`: Filter by owner
- `--shared`: Show only shared files
- `-n N`: Max results (default: 50)
- `--text`: Output in text format
- `-v/-vv/-vvv`: Verbosity (INFO/DEBUG/TRACE)
## Examples
```bash
# Search by name
google-gmail-tool drive search --name "report"
# Find PDFs I own
google-gmail-tool drive search --type pdf --owner me
# Find shared spreadsheets
google-gmail-tool drive search --type spreadsheet --shared
```
## Output
Returns JSON array with id, name, mimeType, size, modified, webViewLink.

37
commands/mail-list.md Normal file
View File

@@ -0,0 +1,37 @@
---
description: List Gmail messages with filtering options
argument-hint: query
---
List Gmail messages or threads with optional filtering.
## Usage
```bash
google-gmail-tool mail list [--query "QUERY"] [--today] [-n N] [--text]
```
## Arguments
- `--query "QUERY"`: Gmail search query (optional)
- `--today`: Filter emails from today only
- `-n N`: Max results (default: 50, max: 500)
- `--text`: Output in text format
- `-v/-vv/-vvv`: Verbosity (INFO/DEBUG/TRACE)
## Examples
```bash
# List 50 most recent threads
google-gmail-tool mail list
# Find unread emails from today
google-gmail-tool mail list --today --query "is:unread"
# List with JSON output
google-gmail-tool mail list --query "from:team@company.com" -n 10
```
## Output
Returns JSON array with id, threadId, snippet, from, to, subject, date.

45
commands/mail-send.md Normal file
View File

@@ -0,0 +1,45 @@
---
description: Send email via Gmail API
argument-hint: to subject body
---
Send an email message via Gmail.
## Usage
```bash
google-gmail-tool mail send --to "EMAIL" --subject "SUBJECT" --body "BODY"
```
## Arguments
- `--to EMAIL`: Recipient email (required)
- `--subject TEXT`: Email subject (required)
- `--body TEXT`: Email body (required)
- `--cc EMAIL`: CC recipients (optional)
- `--bcc EMAIL`: BCC recipients (optional)
- `--html`: Send as HTML instead of plain text
- `--dry-run`: Preview without sending
- `-v/-vv/-vvv`: Verbosity (INFO/DEBUG/TRACE)
## Examples
```bash
# Send plain text email
google-gmail-tool mail send \
--to "user@example.com" \
--subject "Meeting Notes" \
--body "Here are the notes..."
# Send HTML email with CC
google-gmail-tool mail send \
--to "user@example.com" \
--cc "team@example.com" \
--subject "Report" \
--body "<h1>Report</h1>" \
--html
```
## Output
Returns success confirmation with message ID.

39
commands/task-list.md Normal file
View File

@@ -0,0 +1,39 @@
---
description: List Google Tasks with filtering
argument-hint: filter
---
List Google Tasks with status and date filtering.
## Usage
```bash
google-gmail-tool task list [--completed] [--incomplete] [--today]
```
## Arguments
- `--completed`: Show only completed tasks
- `--incomplete`: Show only incomplete tasks
- `--today`: Tasks due today
- `--overdue`: Tasks past due date
- `-n N`: Max results (default: 100)
- `--text`: Output in text format
- `-v/-vv/-vvv`: Verbosity (INFO/DEBUG/TRACE)
## Examples
```bash
# List all tasks
google-gmail-tool task list
# Show incomplete tasks due today
google-gmail-tool task list --incomplete --today
# Show overdue tasks
google-gmail-tool task list --overdue
```
## Output
Returns JSON array with id, title, notes, due, status, updated.

69
plugin.lock.json Normal file
View File

@@ -0,0 +1,69 @@
{
"$schema": "internal://schemas/plugin.lock.v1.json",
"pluginId": "gh:dnvriend/google-gmail-tool:plugins/google-gmail-tool",
"normalized": {
"repo": null,
"ref": "refs/tags/v20251128.0",
"commit": "51ef8eba6c649d55cd22b80dfc698da8e895ccb7",
"treeHash": "e874b64c4cd68daf9fec6cb8a6c3f13382cb054f32f5f3657aa1ecaa77465a1f",
"generatedAt": "2025-11-28T10:16:36.249253Z",
"toolVersion": "publish_plugins.py@0.2.0"
},
"origin": {
"remote": "git@github.com:zhongweili/42plugin-data.git",
"branch": "master",
"commit": "aa1497ed0949fd50e99e70d6324a29c5b34f9390",
"repoRoot": "/Users/zhongweili/projects/openmind/42plugin-data"
},
"manifest": {
"name": "google-gmail-tool",
"description": "google-gmail-tool-plugin",
"version": "0.1.0"
},
"content": {
"files": [
{
"path": "README.md",
"sha256": "6ba13dda849745fd50857d383a4757ef4f3d4e9caa77cb7740d02ce22d8ae988"
},
{
"path": ".claude-plugin/plugin.json",
"sha256": "f7858a3698adef0a8589913439e47bba48912880f26548bf1dc2722876c26edd"
},
{
"path": "commands/mail-list.md",
"sha256": "a378f73be1db046d2db6997db3d675ef54ddd90a8ea216fb200222697bd71ba2"
},
{
"path": "commands/task-list.md",
"sha256": "104e7838d732540661d025c23815a194c2c6a6ece3abfb4a9a9d52fa87e5887d"
},
{
"path": "commands/mail-send.md",
"sha256": "00460ba10ad7fe9463a901a94ebff45315cde8e3d1fd6265b749daf808c6062a"
},
{
"path": "commands/drive-search.md",
"sha256": "d4410960dbe5364c77e441d7326e70c0ea2750b7db15fe95e05764222c9185b7"
},
{
"path": "commands/calendar-list.md",
"sha256": "cb1558e665f3d3c11beef7b0b4452ebe6ba58c386db1fbf36dd93884465df041"
},
{
"path": "commands/auth-check.md",
"sha256": "a31ee045c6a6472a0dd9737bff7f4c41b6cf0714a469bc7ce2336a1b35896507"
},
{
"path": "skills/google-gmail-tool/SKILL.md",
"sha256": "b2a9275470da4fbee208d1e7a16843ace81800b62254d015b07208a88a76afc9"
}
],
"dirSha256": "e874b64c4cd68daf9fec6cb8a6c3f13382cb054f32f5f3657aa1ecaa77465a1f"
},
"security": {
"scannedAt": null,
"scannerVersion": null,
"flags": []
}
}

File diff suppressed because it is too large Load Diff