Documentation
¶
Index ¶
- func Execute(args []string) (err error)
- func ExitCode(err error) int
- func VersionString() string
- type AuthAddCmd
- type AuthCmd
- type AuthCredentialsCmd
- type AuthKeepCmd
- type AuthKeyringCmd
- type AuthListCmd
- type AuthManageCmd
- type AuthRemoveCmd
- type AuthServiceAccountCmd
- type AuthServiceAccountSetCmd
- type AuthServiceAccountStatusCmd
- type AuthServiceAccountUnsetCmd
- type AuthServicesCmd
- type AuthStatusCmd
- type AuthTokensCmd
- type AuthTokensDeleteCmd
- type AuthTokensExportCmd
- type AuthTokensImportCmd
- type AuthTokensListCmd
- type CLI
- type CalendarAclCmd
- type CalendarCalendarsCmd
- type CalendarCmd
- type CalendarColorsCmd
- type CalendarConflictsCmd
- type CalendarCreateCmd
- type CalendarDeleteCmd
- type CalendarEventCmd
- type CalendarEventsCmd
- type CalendarFocusTimeCmd
- type CalendarFreeBusyCmd
- type CalendarOOOCmd
- type CalendarRespondCmd
- type CalendarSearchCmd
- type CalendarTeamCmd
- type CalendarTimeCmd
- type CalendarUpdateCmd
- type CalendarUsersCmd
- type CalendarWorkingLocationCmd
- type CompletionCmd
- type ContactsCmd
- type ContactsCreateCmd
- type ContactsDeleteCmd
- type ContactsDirectoryCmd
- type ContactsDirectoryListCmd
- type ContactsDirectorySearchCmd
- type ContactsGetCmd
- type ContactsListCmd
- type ContactsOtherCmd
- type ContactsOtherDeleteCmd
- type ContactsOtherListCmd
- type ContactsOtherSearchCmd
- type ContactsSearchCmd
- type ContactsUpdateCmd
- type DocsCatCmd
- type DocsCmd
- type DocsCopyCmd
- type DocsCreateCmd
- type DocsExportCmd
- type DocsInfoCmd
- type DriveCmd
- type DriveCommentReplyCmd
- type DriveCommentsCmd
- type DriveCommentsCreateCmd
- type DriveCommentsDeleteCmd
- type DriveCommentsGetCmd
- type DriveCommentsListCmd
- type DriveCommentsUpdateCmd
- type DriveCopyCmd
- type DriveDeleteCmd
- type DriveDownloadCmd
- type DriveGetCmd
- type DriveLsCmd
- type DriveMkdirCmd
- type DriveMoveCmd
- type DrivePermissionsCmd
- type DriveRenameCmd
- type DriveSearchCmd
- type DriveShareCmd
- type DriveURLCmd
- type DriveUnshareCmd
- type DriveUploadCmd
- type ExitError
- type GmailAttachmentCmd
- type GmailAutoForwardCmd
- type GmailAutoForwardGetCmd
- type GmailAutoForwardUpdateCmd
- type GmailBatchCmd
- type GmailBatchDeleteCmd
- type GmailBatchModifyCmd
- type GmailCmd
- type GmailDelegatesAddCmd
- type GmailDelegatesCmd
- type GmailDelegatesGetCmd
- type GmailDelegatesListCmd
- type GmailDelegatesRemoveCmd
- type GmailDraftsCmd
- type GmailDraftsCreateCmd
- type GmailDraftsDeleteCmd
- type GmailDraftsGetCmd
- type GmailDraftsListCmd
- type GmailDraftsSendCmd
- type GmailDraftsUpdateCmd
- type GmailFiltersCmd
- type GmailFiltersCreateCmd
- type GmailFiltersDeleteCmd
- type GmailFiltersGetCmd
- type GmailFiltersListCmd
- type GmailForwardingCmd
- type GmailForwardingCreateCmd
- type GmailForwardingDeleteCmd
- type GmailForwardingGetCmd
- type GmailForwardingListCmd
- type GmailGetCmd
- type GmailHistoryCmd
- type GmailLabelsCmd
- type GmailLabelsCreateCmd
- type GmailLabelsGetCmd
- type GmailLabelsListCmd
- type GmailLabelsModifyCmd
- type GmailSearchCmd
- type GmailSendAsCmd
- type GmailSendAsCreateCmd
- type GmailSendAsDeleteCmd
- type GmailSendAsGetCmd
- type GmailSendAsListCmd
- type GmailSendAsUpdateCmd
- type GmailSendAsVerifyCmd
- type GmailSendCmd
- type GmailSettingsCmd
- type GmailThreadAttachmentsCmd
- type GmailThreadCmd
- type GmailThreadGetCmd
- type GmailThreadModifyCmd
- type GmailTrackCmd
- type GmailTrackOpensCmd
- type GmailTrackSetupCmd
- type GmailTrackStatusCmd
- type GmailURLCmd
- type GmailVacationCmd
- type GmailVacationGetCmd
- type GmailVacationUpdateCmd
- type GmailWatchCmd
- type GmailWatchRenewCmd
- type GmailWatchServeCmd
- type GmailWatchStartCmd
- type GmailWatchStatusCmd
- type GmailWatchStopCmd
- type GroupsCmd
- type GroupsListCmd
- type GroupsMembersCmd
- type KeepAttachmentCmd
- type KeepCmd
- type KeepGetCmd
- type KeepListCmd
- type KeepSearchCmd
- type OutputDirFlag
- type OutputPathFlag
- type OutputPathRequiredFlag
- type PeopleCmd
- type PeopleMeCmd
- type RootFlags
- type SheetsAppendCmd
- type SheetsClearCmd
- type SheetsCmd
- type SheetsCopyCmd
- type SheetsCreateCmd
- type SheetsExportCmd
- type SheetsGetCmd
- type SheetsMetadataCmd
- type SheetsUpdateCmd
- type SlidesCmd
- type SlidesCopyCmd
- type SlidesCreateCmd
- type SlidesExportCmd
- type SlidesInfoCmd
- type TasksAddCmd
- type TasksClearCmd
- type TasksCmd
- type TasksDeleteCmd
- type TasksDoneCmd
- type TasksListCmd
- type TasksListsCmd
- type TasksListsCreateCmd
- type TasksListsListCmd
- type TasksUndoCmd
- type TasksUpdateCmd
- type TimeRange
- type TimeRangeDefaults
- type TimeRangeFlags
- type VersionCmd
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func VersionString ¶ added in v0.3.0
func VersionString() string
Types ¶
type AuthAddCmd ¶ added in v0.4.2
type AuthAddCmd struct {
Email string `arg:"" name:"email" help:"Email"`
Manual bool `name:"manual" help:"Browserless auth flow (paste redirect URL)"`
ForceConsent bool `name:"force-consent" help:"Force consent screen to obtain a refresh token"`
ServicesCSV string `` /* 163-byte string literal not displayed */
Readonly bool `name:"readonly" help:"Use read-only scopes where available (still includes OIDC identity scopes)"`
DriveScope string `name:"drive-scope" help:"Drive scope mode: full|readonly|file" enum:"full,readonly,file" default:"full"`
}
type AuthCmd ¶ added in v0.4.2
type AuthCmd struct {
Credentials AuthCredentialsCmd `cmd:"" name:"credentials" help:"Store OAuth client credentials"`
Add AuthAddCmd `cmd:"" name:"add" help:"Authorize and store a refresh token"`
Services AuthServicesCmd `cmd:"" name:"services" help:"List supported auth services and scopes"`
List AuthListCmd `cmd:"" name:"list" help:"List stored accounts"`
Status AuthStatusCmd `cmd:"" name:"status" help:"Show auth configuration and keyring backend"`
Keyring AuthKeyringCmd `cmd:"" name:"keyring" help:"Configure keyring backend"`
Remove AuthRemoveCmd `cmd:"" name:"remove" help:"Remove a stored refresh token"`
Tokens AuthTokensCmd `cmd:"" name:"tokens" help:"Manage stored refresh tokens"`
Manage AuthManageCmd `cmd:"" name:"manage" help:"Open accounts manager in browser" aliases:"login"`
ServiceAcct AuthServiceAccountCmd `cmd:"" name:"service-account" help:"Configure service account (Workspace only; domain-wide delegation)"`
Keep AuthKeepCmd `cmd:"" name:"keep" help:"Configure service account for Google Keep (Workspace only)"`
}
type AuthCredentialsCmd ¶ added in v0.4.2
type AuthCredentialsCmd struct {
Path string `arg:"" name:"credentials" help:"Path to credentials.json or '-' for stdin"`
}
type AuthKeepCmd ¶ added in v0.5.0
type AuthKeyringCmd ¶ added in v0.5.0
type AuthListCmd ¶ added in v0.4.2
type AuthManageCmd ¶ added in v0.4.2
type AuthRemoveCmd ¶ added in v0.4.2
type AuthRemoveCmd struct {
Email string `arg:"" name:"email" help:"Email"`
}
type AuthServiceAccountCmd ¶ added in v0.6.0
type AuthServiceAccountCmd struct {
Set AuthServiceAccountSetCmd `cmd:"" name:"set" help:"Store a service account key for impersonation"`
Unset AuthServiceAccountUnsetCmd `cmd:"" name:"unset" help:"Remove stored service account key"`
Status AuthServiceAccountStatusCmd `cmd:"" name:"status" help:"Show stored service account key status"`
}
type AuthServiceAccountSetCmd ¶ added in v0.6.0
type AuthServiceAccountStatusCmd ¶ added in v0.6.0
type AuthServiceAccountStatusCmd struct {
Email string `arg:"" name:"email" help:"Email (impersonated user)" required:""`
}
type AuthServiceAccountUnsetCmd ¶ added in v0.6.0
type AuthServiceAccountUnsetCmd struct {
Email string `arg:"" name:"email" help:"Email (impersonated user)" required:""`
}
type AuthServicesCmd ¶ added in v0.5.0
type AuthServicesCmd struct {
Markdown bool `name:"markdown" help:"Output Markdown table"`
}
type AuthStatusCmd ¶ added in v0.5.0
type AuthStatusCmd struct{}
type AuthTokensCmd ¶ added in v0.4.2
type AuthTokensCmd struct {
List AuthTokensListCmd `cmd:"" name:"list" help:"List stored tokens (by key only)"`
Delete AuthTokensDeleteCmd `cmd:"" name:"delete" help:"Delete a stored refresh token"`
Export AuthTokensExportCmd `cmd:"" name:"export" help:"Export a refresh token to a file (contains secrets)"`
Import AuthTokensImportCmd `cmd:"" name:"import" help:"Import a refresh token file into keyring (contains secrets)"`
}
type AuthTokensDeleteCmd ¶ added in v0.4.2
type AuthTokensDeleteCmd struct {
Email string `arg:"" name:"email" help:"Email"`
}
type AuthTokensExportCmd ¶ added in v0.4.2
type AuthTokensExportCmd struct {
Email string `arg:"" name:"email" help:"Email"`
Output OutputPathRequiredFlag `embed:""`
Overwrite bool `name:"overwrite" help:"Overwrite output file if it exists"`
}
type AuthTokensImportCmd ¶ added in v0.4.2
type AuthTokensImportCmd struct {
InPath string `arg:"" name:"inPath" help:"Input path or '-' for stdin"`
}
type AuthTokensListCmd ¶ added in v0.4.2
type AuthTokensListCmd struct{}
type CLI ¶ added in v0.4.2
type CLI struct {
RootFlags `embed:""`
Version kong.VersionFlag `help:"Print version and exit"`
Auth AuthCmd `cmd:"" help:"Auth and credentials"`
Groups GroupsCmd `cmd:"" help:"Google Groups"`
Drive DriveCmd `cmd:"" help:"Google Drive"`
Docs DocsCmd `cmd:"" help:"Google Docs (export via Drive)"`
Slides SlidesCmd `cmd:"" help:"Google Slides"`
Calendar CalendarCmd `cmd:"" help:"Google Calendar"`
Gmail GmailCmd `cmd:"" aliases:"mail,email" help:"Gmail"`
Contacts ContactsCmd `cmd:"" help:"Google Contacts"`
Tasks TasksCmd `cmd:"" help:"Google Tasks"`
People PeopleCmd `cmd:"" help:"Google People"`
Keep KeepCmd `cmd:"" help:"Google Keep (Workspace only)"`
Sheets SheetsCmd `cmd:"" help:"Google Sheets"`
VersionCmd VersionCmd `cmd:"" name:"version" help:"Print version"`
Completion CompletionCmd `cmd:"" help:"Generate shell completion scripts"`
}
type CalendarAclCmd ¶ added in v0.4.2
type CalendarCalendarsCmd ¶ added in v0.4.2
type CalendarCmd ¶ added in v0.4.2
type CalendarCmd struct {
Calendars CalendarCalendarsCmd `cmd:"" name:"calendars" help:"List calendars"`
ACL CalendarAclCmd `cmd:"" name:"acl" help:"List calendar ACL"`
Events CalendarEventsCmd `cmd:"" name:"events" aliases:"list" help:"List events from a calendar or all calendars"`
Event CalendarEventCmd `cmd:"" name:"event" help:"Get event"`
Create CalendarCreateCmd `cmd:"" name:"create" help:"Create an event"`
Update CalendarUpdateCmd `cmd:"" name:"update" help:"Update an event"`
Delete CalendarDeleteCmd `cmd:"" name:"delete" help:"Delete an event"`
FreeBusy CalendarFreeBusyCmd `cmd:"" name:"freebusy" help:"Get free/busy"`
Respond CalendarRespondCmd `cmd:"" name:"respond" help:"Respond to an event invitation"`
Colors CalendarColorsCmd `cmd:"" name:"colors" help:"Show calendar colors"`
Conflicts CalendarConflictsCmd `cmd:"" name:"conflicts" help:"Find conflicts"`
Search CalendarSearchCmd `cmd:"" name:"search" help:"Search events"`
Time CalendarTimeCmd `cmd:"" name:"time" help:"Show server time"`
Users CalendarUsersCmd `cmd:"" name:"users" help:"List workspace users (use their email as calendar ID)"`
Team CalendarTeamCmd `cmd:"" name:"team" help:"Show events for all members of a Google Group"`
FocusTime CalendarFocusTimeCmd `cmd:"" name:"focus-time" help:"Create a Focus Time block"`
OOO CalendarOOOCmd `cmd:"" name:"out-of-office" aliases:"ooo" help:"Create an Out of Office event"`
WorkingLocation CalendarWorkingLocationCmd `cmd:"" name:"working-location" aliases:"wl" help:"Set working location (home/office/custom)"`
}
type CalendarColorsCmd ¶ added in v0.4.2
type CalendarColorsCmd struct{}
type CalendarConflictsCmd ¶ added in v0.4.2
type CalendarConflictsCmd struct {
From string `name:"from" help:"Start time (RFC3339, date, or relative: today, tomorrow, monday)"`
To string `name:"to" help:"End time (RFC3339, date, or relative)"`
Today bool `name:"today" help:"Today only (timezone-aware)"`
Week bool `name:"week" help:"This week (uses --week-start, default Mon)"`
Days int `name:"days" help:"Next N days (timezone-aware)" default:"0"`
WeekStart string `name:"week-start" help:"Week start day for --week (sun, mon, ...)" default:""`
Calendars string `name:"calendars" help:"Comma-separated calendar IDs" default:"primary"`
}
type CalendarCreateCmd ¶ added in v0.4.2
type CalendarCreateCmd struct {
CalendarID string `arg:"" name:"calendarId" help:"Calendar ID"`
Summary string `name:"summary" help:"Event summary/title"`
From string `name:"from" help:"Start time (RFC3339)"`
To string `name:"to" help:"End time (RFC3339)"`
Description string `name:"description" help:"Description"`
Location string `name:"location" help:"Location"`
Attendees string `name:"attendees" help:"Comma-separated attendee emails"`
AllDay bool `name:"all-day" help:"All-day event (use date-only in --from/--to)"`
Recurrence []string `name:"rrule" help:"Recurrence rules (e.g., 'RRULE:FREQ=MONTHLY;BYMONTHDAY=11'). Can be repeated."`
Reminders []string `name:"reminder" help:"Custom reminders as method:duration (e.g., popup:30m, email:1d). Can be repeated (max 5)."`
ColorId string `name:"event-color" help:"Event color ID (1-11). Use 'gog calendar colors' to see available colors."`
Visibility string `name:"visibility" help:"Event visibility: default, public, private, confidential"`
Transparency string `name:"transparency" help:"Show as busy (opaque) or free (transparent). Aliases: busy, free"`
SendUpdates string `name:"send-updates" help:"Notification mode: all, externalOnly, none (default: all)"`
GuestsCanInviteOthers *bool `name:"guests-can-invite" help:"Allow guests to invite others"`
GuestsCanModify *bool `name:"guests-can-modify" help:"Allow guests to modify event"`
GuestsCanSeeOthers *bool `name:"guests-can-see-others" help:"Allow guests to see other guests"`
WithMeet bool `name:"with-meet" help:"Create a Google Meet video conference for this event"`
SourceUrl string `name:"source-url" help:"URL where event was created/imported from"`
SourceTitle string `name:"source-title" help:"Title of the source"`
Attachments []string `name:"attachment" help:"File attachment URL (can be repeated)"`
PrivateProps []string `name:"private-prop" help:"Private extended property (key=value, can be repeated)"`
}
type CalendarDeleteCmd ¶ added in v0.4.2
type CalendarDeleteCmd struct {
CalendarID string `arg:"" name:"calendarId" help:"Calendar ID"`
EventID string `arg:"" name:"eventId" help:"Event ID"`
Scope string `name:"scope" help:"For recurring events: single, future, all" default:"all"`
OriginalStartTime string `name:"original-start" help:"Original start time of instance (required for scope=single,future)"`
}
type CalendarEventCmd ¶ added in v0.4.2
type CalendarEventsCmd ¶ added in v0.4.2
type CalendarEventsCmd struct {
CalendarID string `arg:"" name:"calendarId" optional:"" help:"Calendar ID"`
From string `name:"from" help:"Start time (RFC3339, date, or relative: today, tomorrow, monday)"`
To string `name:"to" help:"End time (RFC3339, date, or relative)"`
Today bool `name:"today" help:"Today only (timezone-aware)"`
Tomorrow bool `name:"tomorrow" help:"Tomorrow only (timezone-aware)"`
Week bool `name:"week" help:"This week (uses --week-start, default Mon)"`
Days int `name:"days" help:"Next N days (timezone-aware)" default:"0"`
WeekStart string `name:"week-start" help:"Week start day for --week (sun, mon, ...)" default:""`
Max int64 `name:"max" aliases:"limit" help:"Max results" default:"10"`
Page string `name:"page" help:"Page token"`
Query string `name:"query" help:"Free text search"`
All bool `name:"all" help:"Fetch events from all calendars"`
PrivatePropFilter string `name:"private-prop-filter" help:"Filter by private extended property (key=value)"`
Fields string `name:"fields" help:"Comma-separated fields to return"`
}
type CalendarFocusTimeCmd ¶ added in v0.5.0
type CalendarFocusTimeCmd struct {
CalendarID string `arg:"" name:"calendarId" help:"Calendar ID (default: primary)" default:"primary"`
Summary string `name:"summary" help:"Focus time title" default:"Focus Time"`
From string `name:"from" required:"" help:"Start time (RFC3339)"`
To string `name:"to" required:"" help:"End time (RFC3339)"`
AutoDecline string `name:"auto-decline" help:"Auto-decline mode: none, all, new" default:"all"`
DeclineMessage string `name:"decline-message" help:"Message for declined invitations"`
ChatStatus string `name:"chat-status" help:"Chat status: available, doNotDisturb" default:"doNotDisturb"`
Recurrence []string `name:"rrule" help:"Recurrence rules. Can be repeated."`
}
type CalendarFreeBusyCmd ¶ added in v0.4.2
type CalendarOOOCmd ¶ added in v0.5.0
type CalendarOOOCmd struct {
CalendarID string `arg:"" name:"calendarId" help:"Calendar ID (default: primary)" default:"primary"`
Summary string `name:"summary" help:"Out of office title" default:"Out of office"`
From string `name:"from" required:"" help:"Start date or datetime (RFC3339 or YYYY-MM-DD)"`
To string `name:"to" required:"" help:"End date or datetime (RFC3339 or YYYY-MM-DD)"`
AutoDecline string `name:"auto-decline" help:"Auto-decline mode: none, all, new" default:"all"`
DeclineMessage string `name:"decline-message" help:"Message for declined invitations" default:"I am out of office and will respond when I return."`
AllDay bool `name:"all-day" help:"Create as all-day event"`
}
type CalendarRespondCmd ¶ added in v0.4.2
type CalendarRespondCmd struct {
CalendarID string `arg:"" name:"calendarId" help:"Calendar ID"`
EventID string `arg:"" name:"eventId" help:"Event ID"`
Status string `name:"status" help:"Response status (accepted, declined, tentative, needsAction)"`
Comment string `name:"comment" help:"Optional comment/note to include with response"`
}
type CalendarSearchCmd ¶ added in v0.4.2
type CalendarSearchCmd struct {
Query string `arg:"" name:"query" help:"Search query"`
TimeRangeFlags
CalendarID string `name:"calendar" help:"Calendar ID" default:"primary"`
Max int64 `name:"max" aliases:"limit" help:"Max results" default:"25"`
}
type CalendarTeamCmd ¶ added in v0.5.0
type CalendarTeamCmd struct {
GroupEmail string `arg:"" help:"Google Group email (e.g., engineering@company.com)"`
FreeBusy bool `name:"freebusy" help:"Show only busy/free blocks (faster, single API call)"`
Query string `name:"query" short:"q" help:"Filter events by title (case-insensitive)"`
Max int64 `name:"max" help:"Max events per calendar" default:"100"`
NoDedup bool `name:"no-dedup" help:"Show each person's view without deduplication"`
TimeRangeFlags
}
type CalendarTimeCmd ¶ added in v0.4.2
type CalendarUpdateCmd ¶ added in v0.4.2
type CalendarUpdateCmd struct {
CalendarID string `arg:"" name:"calendarId" help:"Calendar ID"`
EventID string `arg:"" name:"eventId" help:"Event ID"`
Summary string `name:"summary" help:"New summary/title (set empty to clear)"`
From string `name:"from" help:"New start time (RFC3339; set empty to clear)"`
To string `name:"to" help:"New end time (RFC3339; set empty to clear)"`
Description string `name:"description" help:"New description (set empty to clear)"`
Location string `name:"location" help:"New location (set empty to clear)"`
Attendees string `name:"attendees" help:"Comma-separated attendee emails (replaces all; set empty to clear)"`
AddAttendee string `name:"add-attendee" help:"Comma-separated attendee emails to add (preserves existing attendees)"`
AllDay bool `name:"all-day" help:"All-day event (use date-only in --from/--to)"`
Recurrence []string `name:"rrule" help:"Recurrence rules (e.g., 'RRULE:FREQ=MONTHLY;BYMONTHDAY=11'). Can be repeated. Set empty to clear."`
Reminders []string `` /* 132-byte string literal not displayed */
ColorId string `name:"event-color" help:"Event color ID (1-11, or empty to clear)"`
Visibility string `name:"visibility" help:"Event visibility: default, public, private, confidential"`
Transparency string `name:"transparency" help:"Show as busy (opaque) or free (transparent). Aliases: busy, free"`
GuestsCanInviteOthers *bool `name:"guests-can-invite" help:"Allow guests to invite others"`
GuestsCanModify *bool `name:"guests-can-modify" help:"Allow guests to modify event"`
GuestsCanSeeOthers *bool `name:"guests-can-see-others" help:"Allow guests to see other guests"`
Scope string `name:"scope" help:"For recurring events: single, future, all" default:"all"`
OriginalStartTime string `name:"original-start" help:"Original start time of instance (required for scope=single,future)"`
PrivateProps []string `name:"private-prop" help:"Private extended property (key=value, can be repeated)"`
}
type CalendarUsersCmd ¶ added in v0.5.0
type CalendarWorkingLocationCmd ¶ added in v0.5.0
type CalendarWorkingLocationCmd struct {
CalendarID string `arg:"" name:"calendarId" help:"Calendar ID (default: primary)" default:"primary"`
From string `name:"from" required:"" help:"Start date (YYYY-MM-DD)"`
To string `name:"to" required:"" help:"End date (YYYY-MM-DD)"`
Type string `name:"type" required:"" help:"Location type: home, office, custom"`
OfficeLabel string `name:"office-label" help:"Office name/label"`
BuildingId string `name:"building-id" help:"Building ID"`
FloorId string `name:"floor-id" help:"Floor ID"`
DeskId string `name:"desk-id" help:"Desk ID"`
CustomLabel string `name:"custom-label" help:"Custom location label"`
}
type CompletionCmd ¶ added in v0.4.2
type CompletionCmd struct {
Shell string `arg:"" name:"shell" help:"Shell (bash|zsh|fish|powershell)" enum:"bash,zsh,fish,powershell"`
}
type ContactsCmd ¶ added in v0.4.2
type ContactsCmd struct {
Search ContactsSearchCmd `cmd:"" name:"search" help:"Search contacts by name/email/phone"`
List ContactsListCmd `cmd:"" name:"list" help:"List contacts"`
Get ContactsGetCmd `cmd:"" name:"get" help:"Get a contact"`
Create ContactsCreateCmd `cmd:"" name:"create" help:"Create a contact"`
Update ContactsUpdateCmd `cmd:"" name:"update" help:"Update a contact"`
Delete ContactsDeleteCmd `cmd:"" name:"delete" help:"Delete a contact"`
Directory ContactsDirectoryCmd `cmd:"" name:"directory" help:"Directory contacts"`
Other ContactsOtherCmd `cmd:"" name:"other" help:"Other contacts"`
}
type ContactsCreateCmd ¶ added in v0.4.2
type ContactsDeleteCmd ¶ added in v0.4.2
type ContactsDeleteCmd struct {
ResourceName string `arg:"" name:"resourceName" help:"Resource name (people/...)"`
}
type ContactsDirectoryCmd ¶ added in v0.4.2
type ContactsDirectoryCmd struct {
List ContactsDirectoryListCmd `cmd:"" name:"list" help:"List people from the Workspace directory"`
Search ContactsDirectorySearchCmd `cmd:"" name:"search" help:"Search people in the Workspace directory"`
}
type ContactsDirectoryListCmd ¶ added in v0.4.2
type ContactsDirectorySearchCmd ¶ added in v0.4.2
type ContactsGetCmd ¶ added in v0.4.2
type ContactsGetCmd struct {
Identifier string `arg:"" name:"resourceName" help:"Resource name (people/...) or email"`
}
type ContactsListCmd ¶ added in v0.4.2
type ContactsOtherCmd ¶ added in v0.4.2
type ContactsOtherCmd struct {
List ContactsOtherListCmd `cmd:"" name:"list" help:"List other contacts"`
Search ContactsOtherSearchCmd `cmd:"" name:"search" help:"Search other contacts"`
Delete ContactsOtherDeleteCmd `cmd:"" name:"delete" help:"Delete an other contact"`
}
type ContactsOtherDeleteCmd ¶ added in v0.5.0
type ContactsOtherDeleteCmd struct {
ResourceName string `arg:"" name:"resourceName" help:"Resource name (otherContacts/...)"`
}
type ContactsOtherListCmd ¶ added in v0.4.2
type ContactsOtherSearchCmd ¶ added in v0.4.2
type ContactsSearchCmd ¶ added in v0.4.2
type ContactsUpdateCmd ¶ added in v0.4.2
type ContactsUpdateCmd struct {
ResourceName string `arg:"" name:"resourceName" help:"Resource name (people/...)"`
Given string `name:"given" help:"Given name"`
Family string `name:"family" help:"Family name"`
Email string `name:"email" help:"Email address (empty clears)"`
Phone string `name:"phone" help:"Phone number (empty clears)"`
}
type DocsCatCmd ¶ added in v0.4.2
type DocsCmd ¶ added in v0.4.2
type DocsCmd struct {
Export DocsExportCmd `cmd:"" name:"export" help:"Export a Google Doc (pdf|docx|txt)"`
Info DocsInfoCmd `cmd:"" name:"info" help:"Get Google Doc metadata"`
Create DocsCreateCmd `cmd:"" name:"create" help:"Create a Google Doc"`
Copy DocsCopyCmd `cmd:"" name:"copy" help:"Copy a Google Doc"`
Cat DocsCatCmd `cmd:"" name:"cat" help:"Print a Google Doc as plain text"`
}
type DocsCopyCmd ¶ added in v0.4.2
type DocsCreateCmd ¶ added in v0.4.2
type DocsExportCmd ¶ added in v0.4.2
type DocsExportCmd struct {
DocID string `arg:"" name:"docId" help:"Doc ID"`
Output OutputPathFlag `embed:""`
Format string `name:"format" help:"Export format: pdf|docx|txt" default:"pdf"`
}
type DocsInfoCmd ¶ added in v0.4.2
type DocsInfoCmd struct {
DocID string `arg:"" name:"docId" help:"Doc ID"`
}
type DriveCmd ¶ added in v0.4.2
type DriveCmd struct {
Ls DriveLsCmd `cmd:"" name:"ls" help:"List files in a folder (default: root)"`
Search DriveSearchCmd `cmd:"" name:"search" help:"Full-text search across Drive"`
Get DriveGetCmd `cmd:"" name:"get" help:"Get file metadata"`
Download DriveDownloadCmd `cmd:"" name:"download" help:"Download a file (exports Google Docs formats)"`
Copy DriveCopyCmd `cmd:"" name:"copy" help:"Copy a file"`
Upload DriveUploadCmd `cmd:"" name:"upload" help:"Upload a file"`
Mkdir DriveMkdirCmd `cmd:"" name:"mkdir" help:"Create a folder"`
Delete DriveDeleteCmd `cmd:"" name:"delete" help:"Delete a file (moves to trash)" aliases:"rm,del"`
Move DriveMoveCmd `cmd:"" name:"move" help:"Move a file to a different folder"`
Rename DriveRenameCmd `cmd:"" name:"rename" help:"Rename a file or folder"`
Permissions DrivePermissionsCmd `cmd:"" name:"permissions" help:"List permissions on a file"`
URL DriveURLCmd `cmd:"" name:"url" help:"Print web URLs for files"`
Comments DriveCommentsCmd `cmd:"" name:"comments" help:"Manage comments on files"`
}
type DriveCommentReplyCmd ¶ added in v0.5.0
type DriveCommentsCmd ¶ added in v0.5.0
type DriveCommentsCmd struct {
List DriveCommentsListCmd `cmd:"" name:"list" help:"List comments on a file"`
Get DriveCommentsGetCmd `cmd:"" name:"get" help:"Get a comment by ID"`
Create DriveCommentsCreateCmd `cmd:"" name:"create" help:"Create a comment on a file"`
Update DriveCommentsUpdateCmd `cmd:"" name:"update" help:"Update a comment"`
Delete DriveCommentsDeleteCmd `cmd:"" name:"delete" help:"Delete a comment"`
Reply DriveCommentReplyCmd `cmd:"" name:"reply" help:"Reply to a comment"`
}
DriveCommentsCmd is the parent command for comments subcommands
type DriveCommentsCreateCmd ¶ added in v0.5.0
type DriveCommentsDeleteCmd ¶ added in v0.5.0
type DriveCommentsGetCmd ¶ added in v0.5.0
type DriveCommentsListCmd ¶ added in v0.5.0
type DriveCommentsUpdateCmd ¶ added in v0.5.0
type DriveCopyCmd ¶ added in v0.4.2
type DriveDeleteCmd ¶ added in v0.4.2
type DriveDeleteCmd struct {
FileID string `arg:"" name:"fileId" help:"File ID"`
}
type DriveDownloadCmd ¶ added in v0.4.2
type DriveDownloadCmd struct {
FileID string `arg:"" name:"fileId" help:"File ID"`
Output OutputPathFlag `embed:""`
Format string `name:"format" help:"Export format for Google Docs files: pdf|csv|xlsx|pptx|txt|png|docx (default: auto)"`
}
type DriveGetCmd ¶ added in v0.4.2
type DriveGetCmd struct {
FileID string `arg:"" name:"fileId" help:"File ID"`
}
type DriveLsCmd ¶ added in v0.4.2
type DriveMkdirCmd ¶ added in v0.4.2
type DriveMoveCmd ¶ added in v0.4.2
type DrivePermissionsCmd ¶ added in v0.4.2
type DriveRenameCmd ¶ added in v0.4.2
type DriveSearchCmd ¶ added in v0.4.2
type DriveShareCmd ¶ added in v0.4.2
type DriveShareCmd struct {
}
type DriveURLCmd ¶ added in v0.4.2
type DriveURLCmd struct {
FileIDs []string `arg:"" name:"fileId" help:"File IDs"`
}
type DriveUnshareCmd ¶ added in v0.4.2
type DriveUnshareCmd struct {
}
type DriveUploadCmd ¶ added in v0.4.2
type GmailAttachmentCmd ¶ added in v0.4.2
type GmailAttachmentCmd struct {
MessageID string `arg:"" name:"messageId" help:"Message ID"`
AttachmentID string `arg:"" name:"attachmentId" help:"Attachment ID"`
Output OutputPathFlag `embed:""`
Name string `name:"name" help:"Filename (only used when --out is empty)"`
}
type GmailAutoForwardCmd ¶ added in v0.4.2
type GmailAutoForwardCmd struct {
Get GmailAutoForwardGetCmd `cmd:"" name:"get" help:"Get current auto-forwarding settings"`
Update GmailAutoForwardUpdateCmd `cmd:"" name:"update" help:"Update auto-forwarding settings"`
}
type GmailAutoForwardGetCmd ¶ added in v0.4.2
type GmailAutoForwardGetCmd struct{}
type GmailAutoForwardUpdateCmd ¶ added in v0.4.2
type GmailAutoForwardUpdateCmd struct {
Enable bool `name:"enable" help:"Enable auto-forwarding"`
Disable bool `name:"disable" help:"Disable auto-forwarding"`
Email string `name:"email" help:"Email address to forward to (must be verified first)"`
Disposition string `name:"disposition" help:"What to do with forwarded messages: leaveInInbox, archive, trash, markRead"`
}
type GmailBatchCmd ¶ added in v0.4.2
type GmailBatchCmd struct {
Delete GmailBatchDeleteCmd `cmd:"" name:"delete" help:"Permanently delete multiple messages"`
Modify GmailBatchModifyCmd `cmd:"" name:"modify" help:"Modify labels on multiple messages"`
}
type GmailBatchDeleteCmd ¶ added in v0.4.2
type GmailBatchDeleteCmd struct {
MessageIDs []string `arg:"" name:"messageId" help:"Message IDs"`
}
type GmailBatchModifyCmd ¶ added in v0.4.2
type GmailCmd ¶ added in v0.4.2
type GmailCmd struct {
Search GmailSearchCmd `cmd:"" name:"search" group:"Read" help:"Search threads using Gmail query syntax"`
Thread GmailThreadCmd `cmd:"" name:"thread" group:"Organize" help:"Thread operations (get, modify)"`
Get GmailGetCmd `cmd:"" name:"get" group:"Read" help:"Get a message (full|metadata|raw)"`
Attachment GmailAttachmentCmd `cmd:"" name:"attachment" group:"Read" help:"Download a single attachment"`
URL GmailURLCmd `cmd:"" name:"url" group:"Read" help:"Print Gmail web URLs for threads"`
History GmailHistoryCmd `cmd:"" name:"history" group:"Read" help:"Gmail history"`
Labels GmailLabelsCmd `cmd:"" name:"labels" group:"Organize" help:"Label operations"`
Batch GmailBatchCmd `cmd:"" name:"batch" group:"Organize" help:"Batch operations"`
Send GmailSendCmd `cmd:"" name:"send" group:"Write" help:"Send an email"`
Track GmailTrackCmd `cmd:"" name:"track" group:"Write" help:"Email open tracking"`
Drafts GmailDraftsCmd `cmd:"" name:"drafts" group:"Write" help:"Draft operations"`
Settings GmailSettingsCmd `cmd:"" name:"settings" group:"Admin" help:"Settings and admin"`
// Kept for backwards-compatibility; hidden from default help.
Watch GmailWatchCmd `cmd:"" name:"watch" hidden:"" help:"Manage Gmail watch"`
AutoForward GmailAutoForwardCmd `cmd:"" name:"autoforward" hidden:"" help:"Auto-forwarding settings"`
Delegates GmailDelegatesCmd `cmd:"" name:"delegates" hidden:"" help:"Delegate operations"`
Filters GmailFiltersCmd `cmd:"" name:"filters" hidden:"" help:"Filter operations"`
Forwarding GmailForwardingCmd `cmd:"" name:"forwarding" hidden:"" help:"Forwarding addresses"`
SendAs GmailSendAsCmd `cmd:"" name:"sendas" hidden:"" help:"Send-as settings"`
Vacation GmailVacationCmd `cmd:"" name:"vacation" hidden:"" help:"Vacation responder"`
}
type GmailDelegatesAddCmd ¶ added in v0.4.2
type GmailDelegatesAddCmd struct {
DelegateEmail string `arg:"" name:"delegateEmail" help:"Delegate email"`
}
type GmailDelegatesCmd ¶ added in v0.4.2
type GmailDelegatesCmd struct {
List GmailDelegatesListCmd `cmd:"" name:"list" help:"List all delegates"`
Get GmailDelegatesGetCmd `cmd:"" name:"get" help:"Get a specific delegate's information"`
Add GmailDelegatesAddCmd `cmd:"" name:"add" help:"Add a delegate"`
Remove GmailDelegatesRemoveCmd `cmd:"" name:"remove" help:"Remove a delegate"`
}
type GmailDelegatesGetCmd ¶ added in v0.4.2
type GmailDelegatesGetCmd struct {
DelegateEmail string `arg:"" name:"delegateEmail" help:"Delegate email"`
}
type GmailDelegatesListCmd ¶ added in v0.4.2
type GmailDelegatesListCmd struct{}
type GmailDelegatesRemoveCmd ¶ added in v0.4.2
type GmailDelegatesRemoveCmd struct {
DelegateEmail string `arg:"" name:"delegateEmail" help:"Delegate email"`
}
type GmailDraftsCmd ¶ added in v0.4.2
type GmailDraftsCmd struct {
List GmailDraftsListCmd `cmd:"" name:"list" help:"List drafts"`
Get GmailDraftsGetCmd `cmd:"" name:"get" help:"Get draft details"`
Delete GmailDraftsDeleteCmd `cmd:"" name:"delete" help:"Delete a draft"`
Send GmailDraftsSendCmd `cmd:"" name:"send" help:"Send a draft"`
Create GmailDraftsCreateCmd `cmd:"" name:"create" help:"Create a draft"`
Update GmailDraftsUpdateCmd `cmd:"" name:"update" help:"Update a draft"`
}
type GmailDraftsCreateCmd ¶ added in v0.4.2
type GmailDraftsCreateCmd struct {
To string `name:"to" help:"Recipients (comma-separated)"`
Cc string `name:"cc" help:"CC recipients (comma-separated)"`
Bcc string `name:"bcc" help:"BCC recipients (comma-separated)"`
Subject string `name:"subject" help:"Subject (required)"`
Body string `name:"body" help:"Body (plain text; required unless --body-html is set)"`
BodyFile string `name:"body-file" help:"Body file path (plain text; '-' for stdin)"`
BodyHTML string `name:"body-html" help:"Body (HTML; optional)"`
ReplyToMessageID string `name:"reply-to-message-id" help:"Reply to Gmail message ID (sets In-Reply-To/References and thread)"`
ReplyTo string `name:"reply-to" help:"Reply-To header address"`
Attach []string `name:"attach" help:"Attachment file path (repeatable)"`
From string `name:"from" help:"Send from this email address (must be a verified send-as alias)"`
}
type GmailDraftsDeleteCmd ¶ added in v0.4.2
type GmailDraftsDeleteCmd struct {
DraftID string `arg:"" name:"draftId" help:"Draft ID"`
}
type GmailDraftsGetCmd ¶ added in v0.4.2
type GmailDraftsListCmd ¶ added in v0.4.2
type GmailDraftsSendCmd ¶ added in v0.4.2
type GmailDraftsSendCmd struct {
DraftID string `arg:"" name:"draftId" help:"Draft ID"`
}
type GmailDraftsUpdateCmd ¶ added in v0.5.0
type GmailDraftsUpdateCmd struct {
DraftID string `arg:"" name:"draftId" help:"Draft ID"`
To *string `name:"to" help:"Recipients (comma-separated; omit to keep existing)"`
Cc string `name:"cc" help:"CC recipients (comma-separated)"`
Bcc string `name:"bcc" help:"BCC recipients (comma-separated)"`
Subject string `name:"subject" help:"Subject (required)"`
Body string `name:"body" help:"Body (plain text; required unless --body-html is set)"`
BodyFile string `name:"body-file" help:"Body file path (plain text; '-' for stdin)"`
BodyHTML string `name:"body-html" help:"Body (HTML; optional)"`
ReplyToMessageID string `name:"reply-to-message-id" help:"Reply to Gmail message ID (sets In-Reply-To/References and thread)"`
ReplyTo string `name:"reply-to" help:"Reply-To header address"`
Attach []string `name:"attach" help:"Attachment file path (repeatable)"`
From string `name:"from" help:"Send from this email address (must be a verified send-as alias)"`
}
type GmailFiltersCmd ¶ added in v0.4.2
type GmailFiltersCmd struct {
List GmailFiltersListCmd `cmd:"" name:"list" help:"List all email filters"`
Get GmailFiltersGetCmd `cmd:"" name:"get" help:"Get a specific filter"`
Create GmailFiltersCreateCmd `cmd:"" name:"create" help:"Create a new email filter"`
Delete GmailFiltersDeleteCmd `cmd:"" name:"delete" help:"Delete a filter"`
}
type GmailFiltersCreateCmd ¶ added in v0.4.2
type GmailFiltersCreateCmd struct {
From string `name:"from" help:"Match messages from this sender"`
To string `name:"to" help:"Match messages to this recipient"`
Subject string `name:"subject" help:"Match messages with this subject"`
Query string `name:"query" help:"Advanced Gmail search query for matching"`
HasAttachment bool `name:"has-attachment" help:"Match messages with attachments"`
AddLabel string `name:"add-label" help:"Label(s) to add to matching messages (comma-separated, name or ID)"`
RemoveLabel string `name:"remove-label" help:"Label(s) to remove from matching messages (comma-separated, name or ID)"`
Archive bool `name:"archive" help:"Archive matching messages (skip inbox)"`
MarkRead bool `name:"mark-read" help:"Mark matching messages as read"`
Star bool `name:"star" help:"Star matching messages"`
Forward string `name:"forward" help:"Forward to this email address"`
Trash bool `name:"trash" help:"Move matching messages to trash"`
NeverSpam bool `name:"never-spam" help:"Never mark as spam"`
Important bool `name:"important" help:"Mark as important"`
}
type GmailFiltersDeleteCmd ¶ added in v0.4.2
type GmailFiltersDeleteCmd struct {
FilterID string `arg:"" name:"filterId" help:"Filter ID"`
}
type GmailFiltersGetCmd ¶ added in v0.4.2
type GmailFiltersGetCmd struct {
FilterID string `arg:"" name:"filterId" help:"Filter ID"`
}
type GmailFiltersListCmd ¶ added in v0.4.2
type GmailFiltersListCmd struct{}
type GmailForwardingCmd ¶ added in v0.4.2
type GmailForwardingCmd struct {
List GmailForwardingListCmd `cmd:"" name:"list" help:"List all forwarding addresses"`
Get GmailForwardingGetCmd `cmd:"" name:"get" help:"Get a specific forwarding address"`
Create GmailForwardingCreateCmd `cmd:"" name:"create" help:"Create/add a forwarding address"`
Delete GmailForwardingDeleteCmd `cmd:"" name:"delete" help:"Delete a forwarding address"`
}
type GmailForwardingCreateCmd ¶ added in v0.4.2
type GmailForwardingCreateCmd struct {
ForwardingEmail string `arg:"" name:"forwardingEmail" help:"Forwarding email"`
}
type GmailForwardingDeleteCmd ¶ added in v0.4.2
type GmailForwardingDeleteCmd struct {
ForwardingEmail string `arg:"" name:"forwardingEmail" help:"Forwarding email"`
}
type GmailForwardingGetCmd ¶ added in v0.4.2
type GmailForwardingGetCmd struct {
ForwardingEmail string `arg:"" name:"forwardingEmail" help:"Forwarding email"`
}
type GmailForwardingListCmd ¶ added in v0.4.2
type GmailForwardingListCmd struct{}
type GmailGetCmd ¶ added in v0.4.2
type GmailHistoryCmd ¶ added in v0.4.2
type GmailLabelsCmd ¶ added in v0.4.2
type GmailLabelsCmd struct {
List GmailLabelsListCmd `cmd:"" name:"list" help:"List labels"`
Get GmailLabelsGetCmd `cmd:"" name:"get" help:"Get label details (including counts)"`
Create GmailLabelsCreateCmd `cmd:"" name:"create" help:"Create a new label"`
Modify GmailLabelsModifyCmd `cmd:"" name:"modify" help:"Modify labels on threads"`
}
type GmailLabelsCreateCmd ¶ added in v0.5.0
type GmailLabelsCreateCmd struct {
Name string `arg:"" help:"Label name"`
}
type GmailLabelsGetCmd ¶ added in v0.4.2
type GmailLabelsGetCmd struct {
Label string `arg:"" name:"labelIdOrName" help:"Label ID or name"`
}
type GmailLabelsListCmd ¶ added in v0.4.2
type GmailLabelsListCmd struct{}
type GmailLabelsModifyCmd ¶ added in v0.4.2
type GmailSearchCmd ¶ added in v0.4.2
type GmailSendAsCmd ¶ added in v0.4.2
type GmailSendAsCmd struct {
List GmailSendAsListCmd `cmd:"" name:"list" help:"List send-as aliases"`
Get GmailSendAsGetCmd `cmd:"" name:"get" help:"Get details of a send-as alias"`
Create GmailSendAsCreateCmd `cmd:"" name:"create" help:"Create a new send-as alias"`
Verify GmailSendAsVerifyCmd `cmd:"" name:"verify" help:"Resend verification email for a send-as alias"`
Delete GmailSendAsDeleteCmd `cmd:"" name:"delete" help:"Delete a send-as alias"`
Update GmailSendAsUpdateCmd `cmd:"" name:"update" help:"Update a send-as alias"`
}
type GmailSendAsCreateCmd ¶ added in v0.4.2
type GmailSendAsCreateCmd struct {
Email string `arg:"" name:"email" help:"Send-as email"`
DisplayName string `name:"display-name" help:"Name that appears in the From field"`
ReplyTo string `name:"reply-to" help:"Reply-to address (optional)"`
Signature string `name:"signature" help:"HTML signature for emails sent from this alias"`
TreatAsAlias bool `name:"treat-as-alias" help:"Treat as alias (replies sent from Gmail web)" default:"true"`
}
type GmailSendAsDeleteCmd ¶ added in v0.4.2
type GmailSendAsDeleteCmd struct {
Email string `arg:"" name:"email" help:"Send-as email"`
}
type GmailSendAsGetCmd ¶ added in v0.4.2
type GmailSendAsGetCmd struct {
Email string `arg:"" name:"email" help:"Send-as email"`
}
type GmailSendAsListCmd ¶ added in v0.4.2
type GmailSendAsListCmd struct{}
type GmailSendAsUpdateCmd ¶ added in v0.4.2
type GmailSendAsUpdateCmd struct {
Email string `arg:"" name:"email" help:"Send-as email"`
DisplayName string `name:"display-name" help:"Name that appears in the From field"`
ReplyTo string `name:"reply-to" help:"Reply-to address"`
Signature string `name:"signature" help:"HTML signature"`
TreatAsAlias bool `name:"treat-as-alias" help:"Treat as alias" default:"true"`
MakeDefault bool `name:"make-default" help:"Make this the default send-as address"`
}
type GmailSendAsVerifyCmd ¶ added in v0.4.2
type GmailSendAsVerifyCmd struct {
Email string `arg:"" name:"email" help:"Send-as email"`
}
type GmailSendCmd ¶ added in v0.4.2
type GmailSendCmd struct {
To string `name:"to" help:"Recipients (comma-separated; required unless --reply-all is used)"`
Cc string `name:"cc" help:"CC recipients (comma-separated)"`
Bcc string `name:"bcc" help:"BCC recipients (comma-separated)"`
Subject string `name:"subject" help:"Subject (required)"`
Body string `name:"body" help:"Body (plain text; required unless --body-html is set)"`
BodyFile string `name:"body-file" help:"Body file path (plain text; '-' for stdin)"`
BodyHTML string `name:"body-html" help:"Body (HTML; optional)"`
ReplyToMessageID string `name:"reply-to-message-id" aliases:"in-reply-to" help:"Reply to Gmail message ID (sets In-Reply-To/References and thread)"`
ThreadID string `name:"thread-id" help:"Reply within a Gmail thread (uses latest message for headers)"`
ReplyAll bool `name:"reply-all" help:"Auto-populate recipients from original message (requires --reply-to-message-id or --thread-id)"`
ReplyTo string `name:"reply-to" help:"Reply-To header address"`
Attach []string `name:"attach" help:"Attachment file path (repeatable)"`
From string `name:"from" help:"Send from this email address (must be a verified send-as alias)"`
Track bool `name:"track" help:"Enable open tracking (requires tracking setup)"`
TrackSplit bool `name:"track-split" help:"Send tracked messages separately per recipient"`
}
type GmailSettingsCmd ¶ added in v0.5.0
type GmailSettingsCmd struct {
Filters GmailFiltersCmd `cmd:"" name:"filters" group:"Organize" help:"Filter operations"`
Delegates GmailDelegatesCmd `cmd:"" name:"delegates" group:"Admin" help:"Delegate operations"`
Forwarding GmailForwardingCmd `cmd:"" name:"forwarding" group:"Admin" help:"Forwarding addresses"`
AutoForward GmailAutoForwardCmd `cmd:"" name:"autoforward" group:"Admin" help:"Auto-forwarding settings"`
SendAs GmailSendAsCmd `cmd:"" name:"sendas" group:"Admin" help:"Send-as settings"`
Vacation GmailVacationCmd `cmd:"" name:"vacation" group:"Admin" help:"Vacation responder"`
Watch GmailWatchCmd `cmd:"" name:"watch" group:"Admin" help:"Manage Gmail watch"`
}
type GmailThreadAttachmentsCmd ¶ added in v0.5.0
type GmailThreadAttachmentsCmd struct {
ThreadID string `arg:"" name:"threadId" help:"Thread ID"`
Download bool `name:"download" help:"Download all attachments"`
OutputDir OutputDirFlag `embed:""`
}
GmailThreadAttachmentsCmd lists all attachments in a thread.
type GmailThreadCmd ¶ added in v0.4.2
type GmailThreadCmd struct {
Get GmailThreadGetCmd `cmd:"" name:"get" help:"Get a thread with all messages (optionally download attachments)"`
Modify GmailThreadModifyCmd `cmd:"" name:"modify" help:"Modify labels on all messages in a thread"`
Attachments GmailThreadAttachmentsCmd `cmd:"" name:"attachments" help:"List all attachments in a thread"`
}
type GmailThreadGetCmd ¶ added in v0.4.2
type GmailThreadGetCmd struct {
ThreadID string `arg:"" name:"threadId" help:"Thread ID"`
Download bool `name:"download" help:"Download attachments"`
Full bool `name:"full" help:"Show full message bodies"`
OutputDir OutputDirFlag `embed:""`
}
type GmailThreadModifyCmd ¶ added in v0.4.2
type GmailTrackCmd ¶ added in v0.5.0
type GmailTrackCmd struct {
Setup GmailTrackSetupCmd `cmd:"" help:"Set up email tracking (deploy Cloudflare Worker)"`
Opens GmailTrackOpensCmd `cmd:"" help:"Query email opens"`
Status GmailTrackStatusCmd `cmd:"" help:"Show tracking configuration status"`
}
GmailTrackCmd groups tracking-related subcommands
type GmailTrackOpensCmd ¶ added in v0.5.0
type GmailTrackSetupCmd ¶ added in v0.5.0
type GmailTrackSetupCmd struct {
WorkerName string `name:"worker-name" help:"Cloudflare Worker name (defaults to gog-email-tracker-<account>)"`
DatabaseName string `name:"db-name" help:"D1 database name (defaults to worker name)"`
WorkerURL string `name:"worker-url" aliases:"domain" help:"Tracking worker base URL (e.g. https://gog-email-tracker.<acct>.workers.dev)"`
TrackingKey string `name:"tracking-key" help:"Tracking key (base64; generates one if omitted)"`
AdminKey string `name:"admin-key" help:"Admin key for /opens (generates one if omitted)"`
Deploy bool `name:"deploy" help:"Provision D1 + deploy the worker (requires wrangler)"`
WorkerDir string `name:"worker-dir" help:"Worker directory (default: internal/tracking/worker)"`
}
type GmailTrackStatusCmd ¶ added in v0.5.0
type GmailTrackStatusCmd struct{}
type GmailURLCmd ¶ added in v0.4.2
type GmailURLCmd struct {
ThreadIDs []string `arg:"" name:"threadId" help:"Thread IDs"`
}
type GmailVacationCmd ¶ added in v0.4.2
type GmailVacationCmd struct {
Get GmailVacationGetCmd `cmd:"" name:"get" help:"Get current vacation responder settings"`
Update GmailVacationUpdateCmd `cmd:"" name:"update" help:"Update vacation responder settings"`
}
type GmailVacationGetCmd ¶ added in v0.4.2
type GmailVacationGetCmd struct{}
type GmailVacationUpdateCmd ¶ added in v0.4.2
type GmailVacationUpdateCmd struct {
Enable bool `name:"enable" help:"Enable vacation responder"`
Disable bool `name:"disable" help:"Disable vacation responder"`
Subject string `name:"subject" help:"Subject line for auto-reply"`
Body string `name:"body" help:"HTML body of the auto-reply message"`
Start string `name:"start" help:"Start time in RFC3339 format (e.g., 2024-12-20T00:00:00Z)"`
End string `name:"end" help:"End time in RFC3339 format (e.g., 2024-12-31T23:59:59Z)"`
ContactsOnly bool `name:"contacts-only" help:"Only respond to contacts"`
DomainOnly bool `name:"domain-only" help:"Only respond to same domain"`
}
type GmailWatchCmd ¶ added in v0.4.2
type GmailWatchCmd struct {
Start GmailWatchStartCmd `cmd:"" name:"start" help:"Start Gmail watch for Pub/Sub"`
Status GmailWatchStatusCmd `cmd:"" name:"status" help:"Show stored watch state"`
Renew GmailWatchRenewCmd `cmd:"" name:"renew" help:"Renew Gmail watch using stored config"`
Stop GmailWatchStopCmd `cmd:"" name:"stop" help:"Stop Gmail watch and clear stored state"`
Serve GmailWatchServeCmd `cmd:"" name:"serve" help:"Run Pub/Sub push handler"`
}
type GmailWatchRenewCmd ¶ added in v0.4.2
type GmailWatchRenewCmd struct {
TTL string `name:"ttl" help:"Renew after duration (seconds or Go duration)"`
}
type GmailWatchServeCmd ¶ added in v0.4.2
type GmailWatchServeCmd struct {
Bind string `name:"bind" help:"Bind address" default:"127.0.0.1"`
Port int `name:"port" help:"Listen port" default:"8788"`
Path string `name:"path" help:"Push handler path" default:"/gmail-pubsub"`
VerifyOIDC bool `name:"verify-oidc" help:"Verify Pub/Sub OIDC tokens"`
OIDCEmail string `name:"oidc-email" help:"Expected service account email"`
OIDCAudience string `name:"oidc-audience" help:"Expected OIDC audience"`
HookURL string `name:"hook-url" help:"Webhook URL to forward messages"`
HookToken string `name:"hook-token" help:"Webhook bearer token"`
IncludeBody bool `name:"include-body" help:"Include text/plain body in hook payload"`
MaxBytes int `name:"max-bytes" help:"Max bytes of body to include" default:"20000"`
SaveHook bool `name:"save-hook" help:"Persist hook settings to watch state"`
}
type GmailWatchStartCmd ¶ added in v0.4.2
type GmailWatchStartCmd struct {
Topic string `name:"topic" help:"Pub/Sub topic (projects/.../topics/...)"`
Labels []string `name:"label" help:"Label IDs or names (repeatable, comma-separated)"`
TTL string `name:"ttl" help:"Renew after duration (seconds or Go duration)"`
HookURL string `name:"hook-url" help:"Webhook URL to forward messages"`
HookToken string `name:"hook-token" help:"Webhook bearer token"`
IncludeBody bool `name:"include-body" help:"Include text/plain body in hook payload"`
MaxBytes int `name:"max-bytes" help:"Max bytes of body to include" default:"20000"`
}
type GmailWatchStatusCmd ¶ added in v0.4.2
type GmailWatchStatusCmd struct{}
type GmailWatchStopCmd ¶ added in v0.4.2
type GmailWatchStopCmd struct{}
type GroupsCmd ¶ added in v0.5.0
type GroupsCmd struct {
List GroupsListCmd `cmd:"" name:"list" help:"List groups you belong to"`
Members GroupsMembersCmd `cmd:"" name:"members" help:"List members of a group"`
}
type GroupsListCmd ¶ added in v0.5.0
type GroupsMembersCmd ¶ added in v0.5.0
type KeepAttachmentCmd ¶ added in v0.5.0
type KeepAttachmentCmd struct {
AttachmentName string `arg:"" name:"attachmentName" help:"Attachment name (e.g. notes/abc123/attachments/xyz789)"`
MimeType string `name:"mime-type" help:"MIME type of attachment (e.g. image/jpeg)" default:"application/octet-stream"`
Out string `name:"out" help:"Output file path (default: attachment filename or ID)"`
}
type KeepCmd ¶ added in v0.5.0
type KeepCmd struct {
ServiceAccount string `name:"service-account" help:"Path to service account JSON file"`
Impersonate string `name:"impersonate" help:"Email to impersonate (required with service-account)"`
List KeepListCmd `cmd:"" default:"withargs" help:"List notes"`
Get KeepGetCmd `cmd:"" name:"get" help:"Get a note"`
Search KeepSearchCmd `cmd:"" name:"search" help:"Search notes by text (client-side)"`
Attachment KeepAttachmentCmd `cmd:"" name:"attachment" help:"Download an attachment"`
}
type KeepGetCmd ¶ added in v0.5.0
type KeepGetCmd struct {
NoteID string `arg:"" name:"noteId" help:"Note ID or name (e.g. notes/abc123)"`
}
type KeepListCmd ¶ added in v0.5.0
type KeepSearchCmd ¶ added in v0.5.0
type OutputDirFlag ¶ added in v0.5.0
type OutputDirFlag struct {
Dir string `name:"out-dir" aliases:"output-dir" help:"Directory to write attachments to (default: current directory)"`
}
type OutputPathFlag ¶ added in v0.5.0
type OutputPathFlag struct {
Path string `name:"out" aliases:"output" help:"Output file path (default: gogcli config dir)"`
}
type OutputPathRequiredFlag ¶ added in v0.5.0
type OutputPathRequiredFlag struct {
Path string `name:"out" aliases:"output" help:"Output file path (required)"`
}
type PeopleCmd ¶ added in v0.4.2
type PeopleCmd struct {
Me PeopleMeCmd `cmd:"" name:"me" help:"Show your profile (people/me)"`
}
type PeopleMeCmd ¶ added in v0.4.2
type PeopleMeCmd struct{}
type RootFlags ¶ added in v0.4.2
type RootFlags struct {
Color string `help:"Color output: auto|always|never" default:"${color}"`
Account string `help:"Account email for API commands (gmail/calendar/drive/docs/slides/contacts/tasks/people/sheets)"`
JSON bool `help:"Output JSON to stdout (best for scripting)" default:"${json}"`
Plain bool `help:"Output stable, parseable text to stdout (TSV; no colors)" default:"${plain}"`
Force bool `help:"Skip confirmations for destructive commands"`
NoInput bool `help:"Never prompt; fail instead (useful for CI)"`
Verbose bool `help:"Enable verbose logging"`
}
type SheetsAppendCmd ¶ added in v0.4.2
type SheetsAppendCmd struct {
SpreadsheetID string `arg:"" name:"spreadsheetId" help:"Spreadsheet ID"`
Range string `arg:"" name:"range" help:"Range (eg. Sheet1!A:C)"`
Values []string `arg:"" optional:"" name:"values" help:"Values (comma-separated rows, pipe-separated cells)"`
ValueInput string `name:"input" help:"Value input option: RAW or USER_ENTERED" default:"USER_ENTERED"`
Insert string `name:"insert" help:"Insert data option: OVERWRITE or INSERT_ROWS"`
ValuesJSON string `name:"values-json" help:"Values as JSON 2D array"`
CopyValidationFrom string `name:"copy-validation-from" help:"Copy data validation from an A1 range (eg. 'Sheet1!A2:D2') to the appended cells"`
}
type SheetsClearCmd ¶ added in v0.4.2
type SheetsCmd ¶ added in v0.4.2
type SheetsCmd struct {
Get SheetsGetCmd `cmd:"" name:"get" help:"Get values from a range"`
Update SheetsUpdateCmd `cmd:"" name:"update" help:"Update values in a range"`
Append SheetsAppendCmd `cmd:"" name:"append" help:"Append values to a range"`
Clear SheetsClearCmd `cmd:"" name:"clear" help:"Clear values in a range"`
Metadata SheetsMetadataCmd `cmd:"" name:"metadata" help:"Get spreadsheet metadata"`
Create SheetsCreateCmd `cmd:"" name:"create" help:"Create a new spreadsheet"`
Copy SheetsCopyCmd `cmd:"" name:"copy" help:"Copy a Google Sheet"`
Export SheetsExportCmd `cmd:"" name:"export" help:"Export a Google Sheet (pdf|xlsx|csv) via Drive"`
}
type SheetsCopyCmd ¶ added in v0.4.2
type SheetsCreateCmd ¶ added in v0.4.2
type SheetsExportCmd ¶ added in v0.4.2
type SheetsExportCmd struct {
SpreadsheetID string `arg:"" name:"spreadsheetId" help:"Spreadsheet ID"`
Output OutputPathFlag `embed:""`
Format string `name:"format" help:"Export format: pdf|xlsx|csv" default:"xlsx"`
}
type SheetsGetCmd ¶ added in v0.4.2
type SheetsGetCmd struct {
SpreadsheetID string `arg:"" name:"spreadsheetId" help:"Spreadsheet ID"`
Range string `arg:"" name:"range" help:"Range (eg. Sheet1!A1:B10)"`
MajorDimension string `name:"dimension" help:"Major dimension: ROWS or COLUMNS"`
ValueRenderOption string `name:"render" help:"Value render option: FORMATTED_VALUE, UNFORMATTED_VALUE, or FORMULA"`
}
type SheetsMetadataCmd ¶ added in v0.4.2
type SheetsMetadataCmd struct {
SpreadsheetID string `arg:"" name:"spreadsheetId" help:"Spreadsheet ID"`
}
type SheetsUpdateCmd ¶ added in v0.4.2
type SheetsUpdateCmd struct {
SpreadsheetID string `arg:"" name:"spreadsheetId" help:"Spreadsheet ID"`
Range string `arg:"" name:"range" help:"Range (eg. Sheet1!A1:B2)"`
Values []string `arg:"" optional:"" name:"values" help:"Values (comma-separated rows, pipe-separated cells)"`
ValueInput string `name:"input" help:"Value input option: RAW or USER_ENTERED" default:"USER_ENTERED"`
ValuesJSON string `name:"values-json" help:"Values as JSON 2D array"`
CopyValidationFrom string `name:"copy-validation-from" help:"Copy data validation from an A1 range (eg. 'Sheet1!A2:D2') to the updated cells"`
}
type SlidesCmd ¶ added in v0.4.2
type SlidesCmd struct {
Export SlidesExportCmd `cmd:"" name:"export" help:"Export a Google Slides deck (pdf|pptx)"`
Info SlidesInfoCmd `cmd:"" name:"info" help:"Get Google Slides presentation metadata"`
Create SlidesCreateCmd `cmd:"" name:"create" help:"Create a Google Slides presentation"`
Copy SlidesCopyCmd `cmd:"" name:"copy" help:"Copy a Google Slides presentation"`
}
type SlidesCopyCmd ¶ added in v0.4.2
type SlidesCreateCmd ¶ added in v0.4.2
type SlidesExportCmd ¶ added in v0.4.2
type SlidesExportCmd struct {
PresentationID string `arg:"" name:"presentationId" help:"Presentation ID"`
Output OutputPathFlag `embed:""`
Format string `name:"format" help:"Export format: pdf|pptx" default:"pptx"`
}
type SlidesInfoCmd ¶ added in v0.4.2
type SlidesInfoCmd struct {
PresentationID string `arg:"" name:"presentationId" help:"Presentation ID"`
}
type TasksAddCmd ¶ added in v0.4.2
type TasksAddCmd struct {
TasklistID string `arg:"" name:"tasklistId" help:"Task list ID"`
Title string `name:"title" help:"Task title (required)"`
Notes string `name:"notes" help:"Task notes/description"`
Due string `name:"due" help:"Due date/time (RFC3339)"`
Parent string `name:"parent" help:"Parent task ID (create as subtask)"`
Previous string `name:"previous" help:"Previous sibling task ID (controls ordering)"`
}
type TasksClearCmd ¶ added in v0.4.2
type TasksClearCmd struct {
TasklistID string `arg:"" name:"tasklistId" help:"Task list ID"`
}
type TasksCmd ¶ added in v0.4.2
type TasksCmd struct {
Lists TasksListsCmd `cmd:"" name:"lists" help:"List task lists"`
List TasksListCmd `cmd:"" name:"list" help:"List tasks"`
Add TasksAddCmd `cmd:"" name:"add" help:"Add a task" aliases:"create"`
Update TasksUpdateCmd `cmd:"" name:"update" help:"Update a task"`
Done TasksDoneCmd `cmd:"" name:"done" help:"Mark task completed" aliases:"complete"`
Undo TasksUndoCmd `cmd:"" name:"undo" help:"Mark task needs action" aliases:"uncomplete,undone"`
Delete TasksDeleteCmd `cmd:"" name:"delete" help:"Delete a task" aliases:"rm,del"`
Clear TasksClearCmd `cmd:"" name:"clear" help:"Clear completed tasks"`
}
type TasksDeleteCmd ¶ added in v0.4.2
type TasksDoneCmd ¶ added in v0.4.2
type TasksListCmd ¶ added in v0.4.2
type TasksListCmd struct {
TasklistID string `arg:"" name:"tasklistId" help:"Task list ID"`
Max int64 `name:"max" aliases:"limit" help:"Max results (max allowed: 100)" default:"20"`
Page string `name:"page" help:"Page token"`
ShowCompleted bool `name:"show-completed" help:"Include completed tasks (requires --show-hidden for some clients)" default:"true"`
ShowDeleted bool `name:"show-deleted" help:"Include deleted tasks"`
ShowHidden bool `name:"show-hidden" help:"Include hidden tasks"`
ShowAssigned bool `name:"show-assigned" help:"Include tasks assigned to current user"`
DueMin string `name:"due-min" help:"Lower bound for due date filter (RFC3339)"`
DueMax string `name:"due-max" help:"Upper bound for due date filter (RFC3339)"`
CompletedMin string `name:"completed-min" help:"Lower bound for completion date filter (RFC3339)"`
CompletedMax string `name:"completed-max" help:"Upper bound for completion date filter (RFC3339)"`
UpdatedMin string `name:"updated-min" help:"Lower bound for updated time filter (RFC3339)"`
}
type TasksListsCmd ¶ added in v0.4.2
type TasksListsCmd struct {
List TasksListsListCmd `cmd:"" default:"withargs" help:"List task lists"`
Create TasksListsCreateCmd `cmd:"" name:"create" help:"Create a task list" aliases:"add,new"`
}
type TasksListsCreateCmd ¶ added in v0.4.2
type TasksListsCreateCmd struct {
Title []string `arg:"" name:"title" help:"Task list title"`
}
type TasksListsListCmd ¶ added in v0.4.2
type TasksUndoCmd ¶ added in v0.4.2
type TasksUpdateCmd ¶ added in v0.4.2
type TasksUpdateCmd struct {
TasklistID string `arg:"" name:"tasklistId" help:"Task list ID"`
TaskID string `arg:"" name:"taskId" help:"Task ID"`
Title string `name:"title" help:"New title (set empty to clear)"`
Notes string `name:"notes" help:"New notes (set empty to clear)"`
Due string `name:"due" help:"New due date/time (RFC3339; set empty to clear)"`
Status string `name:"status" help:"New status: needsAction|completed (set empty to clear)"`
}
type TimeRange ¶ added in v0.5.0
TimeRange represents a resolved time range with timezone.
func ResolveTimeRange ¶ added in v0.5.0
func ResolveTimeRange(ctx context.Context, svc *calendar.Service, flags TimeRangeFlags) (*TimeRange, error)
ResolveTimeRange resolves the time range flags into absolute times. If no flags are provided, defaults to "next 7 days" from now.
func ResolveTimeRangeWithDefaults ¶ added in v0.5.0
func ResolveTimeRangeWithDefaults(ctx context.Context, svc *calendar.Service, flags TimeRangeFlags, defaults TimeRangeDefaults) (*TimeRange, error)
ResolveTimeRangeWithDefaults resolves the time range flags into absolute times, using provided defaults when --from/--to are not set.
func (*TimeRange) FormatHuman ¶ added in v0.5.0
FormatHuman returns a human-readable description of the time range.
func (*TimeRange) FormatRFC3339 ¶ added in v0.5.0
FormatRFC3339 formats a time as RFC3339 for API calls.
type TimeRangeDefaults ¶ added in v0.5.0
type TimeRangeDefaults struct {
FromOffset time.Duration
ToOffset time.Duration
ToFromOffset time.Duration
}
TimeRangeDefaults controls the default window when flags are missing.
type TimeRangeFlags ¶ added in v0.5.0
type TimeRangeFlags struct {
From string `name:"from" help:"Start time (RFC3339, date, or relative: today, tomorrow, monday)"`
To string `name:"to" help:"End time (RFC3339, date, or relative)"`
Today bool `name:"today" help:"Today only"`
Tomorrow bool `name:"tomorrow" help:"Tomorrow only"`
Week bool `name:"week" help:"This week (uses --week-start, default Mon)"`
Days int `name:"days" help:"Next N days" default:"0"`
WeekStart string `name:"week-start" help:"Week start day for --week (sun, mon, ...)" default:""`
}
TimeRangeFlags provides common time range options for calendar commands. Embed this struct in commands that need time range support.
type VersionCmd ¶ added in v0.4.2
type VersionCmd struct{}
Source Files
¶
- account.go
- auth.go
- auth_keyring.go
- auth_service_account.go
- calendar.go
- calendar_attendees.go
- calendar_base.go
- calendar_build.go
- calendar_colors.go
- calendar_conflicts.go
- calendar_edit.go
- calendar_focus_time.go
- calendar_freebusy.go
- calendar_list.go
- calendar_ooo.go
- calendar_print.go
- calendar_recurrence.go
- calendar_respond.go
- calendar_search.go
- calendar_team.go
- calendar_time.go
- calendar_users.go
- calendar_util.go
- calendar_validate.go
- calendar_working_location.go
- completion.go
- confirm.go
- contacts.go
- contacts_crud.go
- contacts_directory.go
- contacts_output.go
- contacts_services.go
- csv.go
- docs.go
- drive.go
- drive_comments.go
- drive_copy.go
- drive_download_helpers.go
- exit.go
- export_via_drive.go
- flags_output.go
- gmail.go
- gmail_attachment.go
- gmail_autoforward.go
- gmail_batch.go
- gmail_body_input.go
- gmail_constants.go
- gmail_delegates.go
- gmail_drafts.go
- gmail_filters.go
- gmail_forwarding.go
- gmail_get.go
- gmail_history.go
- gmail_labels.go
- gmail_labels_utils.go
- gmail_mime.go
- gmail_send.go
- gmail_sendas.go
- gmail_thread.go
- gmail_track.go
- gmail_track_helpers.go
- gmail_track_opens.go
- gmail_track_setup.go
- gmail_track_status.go
- gmail_vacation.go
- gmail_watch_cmds.go
- gmail_watch_server.go
- gmail_watch_state.go
- gmail_watch_types.go
- gmail_watch_utils.go
- groups.go
- help_printer.go
- info_via_drive.go
- keep.go
- kong_helpers.go
- output_helpers.go
- people.go
- root.go
- sheets.go
- sheets_a1.go
- sheets_validation.go
- slides.go
- strings.go
- tasks.go
- tasks_items.go
- tasks_lists.go
- time_helpers.go
- usage.go
- version.go