cmd

package
v0.11.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 15, 2026 License: MIT Imports: 64 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreatePresentationFromMarkdown added in v0.10.0

func CreatePresentationFromMarkdown(title string, markdown string, service *slides.Service) (*slides.Presentation, error)

CreatePresentationFromMarkdown creates a Google Slides presentation from markdown

func Execute

func Execute(args []string) (err error)

func ExitCode added in v0.3.0

func ExitCode(err error) int

func SlidesToAPIRequests added in v0.10.0

func SlidesToAPIRequests(slideData []Slide) ([]*slides.Request, map[int]string)

SlidesToAPIRequests converts slide structures to Google Slides API batch update requests

func VersionString added in v0.3.0

func VersionString() string

Types

type AgentCmd added in v0.10.0

type AgentCmd struct {
	ExitCodes AgentExitCodesCmd `cmd:"" name:"exit-codes" aliases:"exitcodes,exit-code" help:"Print stable exit codes for automation"`
}

AgentCmd contains helper commands intended to make gog easier to consume from LLM agents.

type AgentExitCodesCmd added in v0.10.0

type AgentExitCodesCmd struct{}

func (*AgentExitCodesCmd) Run added in v0.10.0

func (c *AgentExitCodesCmd) Run(ctx context.Context) error

type AppScriptCmd added in v0.11.0

type AppScriptCmd struct {
	Get     AppScriptGetCmd     `cmd:"" name:"get" aliases:"info,show" help:"Get Apps Script project metadata"`
	Content AppScriptContentCmd `cmd:"" name:"content" aliases:"cat" help:"Get Apps Script project content"`
	Run     AppScriptRunCmd     `cmd:"" name:"run" help:"Run a deployed Apps Script function"`
	Create  AppScriptCreateCmd  `cmd:"" name:"create" aliases:"new" help:"Create an Apps Script project"`
}

type AppScriptContentCmd added in v0.11.0

type AppScriptContentCmd struct {
	ScriptID string `arg:"" name:"scriptId" help:"Script ID"`
}

func (*AppScriptContentCmd) Run added in v0.11.0

func (c *AppScriptContentCmd) Run(ctx context.Context, flags *RootFlags) error

type AppScriptCreateCmd added in v0.11.0

type AppScriptCreateCmd struct {
	Title    string `name:"title" help:"Project title" required:""`
	ParentID string `name:"parent-id" help:"Optional Drive file ID to bind to"`
}

func (*AppScriptCreateCmd) Run added in v0.11.0

func (c *AppScriptCreateCmd) Run(ctx context.Context, flags *RootFlags) error

type AppScriptGetCmd added in v0.11.0

type AppScriptGetCmd struct {
	ScriptID string `arg:"" name:"scriptId" help:"Script ID"`
}

func (*AppScriptGetCmd) Run added in v0.11.0

func (c *AppScriptGetCmd) Run(ctx context.Context, flags *RootFlags) error

type AppScriptRunCmd added in v0.11.0

type AppScriptRunCmd struct {
	ScriptID string `arg:"" name:"scriptId" help:"Script ID"`
	Function string `arg:"" name:"function" help:"Function name to run"`
	Params   string `name:"params" help:"JSON array of function parameters" default:"[]"`
	DevMode  bool   `name:"dev-mode" help:"Run latest saved code if you own the script"`
}

func (*AppScriptRunCmd) Run added in v0.11.0

func (c *AppScriptRunCmd) Run(ctx context.Context, flags *RootFlags) error

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)"`
	Remote       bool          `name:"remote" help:"Remote/server-friendly manual flow (print URL, then exchange code)"`
	Step         int           `name:"step" help:"Remote auth step: 1=print URL, 2=exchange code"`
	AuthURL      string        `name:"auth-url" help:"Redirect URL from browser (manual flow; required for --remote --step 2)"`
	AuthCode     string        `` /* 131-byte string literal not displayed */
	Timeout      time.Duration `name:"timeout" help:"Authorization timeout (manual flows default to 5m)"`
	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"`
}

func (*AuthAddCmd) Run added in v0.4.2

func (c *AuthAddCmd) Run(ctx context.Context, flags *RootFlags) error

type AuthAliasCmd added in v0.7.0

type AuthAliasCmd struct {
	List  AuthAliasListCmd  `cmd:"" name:"list" help:"List account aliases"`
	Set   AuthAliasSetCmd   `cmd:"" name:"set" help:"Set an account alias"`
	Unset AuthAliasUnsetCmd `cmd:"" name:"unset" help:"Remove an account alias"`
}

type AuthAliasListCmd added in v0.7.0

type AuthAliasListCmd struct{}

func (*AuthAliasListCmd) Run added in v0.7.0

func (c *AuthAliasListCmd) Run(ctx context.Context) error

type AuthAliasSetCmd added in v0.7.0

type AuthAliasSetCmd struct {
	Alias string `arg:"" name:"alias" help:"Alias name (no spaces)"`
	Email string `arg:"" name:"email" help:"Account email"`
}

func (*AuthAliasSetCmd) Run added in v0.7.0

func (c *AuthAliasSetCmd) Run(ctx context.Context, flags *RootFlags) error

type AuthAliasUnsetCmd added in v0.7.0

type AuthAliasUnsetCmd struct {
	Alias string `arg:"" name:"alias" help:"Alias name"`
}

func (*AuthAliasUnsetCmd) Run added in v0.7.0

func (c *AuthAliasUnsetCmd) Run(ctx context.Context, flags *RootFlags) error

type AuthCmd added in v0.4.2

type AuthCmd struct {
	Credentials AuthCredentialsCmd    `cmd:"" name:"credentials" help:"Manage 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"`
	Aliases     AuthAliasCmd          `cmd:"" name:"alias" help:"Manage account aliases"`
	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 {
	Set  AuthCredentialsSetCmd  `cmd:"" default:"withargs" help:"Store OAuth client credentials"`
	List AuthCredentialsListCmd `cmd:"" name:"list" help:"List stored OAuth client credentials"`
}

type AuthCredentialsListCmd added in v0.9.0

type AuthCredentialsListCmd struct{}

func (*AuthCredentialsListCmd) Run added in v0.9.0

type AuthCredentialsSetCmd added in v0.9.0

type AuthCredentialsSetCmd struct {
	Path    string `arg:"" name:"credentials" help:"Path to credentials.json or '-' for stdin"`
	Domains string `name:"domain" help:"Comma-separated domains to map to this client (e.g. example.com)"`
}

func (*AuthCredentialsSetCmd) Run added in v0.9.0

type AuthKeepCmd added in v0.5.0

type AuthKeepCmd struct {
	Email string `arg:"" name:"email" help:"Email to impersonate when using Keep"`
	Key   string `name:"key" required:"" help:"Path to service account JSON key file"`
}

func (*AuthKeepCmd) Run added in v0.5.0

func (c *AuthKeepCmd) Run(ctx context.Context, _ *RootFlags) error

type AuthKeyringCmd added in v0.5.0

type AuthKeyringCmd struct {
	Backend  string `arg:"" optional:"" name:"backend" help:"Keyring backend: auto|keychain|file"`
	Backend2 string `arg:"" optional:"" name:"backend2" help:"(compat) Use: gog auth keyring set <backend>"`
}

func (*AuthKeyringCmd) Run added in v0.5.0

func (c *AuthKeyringCmd) Run(ctx context.Context, flags *RootFlags) error

type AuthListCmd added in v0.4.2

type AuthListCmd struct {
	Check   bool          `name:"check" help:"Verify refresh tokens by exchanging for an access token (requires credentials.json)"`
	Timeout time.Duration `name:"timeout" help:"Per-token check timeout" default:"15s"`
}

func (*AuthListCmd) Run added in v0.4.2

func (c *AuthListCmd) Run(ctx context.Context, _ *RootFlags) error

type AuthManageCmd added in v0.4.2

type AuthManageCmd struct {
	ForceConsent bool          `name:"force-consent" help:"Force consent screen when adding accounts"`
	ServicesCSV  string        `` /* 163-byte string literal not displayed */
	Timeout      time.Duration `name:"timeout" help:"Server timeout duration" default:"10m"`
}

func (*AuthManageCmd) Run added in v0.4.2

func (c *AuthManageCmd) Run(ctx context.Context, _ *RootFlags) error

type AuthRemoveCmd added in v0.4.2

type AuthRemoveCmd struct {
	Email string `arg:"" name:"email" help:"Email"`
}

func (*AuthRemoveCmd) Run added in v0.4.2

func (c *AuthRemoveCmd) Run(ctx context.Context, flags *RootFlags) error

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 AuthServiceAccountSetCmd struct {
	Email string `arg:"" name:"email" help:"Email to impersonate (Workspace user email)" required:""`
	Key   string `name:"key" required:"" help:"Path to service account JSON key file"`
}

func (*AuthServiceAccountSetCmd) Run 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:""`
}

func (*AuthServiceAccountStatusCmd) Run added in v0.6.0

type AuthServiceAccountUnsetCmd added in v0.6.0

type AuthServiceAccountUnsetCmd struct {
	Email string `arg:"" name:"email" help:"Email (impersonated user)" required:""`
}

func (*AuthServiceAccountUnsetCmd) Run added in v0.6.0

type AuthServicesCmd added in v0.5.0

type AuthServicesCmd struct {
	Markdown bool `name:"markdown" help:"Output Markdown table"`
}

func (*AuthServicesCmd) Run added in v0.5.0

func (c *AuthServicesCmd) Run(ctx context.Context, _ *RootFlags) error

type AuthStatusCmd added in v0.5.0

type AuthStatusCmd struct{}

func (*AuthStatusCmd) Run added in v0.5.0

func (c *AuthStatusCmd) Run(ctx context.Context, flags *RootFlags) error

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"`
}

func (*AuthTokensDeleteCmd) Run added in v0.4.2

func (c *AuthTokensDeleteCmd) Run(ctx context.Context, flags *RootFlags) error

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"`
}

func (*AuthTokensExportCmd) Run added in v0.4.2

type AuthTokensImportCmd added in v0.4.2

type AuthTokensImportCmd struct {
	InPath string `arg:"" name:"inPath" help:"Input path or '-' for stdin"`
}

func (*AuthTokensImportCmd) Run added in v0.4.2

type AuthTokensListCmd added in v0.4.2

type AuthTokensListCmd struct{}

func (*AuthTokensListCmd) Run added in v0.4.2

type CLI added in v0.4.2

type CLI struct {
	RootFlags `embed:""`

	Version kong.VersionFlag `help:"Print version and exit"`

	// Action-first desire paths (agent-friendly shortcuts).
	Send     GmailSendCmd     `cmd:"" name:"send" help:"Send an email (alias for 'gmail send')"`
	Ls       DriveLsCmd       `cmd:"" name:"ls" aliases:"list" help:"List Drive files (alias for 'drive ls')"`
	Search   DriveSearchCmd   `cmd:"" name:"search" aliases:"find" help:"Search Drive files (alias for 'drive search')"`
	Open     OpenCmd          `cmd:"" name:"open" aliases:"browse" help:"Print a best-effort web URL for a Google URL/ID (offline)"`
	Download DriveDownloadCmd `cmd:"" name:"download" aliases:"dl" help:"Download a Drive file (alias for 'drive download')"`
	Upload   DriveUploadCmd   `cmd:"" name:"upload" aliases:"up,put" help:"Upload a file to Drive (alias for 'drive upload')"`
	Login    AuthAddCmd       `cmd:"" name:"login" help:"Authorize and store a refresh token (alias for 'auth add')"`
	Logout   AuthRemoveCmd    `cmd:"" name:"logout" help:"Remove a stored refresh token (alias for 'auth remove')"`
	Status   AuthStatusCmd    `cmd:"" name:"status" aliases:"st" help:"Show auth/config status (alias for 'auth status')"`
	Me       PeopleMeCmd      `cmd:"" name:"me" help:"Show your profile (alias for 'people me')"`
	Whoami   PeopleMeCmd      `cmd:"" name:"whoami" aliases:"who-am-i" help:"Show your profile (alias for 'people me')"`

	Auth       AuthCmd               `cmd:"" help:"Auth and credentials"`
	Groups     GroupsCmd             `cmd:"" aliases:"group" help:"Google Groups"`
	Drive      DriveCmd              `cmd:"" aliases:"drv" help:"Google Drive"`
	Docs       DocsCmd               `cmd:"" aliases:"doc" help:"Google Docs (export via Drive)"`
	Slides     SlidesCmd             `cmd:"" aliases:"slide" help:"Google Slides"`
	Calendar   CalendarCmd           `cmd:"" aliases:"cal" help:"Google Calendar"`
	Classroom  ClassroomCmd          `cmd:"" aliases:"class" help:"Google Classroom"`
	Time       TimeCmd               `cmd:"" help:"Local time utilities"`
	Gmail      GmailCmd              `cmd:"" aliases:"mail,email" help:"Gmail"`
	Chat       ChatCmd               `cmd:"" help:"Google Chat"`
	Contacts   ContactsCmd           `cmd:"" aliases:"contact" help:"Google Contacts"`
	Tasks      TasksCmd              `cmd:"" aliases:"task" help:"Google Tasks"`
	People     PeopleCmd             `cmd:"" aliases:"person" help:"Google People"`
	Keep       KeepCmd               `cmd:"" help:"Google Keep (Workspace only)"`
	Sheets     SheetsCmd             `cmd:"" aliases:"sheet" help:"Google Sheets"`
	Forms      FormsCmd              `cmd:"" aliases:"form" help:"Google Forms"`
	AppScript  AppScriptCmd          `cmd:"" name:"appscript" aliases:"script,apps-script" help:"Google Apps Script"`
	Config     ConfigCmd             `cmd:"" help:"Manage configuration"`
	ExitCodes  AgentExitCodesCmd     `cmd:"" name:"exit-codes" aliases:"exitcodes" help:"Print stable exit codes (alias for 'agent exit-codes')"`
	Agent      AgentCmd              `cmd:"" help:"Agent-friendly helpers"`
	Schema     SchemaCmd             `cmd:"" help:"Machine-readable command/flag schema" aliases:"help-json,helpjson"`
	VersionCmd VersionCmd            `cmd:"" name:"version" help:"Print version"`
	Completion CompletionCmd         `cmd:"" help:"Generate shell completion scripts"`
	Complete   CompletionInternalCmd `cmd:"" name:"__complete" hidden:"" help:"Internal completion helper"`
}

type CalendarAclCmd added in v0.4.2

type CalendarAclCmd struct {
	CalendarID string `arg:"" name:"calendarId" help:"Calendar ID"`
	Max        int64  `name:"max" aliases:"limit" help:"Max results" default:"100"`
	Page       string `name:"page" aliases:"cursor" help:"Page token"`
	All        bool   `name:"all" aliases:"all-pages,allpages" help:"Fetch all pages"`
	FailEmpty  bool   `name:"fail-empty" aliases:"non-empty,require-results" help:"Exit with code 3 if no results"`
}

func (*CalendarAclCmd) Run added in v0.4.2

func (c *CalendarAclCmd) Run(ctx context.Context, flags *RootFlags) error

type CalendarCalendarsCmd added in v0.4.2

type CalendarCalendarsCmd struct {
	Max       int64  `name:"max" aliases:"limit" help:"Max results" default:"100"`
	Page      string `name:"page" aliases:"cursor" help:"Page token"`
	All       bool   `name:"all" aliases:"all-pages,allpages" help:"Fetch all pages"`
	FailEmpty bool   `name:"fail-empty" aliases:"non-empty,require-results" help:"Exit with code 3 if no results"`
}

func (*CalendarCalendarsCmd) Run added in v0.4.2

func (c *CalendarCalendarsCmd) Run(ctx context.Context, flags *RootFlags) error

type CalendarCmd added in v0.4.2

type CalendarCmd struct {
	Calendars       CalendarCalendarsCmd       `cmd:"" name:"calendars" help:"List calendars"`
	ACL             CalendarAclCmd             `cmd:"" name:"acl" aliases:"permissions,perms" help:"List calendar ACL"`
	Events          CalendarEventsCmd          `cmd:"" name:"events" aliases:"list,ls" help:"List events from a calendar or all calendars"`
	Event           CalendarEventCmd           `cmd:"" name:"event" aliases:"get,info,show" help:"Get event"`
	Create          CalendarCreateCmd          `cmd:"" name:"create" aliases:"add,new" help:"Create an event"`
	Update          CalendarUpdateCmd          `cmd:"" name:"update" aliases:"edit,set" help:"Update an event"`
	Delete          CalendarDeleteCmd          `cmd:"" name:"delete" aliases:"rm,del,remove" help:"Delete an event"`
	FreeBusy        CalendarFreeBusyCmd        `cmd:"" name:"freebusy" help:"Get free/busy"`
	Respond         CalendarRespondCmd         `cmd:"" name:"respond" aliases:"rsvp,reply" help:"Respond to an event invitation"`
	ProposeTime     CalendarProposeTimeCmd     `cmd:"" name:"propose-time" help:"Generate URL to propose a new meeting time (browser-only feature)"`
	Colors          CalendarColorsCmd          `cmd:"" name:"colors" help:"Show calendar colors"`
	Conflicts       CalendarConflictsCmd       `cmd:"" name:"conflicts" help:"Find conflicts"`
	Search          CalendarSearchCmd          `cmd:"" name:"search" aliases:"find,query" 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" aliases:"focus" 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{}

func (*CalendarColorsCmd) Run added in v0.4.2

func (c *CalendarColorsCmd) Run(ctx context.Context, flags *RootFlags) error

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"`
}

func (*CalendarConflictsCmd) Run added in v0.4.2

func (c *CalendarConflictsCmd) Run(ctx context.Context, flags *RootFlags) error

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: none)"`
	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)"`
	SharedProps           []string `name:"shared-prop" help:"Shared extended property (key=value, can be repeated)"`
	EventType             string   `name:"event-type" help:"Event type: default, focus-time, out-of-office, working-location"`
	FocusAutoDecline      string   `name:"focus-auto-decline" help:"Focus Time auto-decline mode: none, all, new"`
	FocusDeclineMessage   string   `name:"focus-decline-message" help:"Focus Time decline message"`
	FocusChatStatus       string   `name:"focus-chat-status" help:"Focus Time chat status: available, doNotDisturb"`
	OOOAutoDecline        string   `name:"ooo-auto-decline" help:"Out of Office auto-decline mode: none, all, new"`
	OOODeclineMessage     string   `name:"ooo-decline-message" help:"Out of Office decline message"`
	WorkingLocationType   string   `name:"working-location-type" help:"Working location type: home, office, custom"`
	WorkingOfficeLabel    string   `name:"working-office-label" help:"Working location office name/label"`
	WorkingBuildingId     string   `name:"working-building-id" help:"Working location building ID"`
	WorkingFloorId        string   `name:"working-floor-id" help:"Working location floor ID"`
	WorkingDeskId         string   `name:"working-desk-id" help:"Working location desk ID"`
	WorkingCustomLabel    string   `name:"working-custom-label" help:"Working location custom label"`
}

func (*CalendarCreateCmd) Run added in v0.4.2

func (c *CalendarCreateCmd) Run(ctx context.Context, flags *RootFlags) error

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)"`
	SendUpdates       string `name:"send-updates" help:"Notification mode: all, externalOnly, none (default: none)"`
}

func (*CalendarDeleteCmd) Run added in v0.4.2

func (c *CalendarDeleteCmd) Run(ctx context.Context, flags *RootFlags) error

type CalendarEventCmd added in v0.4.2

type CalendarEventCmd struct {
	CalendarID string `arg:"" name:"calendarId" help:"Calendar ID"`
	EventID    string `arg:"" name:"eventId" help:"Event ID"`
}

func (*CalendarEventCmd) Run added in v0.4.2

func (c *CalendarEventCmd) Run(ctx context.Context, flags *RootFlags) error

type CalendarEventsCmd added in v0.4.2

type CalendarEventsCmd struct {
	CalendarID        string `arg:"" name:"calendarId" optional:"" help:"Calendar ID (default: primary)"`
	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" aliases:"cursor" help:"Page token"`
	AllPages          bool   `name:"all-pages" aliases:"allpages" help:"Fetch all pages"`
	FailEmpty         bool   `name:"fail-empty" aliases:"non-empty,require-results" help:"Exit with code 3 if no results"`
	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)"`
	SharedPropFilter  string `name:"shared-prop-filter" help:"Filter by shared extended property (key=value)"`
	Fields            string `name:"fields" help:"Comma-separated fields to return"`
	Weekday           bool   `name:"weekday" help:"Include start/end day-of-week columns" default:"${calendar_weekday}"`
}

func (*CalendarEventsCmd) Run added in v0.4.2

func (c *CalendarEventsCmd) Run(ctx context.Context, flags *RootFlags) error

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."`
}

func (*CalendarFocusTimeCmd) Run added in v0.5.0

func (c *CalendarFocusTimeCmd) Run(ctx context.Context, flags *RootFlags) error

type CalendarFreeBusyCmd added in v0.4.2

type CalendarFreeBusyCmd struct {
	CalendarIDs string `arg:"" name:"calendarIds" help:"Comma-separated calendar IDs"`
	From        string `name:"from" help:"Start time (RFC3339, required)"`
	To          string `name:"to" help:"End time (RFC3339, required)"`
}

func (*CalendarFreeBusyCmd) Run added in v0.4.2

func (c *CalendarFreeBusyCmd) Run(ctx context.Context, flags *RootFlags) error

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"`
}

func (*CalendarOOOCmd) Run added in v0.5.0

func (c *CalendarOOOCmd) Run(ctx context.Context, flags *RootFlags) error

type CalendarProposeTimeCmd added in v0.7.0

type CalendarProposeTimeCmd struct {
	CalendarID string `arg:"" name:"calendarId" help:"Calendar ID"`
	EventID    string `arg:"" name:"eventId" help:"Event ID"`
	Open       bool   `name:"open" help:"Open the URL in browser automatically"`
	Decline    bool   `name:"decline" help:"Also decline the event (notifies organizer)"`
	Comment    string `name:"comment" help:"Comment to include with decline (implies --decline)"`
}

CalendarProposeTimeCmd generates a browser URL for proposing a new meeting time. This is a workaround for a Google Calendar API limitation (since 2018).

func (*CalendarProposeTimeCmd) Run added in v0.7.0

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"`
}

func (*CalendarRespondCmd) Run added in v0.4.2

func (c *CalendarRespondCmd) Run(ctx context.Context, flags *RootFlags) error

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"`
}

func (*CalendarSearchCmd) Run added in v0.4.2

func (c *CalendarSearchCmd) Run(ctx context.Context, flags *RootFlags) error

type CalendarTeamCmd added in v0.5.0

type CalendarTeamCmd struct {
	GroupEmail string `arg:"" help:"Google Group email (e.g., [email protected])"`
	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" aliases:"limit" help:"Max events per calendar" default:"100"`
	NoDedup    bool   `name:"no-dedup" help:"Show each person's view without deduplication"`
	TimeRangeFlags
}

func (*CalendarTeamCmd) Run added in v0.5.0

func (c *CalendarTeamCmd) Run(ctx context.Context, flags *RootFlags) error

type CalendarTimeCmd added in v0.4.2

type CalendarTimeCmd struct {
	CalendarID string `name:"calendar" help:"Calendar ID to get timezone from" default:"primary"`
	Timezone   string `name:"timezone" help:"Override timezone (e.g., America/New_York, UTC)"`
}

func (*CalendarTimeCmd) Run added in v0.4.2

func (c *CalendarTimeCmd) Run(ctx context.Context, flags *RootFlags) error

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)"`
	SharedProps           []string `name:"shared-prop" help:"Shared extended property (key=value, can be repeated)"`
	EventType             string   `name:"event-type" help:"Event type: default, focus-time, out-of-office, working-location"`
	FocusAutoDecline      string   `name:"focus-auto-decline" help:"Focus Time auto-decline mode: none, all, new"`
	FocusDeclineMessage   string   `name:"focus-decline-message" help:"Focus Time decline message (set empty to clear)"`
	FocusChatStatus       string   `name:"focus-chat-status" help:"Focus Time chat status: available, doNotDisturb"`
	OOOAutoDecline        string   `name:"ooo-auto-decline" help:"Out of Office auto-decline mode: none, all, new"`
	OOODeclineMessage     string   `name:"ooo-decline-message" help:"Out of Office decline message (set empty to clear)"`
	WorkingLocationType   string   `name:"working-location-type" help:"Working location type: home, office, custom"`
	WorkingOfficeLabel    string   `name:"working-office-label" help:"Working location office name/label"`
	WorkingBuildingId     string   `name:"working-building-id" help:"Working location building ID"`
	WorkingFloorId        string   `name:"working-floor-id" help:"Working location floor ID"`
	WorkingDeskId         string   `name:"working-desk-id" help:"Working location desk ID"`
	WorkingCustomLabel    string   `name:"working-custom-label" help:"Working location custom label"`
	SendUpdates           string   `name:"send-updates" help:"Notification mode: all, externalOnly, none (default: none)"`
}

func (*CalendarUpdateCmd) Run added in v0.4.2

func (c *CalendarUpdateCmd) Run(ctx context.Context, kctx *kong.Context, flags *RootFlags) error

type CalendarUsersCmd added in v0.5.0

type CalendarUsersCmd struct {
	Max       int64  `name:"max" aliases:"limit" help:"Max results" default:"100"`
	Page      string `name:"page" aliases:"cursor" help:"Page token"`
	All       bool   `name:"all" aliases:"all-pages,allpages" help:"Fetch all pages"`
	FailEmpty bool   `name:"fail-empty" aliases:"non-empty,require-results" help:"Exit with code 3 if no results"`
}

func (*CalendarUsersCmd) Run added in v0.5.0

func (c *CalendarUsersCmd) Run(ctx context.Context, flags *RootFlags) error

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"`
}

func (*CalendarWorkingLocationCmd) Run added in v0.5.0

type ChatCmd added in v0.8.0

type ChatCmd struct {
	Spaces   ChatSpacesCmd   `cmd:"" name:"spaces" help:"Chat spaces"`
	Messages ChatMessagesCmd `cmd:"" name:"messages" help:"Chat messages"`
	Threads  ChatThreadsCmd  `cmd:"" name:"threads" help:"Chat threads"`
	DM       ChatDMCmd       `cmd:"" name:"dm" help:"Direct messages"`
}

type ChatDMCmd added in v0.8.0

type ChatDMCmd struct {
	Send  ChatDMSendCmd  `cmd:"" name:"send" aliases:"create,post" help:"Send a direct message"`
	Space ChatDMSpaceCmd `cmd:"" name:"space" aliases:"find,setup" help:"Find or create a DM space"`
}

type ChatDMSendCmd added in v0.8.0

type ChatDMSendCmd struct {
	Email  string `arg:"" name:"email" help:"Recipient email"`
	Text   string `name:"text" help:"Message text (required)"`
	Thread string `name:"thread" help:"Reply to thread (spaces/.../threads/...)"`
}

func (*ChatDMSendCmd) Run added in v0.8.0

func (c *ChatDMSendCmd) Run(ctx context.Context, flags *RootFlags) error

type ChatDMSpaceCmd added in v0.8.0

type ChatDMSpaceCmd struct {
	Email string `arg:"" name:"email" help:"Recipient email"`
}

func (*ChatDMSpaceCmd) Run added in v0.8.0

func (c *ChatDMSpaceCmd) Run(ctx context.Context, flags *RootFlags) error

type ChatMessagesCmd added in v0.8.0

type ChatMessagesCmd struct {
	List ChatMessagesListCmd `cmd:"" name:"list" aliases:"ls" help:"List messages"`
	Send ChatMessagesSendCmd `cmd:"" name:"send" aliases:"create,post" help:"Send a message"`
}

type ChatMessagesListCmd added in v0.8.0

type ChatMessagesListCmd struct {
	Space     string `arg:"" name:"space" help:"Space name (spaces/...)"`
	Max       int64  `name:"max" aliases:"limit" help:"Max results" default:"50"`
	Page      string `name:"page" aliases:"cursor" help:"Page token"`
	All       bool   `name:"all" aliases:"all-pages,allpages" help:"Fetch all pages"`
	FailEmpty bool   `name:"fail-empty" aliases:"non-empty,require-results" help:"Exit with code 3 if no results"`
	Order     string `name:"order" help:"Order by (e.g. createTime desc)"`
	Thread    string `name:"thread" help:"Filter by thread (spaces/.../threads/...)"`
	Unread    bool   `name:"unread" help:"Only messages after last read time"`
}

func (*ChatMessagesListCmd) Run added in v0.8.0

func (c *ChatMessagesListCmd) Run(ctx context.Context, flags *RootFlags) error

type ChatMessagesSendCmd added in v0.8.0

type ChatMessagesSendCmd struct {
	Space  string `arg:"" name:"space" help:"Space name (spaces/...)"`
	Text   string `name:"text" help:"Message text (required)"`
	Thread string `name:"thread" help:"Reply to thread (spaces/.../threads/...)"`
}

func (*ChatMessagesSendCmd) Run added in v0.8.0

func (c *ChatMessagesSendCmd) Run(ctx context.Context, flags *RootFlags) error

type ChatSpacesCmd added in v0.8.0

type ChatSpacesCmd struct {
	List   ChatSpacesListCmd   `cmd:"" name:"list" aliases:"ls" help:"List spaces"`
	Find   ChatSpacesFindCmd   `cmd:"" name:"find" aliases:"search,query" help:"Find spaces by display name"`
	Create ChatSpacesCreateCmd `cmd:"" name:"create" aliases:"add,new" help:"Create a space"`
}

type ChatSpacesCreateCmd added in v0.8.0

type ChatSpacesCreateCmd struct {
	DisplayName string   `arg:"" name:"displayName" help:"Space display name"`
	Members     []string `name:"member" help:"Space members (email or users/...; repeatable or comma-separated)"`
}

func (*ChatSpacesCreateCmd) Run added in v0.8.0

func (c *ChatSpacesCreateCmd) Run(ctx context.Context, flags *RootFlags) error

type ChatSpacesFindCmd added in v0.8.0

type ChatSpacesFindCmd struct {
	DisplayName string `arg:"" name:"displayName" help:"Space display name"`
	Max         int64  `name:"max" aliases:"limit" help:"Max results per page" default:"100"`
}

func (*ChatSpacesFindCmd) Run added in v0.8.0

func (c *ChatSpacesFindCmd) Run(ctx context.Context, flags *RootFlags) error

type ChatSpacesListCmd added in v0.8.0

type ChatSpacesListCmd struct {
	Max       int64  `name:"max" aliases:"limit" help:"Max results" default:"100"`
	Page      string `name:"page" aliases:"cursor" help:"Page token"`
	All       bool   `name:"all" aliases:"all-pages,allpages" help:"Fetch all pages"`
	FailEmpty bool   `name:"fail-empty" aliases:"non-empty,require-results" help:"Exit with code 3 if no results"`
}

func (*ChatSpacesListCmd) Run added in v0.8.0

func (c *ChatSpacesListCmd) Run(ctx context.Context, flags *RootFlags) error

type ChatThreadsCmd added in v0.8.0

type ChatThreadsCmd struct {
	List ChatThreadsListCmd `cmd:"" name:"list" help:"List threads in a space"`
}

type ChatThreadsListCmd added in v0.8.0

type ChatThreadsListCmd struct {
	Space     string `arg:"" name:"space" help:"Space name (spaces/...)"`
	Max       int64  `name:"max" aliases:"limit" help:"Max results" default:"50"`
	Page      string `name:"page" aliases:"cursor" help:"Page token"`
	All       bool   `name:"all" aliases:"all-pages,allpages" help:"Fetch all pages"`
	FailEmpty bool   `name:"fail-empty" aliases:"non-empty,require-results" help:"Exit with code 3 if no results"`
}

func (*ChatThreadsListCmd) Run added in v0.8.0

func (c *ChatThreadsListCmd) Run(ctx context.Context, flags *RootFlags) error

type ClassroomAnnouncementsAssigneesCmd added in v0.7.0

type ClassroomAnnouncementsAssigneesCmd struct {
	CourseID       string   `arg:"" name:"courseId" help:"Course ID or alias"`
	AnnouncementID string   `arg:"" name:"announcementId" help:"Announcement ID"`
	Mode           string   `name:"mode" help:"Assignee mode: ALL_STUDENTS, INDIVIDUAL_STUDENTS"`
	AddStudents    []string `name:"add-student" help:"Student IDs to add" sep:","`
	RemoveStudents []string `name:"remove-student" help:"Student IDs to remove" sep:","`
}

func (*ClassroomAnnouncementsAssigneesCmd) Run added in v0.7.0

type ClassroomAnnouncementsCmd added in v0.7.0

type ClassroomAnnouncementsCmd struct {
	List      ClassroomAnnouncementsListCmd      `cmd:"" default:"withargs" aliases:"ls" help:"List announcements"`
	Get       ClassroomAnnouncementsGetCmd       `cmd:"" aliases:"info,show" help:"Get an announcement"`
	Create    ClassroomAnnouncementsCreateCmd    `cmd:"" aliases:"add,new" help:"Create an announcement"`
	Update    ClassroomAnnouncementsUpdateCmd    `cmd:"" aliases:"edit,set" help:"Update an announcement"`
	Delete    ClassroomAnnouncementsDeleteCmd    `cmd:"" aliases:"rm,del,remove" help:"Delete an announcement"`
	Assignees ClassroomAnnouncementsAssigneesCmd `cmd:"" name:"assignees" aliases:"assign" help:"Modify announcement assignees"`
}

type ClassroomAnnouncementsCreateCmd added in v0.7.0

type ClassroomAnnouncementsCreateCmd struct {
	CourseID  string `arg:"" name:"courseId" help:"Course ID or alias"`
	Text      string `name:"text" help:"Announcement text" required:""`
	State     string `name:"state" help:"State: PUBLISHED, DRAFT"`
	Scheduled string `name:"scheduled" help:"Scheduled publish time (RFC3339)"`
}

func (*ClassroomAnnouncementsCreateCmd) Run added in v0.7.0

type ClassroomAnnouncementsDeleteCmd added in v0.7.0

type ClassroomAnnouncementsDeleteCmd struct {
	CourseID       string `arg:"" name:"courseId" help:"Course ID or alias"`
	AnnouncementID string `arg:"" name:"announcementId" help:"Announcement ID"`
}

func (*ClassroomAnnouncementsDeleteCmd) Run added in v0.7.0

type ClassroomAnnouncementsGetCmd added in v0.7.0

type ClassroomAnnouncementsGetCmd struct {
	CourseID       string `arg:"" name:"courseId" help:"Course ID or alias"`
	AnnouncementID string `arg:"" name:"announcementId" help:"Announcement ID"`
}

func (*ClassroomAnnouncementsGetCmd) Run added in v0.7.0

type ClassroomAnnouncementsListCmd added in v0.7.0

type ClassroomAnnouncementsListCmd struct {
	CourseID  string `arg:"" name:"courseId" help:"Course ID or alias"`
	States    string `name:"state" help:"Announcement states filter (comma-separated: DRAFT,PUBLISHED,DELETED)"`
	OrderBy   string `name:"order-by" help:"Order by (e.g., updateTime desc)"`
	Max       int64  `name:"max" aliases:"limit" help:"Max results" default:"100"`
	Page      string `name:"page" aliases:"cursor" help:"Page token"`
	All       bool   `name:"all" aliases:"all-pages,allpages" help:"Fetch all pages"`
	FailEmpty bool   `name:"fail-empty" aliases:"non-empty,require-results" help:"Exit with code 3 if no results"`
}

func (*ClassroomAnnouncementsListCmd) Run added in v0.7.0

type ClassroomAnnouncementsUpdateCmd added in v0.7.0

type ClassroomAnnouncementsUpdateCmd struct {
	CourseID       string `arg:"" name:"courseId" help:"Course ID or alias"`
	AnnouncementID string `arg:"" name:"announcementId" help:"Announcement ID"`
	Text           string `name:"text" help:"Announcement text"`
	State          string `name:"state" help:"State: PUBLISHED, DRAFT"`
	Scheduled      string `name:"scheduled" help:"Scheduled publish time (RFC3339)"`
}

func (*ClassroomAnnouncementsUpdateCmd) Run added in v0.7.0

type ClassroomCmd added in v0.7.0

type ClassroomCmd struct {
	Courses         ClassroomCoursesCmd         `cmd:"" aliases:"course" help:"Courses"`
	Students        ClassroomStudentsCmd        `cmd:"" aliases:"student" help:"Course students"`
	Teachers        ClassroomTeachersCmd        `cmd:"" aliases:"teacher" help:"Course teachers"`
	Roster          ClassroomRosterCmd          `cmd:"" aliases:"members" help:"Course roster (students + teachers)"`
	Coursework      ClassroomCourseworkCmd      `cmd:"" name:"coursework" aliases:"work" help:"Coursework"`
	Materials       ClassroomMaterialsCmd       `cmd:"" name:"materials" aliases:"material" help:"Coursework materials"`
	Submissions     ClassroomSubmissionsCmd     `cmd:"" aliases:"submission" help:"Student submissions"`
	Announcements   ClassroomAnnouncementsCmd   `cmd:"" aliases:"announcement,ann" help:"Announcements"`
	Topics          ClassroomTopicsCmd          `cmd:"" aliases:"topic" help:"Topics"`
	Invitations     ClassroomInvitationsCmd     `cmd:"" aliases:"invitation,invites" help:"Invitations"`
	Guardians       ClassroomGuardiansCmd       `cmd:"" aliases:"guardian" help:"Guardians"`
	GuardianInvites ClassroomGuardianInvitesCmd `cmd:"" name:"guardian-invitations" aliases:"guardian-invites" help:"Guardian invitations"`
	Profile         ClassroomProfileCmd         `cmd:"" aliases:"me" help:"User profiles"`
}

type ClassroomCoursesArchiveCmd added in v0.7.0

type ClassroomCoursesArchiveCmd struct {
	CourseID string `arg:"" name:"courseId" help:"Course ID or alias"`
}

func (*ClassroomCoursesArchiveCmd) Run added in v0.7.0

type ClassroomCoursesCmd added in v0.7.0

type ClassroomCoursesCmd struct {
	List      ClassroomCoursesListCmd      `cmd:"" default:"withargs" aliases:"ls" help:"List courses"`
	Get       ClassroomCoursesGetCmd       `cmd:"" aliases:"info,show" help:"Get a course"`
	Create    ClassroomCoursesCreateCmd    `cmd:"" aliases:"add,new" help:"Create a course"`
	Update    ClassroomCoursesUpdateCmd    `cmd:"" aliases:"edit,set" help:"Update a course"`
	Delete    ClassroomCoursesDeleteCmd    `cmd:"" aliases:"rm,del,remove" help:"Delete a course"`
	Archive   ClassroomCoursesArchiveCmd   `cmd:"" aliases:"arch" help:"Archive a course"`
	Unarchive ClassroomCoursesUnarchiveCmd `cmd:"" aliases:"unarch,restore" help:"Unarchive a course"`
	Join      ClassroomCoursesJoinCmd      `cmd:"" aliases:"enroll" help:"Join a course"`
	Leave     ClassroomCoursesLeaveCmd     `cmd:"" aliases:"unenroll" help:"Leave a course"`
	URL       ClassroomCoursesURLCmd       `cmd:"" name:"url" aliases:"link" help:"Print Classroom web URLs for courses"`
}

type ClassroomCoursesCreateCmd added in v0.7.0

type ClassroomCoursesCreateCmd struct {
	Name               string `name:"name" help:"Course name" required:""`
	OwnerID            string `name:"owner" help:"Owner user ID or email" default:"me"`
	Section            string `name:"section" help:"Section"`
	DescriptionHeading string `name:"description-heading" help:"Description heading"`
	Description        string `name:"description" help:"Description"`
	Room               string `name:"room" help:"Room"`
	State              string `name:"state" help:"Course state (ACTIVE, ARCHIVED, PROVISIONED, DECLINED)"`
}

func (*ClassroomCoursesCreateCmd) Run added in v0.7.0

type ClassroomCoursesDeleteCmd added in v0.7.0

type ClassroomCoursesDeleteCmd struct {
	CourseID string `arg:"" name:"courseId" help:"Course ID or alias"`
}

func (*ClassroomCoursesDeleteCmd) Run added in v0.7.0

type ClassroomCoursesGetCmd added in v0.7.0

type ClassroomCoursesGetCmd struct {
	CourseID string `arg:"" name:"courseId" help:"Course ID or alias"`
}

func (*ClassroomCoursesGetCmd) Run added in v0.7.0

type ClassroomCoursesJoinCmd added in v0.7.0

type ClassroomCoursesJoinCmd struct {
	CourseID       string `arg:"" name:"courseId" help:"Course ID or alias"`
	Role           string `name:"role" help:"Role to join as: student|teacher" default:"student"`
	UserID         string `name:"user" help:"User ID or email to join" default:"me"`
	EnrollmentCode string `name:"enrollment-code" help:"Enrollment code (student joins only)"`
}

func (*ClassroomCoursesJoinCmd) Run added in v0.7.0

type ClassroomCoursesLeaveCmd added in v0.7.0

type ClassroomCoursesLeaveCmd struct {
	CourseID string `arg:"" name:"courseId" help:"Course ID or alias"`
	Role     string `name:"role" help:"Role to remove: student|teacher" default:"student"`
	UserID   string `name:"user" help:"User ID or email to remove" default:"me"`
}

func (*ClassroomCoursesLeaveCmd) Run added in v0.7.0

type ClassroomCoursesListCmd added in v0.7.0

type ClassroomCoursesListCmd struct {
	States    string `name:"state" help:"Course states filter (comma-separated: ACTIVE,ARCHIVED,PROVISIONED,DECLINED)"`
	TeacherID string `name:"teacher" help:"Filter by teacher user ID or email"`
	StudentID string `name:"student" help:"Filter by student user ID or email"`
	Max       int64  `name:"max" aliases:"limit" help:"Max results" default:"100"`
	Page      string `name:"page" aliases:"cursor" help:"Page token"`
	All       bool   `name:"all" aliases:"all-pages,allpages" help:"Fetch all pages"`
	FailEmpty bool   `name:"fail-empty" aliases:"non-empty,require-results" help:"Exit with code 3 if no results"`
}

func (*ClassroomCoursesListCmd) Run added in v0.7.0

type ClassroomCoursesURLCmd added in v0.7.0

type ClassroomCoursesURLCmd struct {
	CourseIDs []string `arg:"" name:"courseId" help:"Course IDs or aliases"`
}

func (*ClassroomCoursesURLCmd) Run added in v0.7.0

type ClassroomCoursesUnarchiveCmd added in v0.7.0

type ClassroomCoursesUnarchiveCmd struct {
	CourseID string `arg:"" name:"courseId" help:"Course ID or alias"`
}

func (*ClassroomCoursesUnarchiveCmd) Run added in v0.7.0

type ClassroomCoursesUpdateCmd added in v0.7.0

type ClassroomCoursesUpdateCmd struct {
	CourseID           string `arg:"" name:"courseId" help:"Course ID or alias"`
	Name               string `name:"name" help:"Course name"`
	OwnerID            string `name:"owner" help:"Owner user ID or email"`
	Section            string `name:"section" help:"Section"`
	DescriptionHeading string `name:"description-heading" help:"Description heading"`
	Description        string `name:"description" help:"Description"`
	Room               string `name:"room" help:"Room"`
	State              string `name:"state" help:"Course state (ACTIVE, ARCHIVED, PROVISIONED, DECLINED)"`
}

func (*ClassroomCoursesUpdateCmd) Run added in v0.7.0

type ClassroomCourseworkAssigneesCmd added in v0.7.0

type ClassroomCourseworkAssigneesCmd struct {
	CourseID       string   `arg:"" name:"courseId" help:"Course ID or alias"`
	CourseworkID   string   `arg:"" name:"courseworkId" help:"Coursework ID"`
	Mode           string   `name:"mode" help:"Assignee mode: ALL_STUDENTS, INDIVIDUAL_STUDENTS"`
	AddStudents    []string `name:"add-student" help:"Student IDs to add" sep:","`
	RemoveStudents []string `name:"remove-student" help:"Student IDs to remove" sep:","`
}

func (*ClassroomCourseworkAssigneesCmd) Run added in v0.7.0

type ClassroomCourseworkCmd added in v0.7.0

type ClassroomCourseworkCmd struct {
	List      ClassroomCourseworkListCmd      `cmd:"" default:"withargs" aliases:"ls" help:"List coursework"`
	Get       ClassroomCourseworkGetCmd       `cmd:"" aliases:"info,show" help:"Get coursework"`
	Create    ClassroomCourseworkCreateCmd    `cmd:"" aliases:"add,new" help:"Create coursework"`
	Update    ClassroomCourseworkUpdateCmd    `cmd:"" aliases:"edit,set" help:"Update coursework"`
	Delete    ClassroomCourseworkDeleteCmd    `cmd:"" aliases:"rm,del,remove" help:"Delete coursework"`
	Assignees ClassroomCourseworkAssigneesCmd `cmd:"" name:"assignees" aliases:"assign" help:"Modify coursework assignees"`
}

type ClassroomCourseworkCreateCmd added in v0.7.0

type ClassroomCourseworkCreateCmd struct {
	CourseID    string  `arg:"" name:"courseId" help:"Course ID or alias"`
	Title       string  `name:"title" help:"Title" required:""`
	Description string  `name:"description" help:"Description"`
	WorkType    string  `name:"type" help:"Work type: ASSIGNMENT, SHORT_ANSWER_QUESTION, MULTIPLE_CHOICE_QUESTION" default:"ASSIGNMENT"`
	State       string  `name:"state" help:"State: PUBLISHED, DRAFT"`
	MaxPoints   float64 `name:"max-points" help:"Max points"`
	Due         string  `name:"due" help:"Due date/time (RFC3339 or YYYY-MM-DD [HH:MM])"`
	DueDate     string  `name:"due-date" help:"Due date (YYYY-MM-DD)"`
	DueTime     string  `name:"due-time" help:"Due time (HH:MM or HH:MM:SS)"`
	Scheduled   string  `name:"scheduled" help:"Scheduled publish time (RFC3339)"`
	TopicID     string  `name:"topic" help:"Topic ID"`
}

func (*ClassroomCourseworkCreateCmd) Run added in v0.7.0

type ClassroomCourseworkDeleteCmd added in v0.7.0

type ClassroomCourseworkDeleteCmd struct {
	CourseID     string `arg:"" name:"courseId" help:"Course ID or alias"`
	CourseworkID string `arg:"" name:"courseworkId" help:"Coursework ID"`
}

func (*ClassroomCourseworkDeleteCmd) Run added in v0.7.0

type ClassroomCourseworkGetCmd added in v0.7.0

type ClassroomCourseworkGetCmd struct {
	CourseID     string `arg:"" name:"courseId" help:"Course ID or alias"`
	CourseworkID string `arg:"" name:"courseworkId" help:"Coursework ID"`
}

func (*ClassroomCourseworkGetCmd) Run added in v0.7.0

type ClassroomCourseworkListCmd added in v0.7.0

type ClassroomCourseworkListCmd struct {
	CourseID  string `arg:"" name:"courseId" help:"Course ID or alias"`
	States    string `name:"state" help:"Coursework states filter (comma-separated: DRAFT,PUBLISHED,DELETED)"`
	Topic     string `name:"topic" help:"Filter by topic ID"`
	OrderBy   string `name:"order-by" help:"Order by (e.g., updateTime desc, dueDate desc)"`
	Max       int64  `name:"max" aliases:"limit" help:"Max results" default:"100"`
	Page      string `name:"page" aliases:"cursor" help:"Page token"`
	All       bool   `name:"all" aliases:"all-pages,allpages" help:"Fetch all pages"`
	FailEmpty bool   `name:"fail-empty" aliases:"non-empty,require-results" help:"Exit with code 3 if no results"`
	ScanPages int    `name:"scan-pages" help:"Pages to scan when filtering by topic" default:"3"`
}

func (*ClassroomCourseworkListCmd) Run added in v0.7.0

type ClassroomCourseworkUpdateCmd added in v0.7.0

type ClassroomCourseworkUpdateCmd struct {
	CourseID     string  `arg:"" name:"courseId" help:"Course ID or alias"`
	CourseworkID string  `arg:"" name:"courseworkId" help:"Coursework ID"`
	Title        string  `name:"title" help:"Title"`
	Description  string  `name:"description" help:"Description"`
	State        string  `name:"state" help:"State: PUBLISHED, DRAFT"`
	MaxPoints    float64 `name:"max-points" help:"Max points"`
	Due          string  `name:"due" help:"Due date/time (RFC3339 or YYYY-MM-DD [HH:MM])"`
	DueDate      string  `name:"due-date" help:"Due date (YYYY-MM-DD)"`
	DueTime      string  `name:"due-time" help:"Due time (HH:MM or HH:MM:SS)"`
	Scheduled    string  `name:"scheduled" help:"Scheduled publish time (RFC3339)"`
	TopicID      string  `name:"topic" help:"Topic ID"`
}

func (*ClassroomCourseworkUpdateCmd) Run added in v0.7.0

type ClassroomGuardianInvitesCmd added in v0.7.0

type ClassroomGuardianInvitesCmd struct {
	List   ClassroomGuardianInvitesListCmd   `cmd:"" default:"withargs" aliases:"ls" help:"List guardian invitations"`
	Get    ClassroomGuardianInvitesGetCmd    `cmd:"" aliases:"info,show" help:"Get a guardian invitation"`
	Create ClassroomGuardianInvitesCreateCmd `cmd:"" aliases:"add,new" help:"Create a guardian invitation"`
}

type ClassroomGuardianInvitesCreateCmd added in v0.7.0

type ClassroomGuardianInvitesCreateCmd struct {
	StudentID string `arg:"" name:"studentId" help:"Student ID"`
	Email     string `name:"email" help:"Guardian email address" required:""`
}

func (*ClassroomGuardianInvitesCreateCmd) Run added in v0.7.0

type ClassroomGuardianInvitesGetCmd added in v0.7.0

type ClassroomGuardianInvitesGetCmd struct {
	StudentID    string `arg:"" name:"studentId" help:"Student ID"`
	InvitationID string `arg:"" name:"invitationId" help:"Invitation ID"`
}

func (*ClassroomGuardianInvitesGetCmd) Run added in v0.7.0

type ClassroomGuardianInvitesListCmd added in v0.7.0

type ClassroomGuardianInvitesListCmd struct {
	StudentID string `arg:"" name:"studentId" help:"Student ID"`
	Email     string `name:"email" help:"Filter by invited email address"`
	States    string `name:"state" help:"Invitation states filter (comma-separated: PENDING,COMPLETE)"`
	Max       int64  `name:"max" aliases:"limit" help:"Max results" default:"100"`
	Page      string `name:"page" aliases:"cursor" help:"Page token"`
	All       bool   `name:"all" aliases:"all-pages,allpages" help:"Fetch all pages"`
	FailEmpty bool   `name:"fail-empty" aliases:"non-empty,require-results" help:"Exit with code 3 if no results"`
}

func (*ClassroomGuardianInvitesListCmd) Run added in v0.7.0

type ClassroomGuardiansCmd added in v0.7.0

type ClassroomGuardiansCmd struct {
	List   ClassroomGuardiansListCmd   `cmd:"" default:"withargs" aliases:"ls" help:"List guardians"`
	Get    ClassroomGuardiansGetCmd    `cmd:"" aliases:"info,show" help:"Get a guardian"`
	Delete ClassroomGuardiansDeleteCmd `cmd:"" aliases:"rm,del,remove" help:"Delete a guardian"`
}

type ClassroomGuardiansDeleteCmd added in v0.7.0

type ClassroomGuardiansDeleteCmd struct {
	StudentID  string `arg:"" name:"studentId" help:"Student ID"`
	GuardianID string `arg:"" name:"guardianId" help:"Guardian ID"`
}

func (*ClassroomGuardiansDeleteCmd) Run added in v0.7.0

type ClassroomGuardiansGetCmd added in v0.7.0

type ClassroomGuardiansGetCmd struct {
	StudentID  string `arg:"" name:"studentId" help:"Student ID"`
	GuardianID string `arg:"" name:"guardianId" help:"Guardian ID"`
}

func (*ClassroomGuardiansGetCmd) Run added in v0.7.0

type ClassroomGuardiansListCmd added in v0.7.0

type ClassroomGuardiansListCmd struct {
	StudentID string `arg:"" name:"studentId" help:"Student ID"`
	Email     string `name:"email" help:"Filter by invited email address"`
	Max       int64  `name:"max" aliases:"limit" help:"Max results" default:"100"`
	Page      string `name:"page" aliases:"cursor" help:"Page token"`
	All       bool   `name:"all" aliases:"all-pages,allpages" help:"Fetch all pages"`
	FailEmpty bool   `name:"fail-empty" aliases:"non-empty,require-results" help:"Exit with code 3 if no results"`
}

func (*ClassroomGuardiansListCmd) Run added in v0.7.0

type ClassroomInvitationsAcceptCmd added in v0.7.0

type ClassroomInvitationsAcceptCmd struct {
	InvitationID string `arg:"" name:"invitationId" help:"Invitation ID"`
}

func (*ClassroomInvitationsAcceptCmd) Run added in v0.7.0

type ClassroomInvitationsCmd added in v0.7.0

type ClassroomInvitationsCmd struct {
	List   ClassroomInvitationsListCmd   `cmd:"" default:"withargs" aliases:"ls" help:"List invitations"`
	Get    ClassroomInvitationsGetCmd    `cmd:"" aliases:"info,show" help:"Get an invitation"`
	Create ClassroomInvitationsCreateCmd `cmd:"" aliases:"add,new" help:"Create an invitation"`
	Accept ClassroomInvitationsAcceptCmd `cmd:"" aliases:"join" help:"Accept an invitation"`
	Delete ClassroomInvitationsDeleteCmd `cmd:"" aliases:"rm,del,remove" help:"Delete an invitation"`
}

type ClassroomInvitationsCreateCmd added in v0.7.0

type ClassroomInvitationsCreateCmd struct {
	CourseID string `arg:"" name:"courseId" help:"Course ID or alias"`
	UserID   string `arg:"" name:"userId" help:"User ID or email"`
	Role     string `name:"role" help:"Role: STUDENT, TEACHER, OWNER" required:""`
}

func (*ClassroomInvitationsCreateCmd) Run added in v0.7.0

type ClassroomInvitationsDeleteCmd added in v0.7.0

type ClassroomInvitationsDeleteCmd struct {
	InvitationID string `arg:"" name:"invitationId" help:"Invitation ID"`
}

func (*ClassroomInvitationsDeleteCmd) Run added in v0.7.0

type ClassroomInvitationsGetCmd added in v0.7.0

type ClassroomInvitationsGetCmd struct {
	InvitationID string `arg:"" name:"invitationId" help:"Invitation ID"`
}

func (*ClassroomInvitationsGetCmd) Run added in v0.7.0

type ClassroomInvitationsListCmd added in v0.7.0

type ClassroomInvitationsListCmd struct {
	CourseID  string `name:"course" help:"Filter by course ID"`
	UserID    string `name:"user" help:"Filter by user ID or email"`
	Max       int64  `name:"max" aliases:"limit" help:"Max results" default:"100"`
	Page      string `name:"page" aliases:"cursor" help:"Page token"`
	All       bool   `name:"all" aliases:"all-pages,allpages" help:"Fetch all pages"`
	FailEmpty bool   `name:"fail-empty" aliases:"non-empty,require-results" help:"Exit with code 3 if no results"`
}

func (*ClassroomInvitationsListCmd) Run added in v0.7.0

type ClassroomMaterialsCmd added in v0.7.0

type ClassroomMaterialsCmd struct {
	List   ClassroomMaterialsListCmd   `cmd:"" default:"withargs" aliases:"ls" help:"List coursework materials"`
	Get    ClassroomMaterialsGetCmd    `cmd:"" aliases:"info,show" help:"Get coursework material"`
	Create ClassroomMaterialsCreateCmd `cmd:"" aliases:"add,new" help:"Create coursework material"`
	Update ClassroomMaterialsUpdateCmd `cmd:"" aliases:"edit,set" help:"Update coursework material"`
	Delete ClassroomMaterialsDeleteCmd `cmd:"" aliases:"rm,del,remove" help:"Delete coursework material"`
}

type ClassroomMaterialsCreateCmd added in v0.7.0

type ClassroomMaterialsCreateCmd struct {
	CourseID    string `arg:"" name:"courseId" help:"Course ID or alias"`
	Title       string `name:"title" help:"Title" required:""`
	Description string `name:"description" help:"Description"`
	State       string `name:"state" help:"State: PUBLISHED, DRAFT"`
	Scheduled   string `name:"scheduled" help:"Scheduled publish time (RFC3339)"`
	TopicID     string `name:"topic" help:"Topic ID"`
}

func (*ClassroomMaterialsCreateCmd) Run added in v0.7.0

type ClassroomMaterialsDeleteCmd added in v0.7.0

type ClassroomMaterialsDeleteCmd struct {
	CourseID   string `arg:"" name:"courseId" help:"Course ID or alias"`
	MaterialID string `arg:"" name:"materialId" help:"Material ID"`
}

func (*ClassroomMaterialsDeleteCmd) Run added in v0.7.0

type ClassroomMaterialsGetCmd added in v0.7.0

type ClassroomMaterialsGetCmd struct {
	CourseID   string `arg:"" name:"courseId" help:"Course ID or alias"`
	MaterialID string `arg:"" name:"materialId" help:"Material ID"`
}

func (*ClassroomMaterialsGetCmd) Run added in v0.7.0

type ClassroomMaterialsListCmd added in v0.7.0

type ClassroomMaterialsListCmd struct {
	CourseID  string `arg:"" name:"courseId" help:"Course ID or alias"`
	States    string `name:"state" help:"Material states filter (comma-separated: PUBLISHED,DRAFT,DELETED)"`
	Topic     string `name:"topic" help:"Filter by topic ID"`
	OrderBy   string `name:"order-by" help:"Order by (e.g., updateTime desc)"`
	Max       int64  `name:"max" aliases:"limit" help:"Max results" default:"100"`
	Page      string `name:"page" aliases:"cursor" help:"Page token"`
	All       bool   `name:"all" aliases:"all-pages,allpages" help:"Fetch all pages"`
	FailEmpty bool   `name:"fail-empty" aliases:"non-empty,require-results" help:"Exit with code 3 if no results"`
	ScanPages int    `name:"scan-pages" help:"Pages to scan when filtering by topic" default:"3"`
}

func (*ClassroomMaterialsListCmd) Run added in v0.7.0

type ClassroomMaterialsUpdateCmd added in v0.7.0

type ClassroomMaterialsUpdateCmd struct {
	CourseID    string `arg:"" name:"courseId" help:"Course ID or alias"`
	MaterialID  string `arg:"" name:"materialId" help:"Material ID"`
	Title       string `name:"title" help:"Title"`
	Description string `name:"description" help:"Description"`
	State       string `name:"state" help:"State: PUBLISHED, DRAFT"`
	Scheduled   string `name:"scheduled" help:"Scheduled publish time (RFC3339)"`
	TopicID     string `name:"topic" help:"Topic ID"`
}

func (*ClassroomMaterialsUpdateCmd) Run added in v0.7.0

type ClassroomProfileCmd added in v0.7.0

type ClassroomProfileCmd struct {
	Get ClassroomProfileGetCmd `cmd:"" default:"withargs" help:"Get a user profile"`
}

type ClassroomProfileGetCmd added in v0.7.0

type ClassroomProfileGetCmd struct {
	UserID string `arg:"" name:"userId" optional:"" help:"User ID or email (default: me)"`
}

func (*ClassroomProfileGetCmd) Run added in v0.7.0

type ClassroomRosterCmd added in v0.7.0

type ClassroomRosterCmd struct {
	CourseID  string `arg:"" name:"courseId" help:"Course ID or alias"`
	Students  bool   `name:"students" help:"Include students"`
	Teachers  bool   `name:"teachers" help:"Include teachers"`
	Max       int64  `name:"max" aliases:"limit" help:"Max results (per role)" default:"100"`
	Page      string `name:"page" aliases:"cursor" help:"Page token (per role)"`
	All       bool   `name:"all" aliases:"all-pages,allpages" help:"Fetch all pages (per role)"`
	FailEmpty bool   `name:"fail-empty" aliases:"non-empty,require-results" help:"Exit with code 3 if no results"`
}

func (*ClassroomRosterCmd) Run added in v0.7.0

func (c *ClassroomRosterCmd) Run(ctx context.Context, flags *RootFlags) error

type ClassroomStudentsAddCmd added in v0.7.0

type ClassroomStudentsAddCmd struct {
	CourseID       string `arg:"" name:"courseId" help:"Course ID or alias"`
	UserID         string `arg:"" name:"userId" help:"Student user ID or email"`
	EnrollmentCode string `name:"enrollment-code" help:"Enrollment code"`
}

func (*ClassroomStudentsAddCmd) Run added in v0.7.0

type ClassroomStudentsCmd added in v0.7.0

type ClassroomStudentsCmd struct {
	List   ClassroomStudentsListCmd   `cmd:"" default:"withargs" aliases:"ls" help:"List students"`
	Get    ClassroomStudentsGetCmd    `cmd:"" aliases:"info,show" help:"Get a student"`
	Add    ClassroomStudentsAddCmd    `cmd:"" aliases:"create,new" help:"Add a student"`
	Remove ClassroomStudentsRemoveCmd `cmd:"" aliases:"delete,rm,del,remove" help:"Remove a student"`
}

type ClassroomStudentsGetCmd added in v0.7.0

type ClassroomStudentsGetCmd struct {
	CourseID string `arg:"" name:"courseId" help:"Course ID or alias"`
	UserID   string `arg:"" name:"userId" help:"Student user ID or email"`
}

func (*ClassroomStudentsGetCmd) Run added in v0.7.0

type ClassroomStudentsListCmd added in v0.7.0

type ClassroomStudentsListCmd struct {
	CourseID  string `arg:"" name:"courseId" help:"Course ID or alias"`
	Max       int64  `name:"max" aliases:"limit" help:"Max results" default:"100"`
	Page      string `name:"page" aliases:"cursor" help:"Page token"`
	All       bool   `name:"all" aliases:"all-pages,allpages" help:"Fetch all pages"`
	FailEmpty bool   `name:"fail-empty" aliases:"non-empty,require-results" help:"Exit with code 3 if no results"`
}

func (*ClassroomStudentsListCmd) Run added in v0.7.0

type ClassroomStudentsRemoveCmd added in v0.7.0

type ClassroomStudentsRemoveCmd struct {
	CourseID string `arg:"" name:"courseId" help:"Course ID or alias"`
	UserID   string `arg:"" name:"userId" help:"Student user ID or email"`
}

func (*ClassroomStudentsRemoveCmd) Run added in v0.7.0

type ClassroomSubmissionsCmd added in v0.7.0

type ClassroomSubmissionsCmd struct {
	List    ClassroomSubmissionsListCmd    `cmd:"" default:"withargs" aliases:"ls" help:"List student submissions"`
	Get     ClassroomSubmissionsGetCmd     `cmd:"" aliases:"info,show" help:"Get a student submission"`
	TurnIn  ClassroomSubmissionsTurnInCmd  `cmd:"" name:"turn-in" aliases:"turnin" help:"Turn in a submission"`
	Reclaim ClassroomSubmissionsReclaimCmd `cmd:"" aliases:"undo" help:"Reclaim a submission"`
	Return  ClassroomSubmissionsReturnCmd  `cmd:"" aliases:"send" help:"Return a submission"`
	Grade   ClassroomSubmissionsGradeCmd   `cmd:"" aliases:"set,edit" help:"Set draft/assigned grades"`
}

type ClassroomSubmissionsGetCmd added in v0.7.0

type ClassroomSubmissionsGetCmd struct {
	CourseID     string `arg:"" name:"courseId" help:"Course ID or alias"`
	CourseworkID string `arg:"" name:"courseworkId" help:"Coursework ID"`
	SubmissionID string `arg:"" name:"submissionId" help:"Submission ID"`
}

func (*ClassroomSubmissionsGetCmd) Run added in v0.7.0

type ClassroomSubmissionsGradeCmd added in v0.7.0

type ClassroomSubmissionsGradeCmd struct {
	CourseID     string `arg:"" name:"courseId" help:"Course ID or alias"`
	CourseworkID string `arg:"" name:"courseworkId" help:"Coursework ID"`
	SubmissionID string `arg:"" name:"submissionId" help:"Submission ID"`
	Draft        string `name:"draft" help:"Draft grade"`
	Assigned     string `name:"assigned" help:"Assigned grade"`
}

func (*ClassroomSubmissionsGradeCmd) Run added in v0.7.0

type ClassroomSubmissionsListCmd added in v0.7.0

type ClassroomSubmissionsListCmd struct {
	CourseID     string `arg:"" name:"courseId" help:"Course ID or alias"`
	CourseworkID string `arg:"" name:"courseworkId" help:"Coursework ID"`
	States       string `name:"state" help:"Submission states filter (comma-separated: NEW,CREATED,TURNED_IN,RETURNED,RECLAIMED_BY_STUDENT)"`
	Late         string `name:"late" help:"Late filter: late|not-late"`
	UserID       string `name:"user" help:"Filter by user ID or email"`
	Max          int64  `name:"max" aliases:"limit" help:"Max results" default:"100"`
	Page         string `name:"page" aliases:"cursor" help:"Page token"`
	All          bool   `name:"all" aliases:"all-pages,allpages" help:"Fetch all pages"`
	FailEmpty    bool   `name:"fail-empty" aliases:"non-empty,require-results" help:"Exit with code 3 if no results"`
}

func (*ClassroomSubmissionsListCmd) Run added in v0.7.0

type ClassroomSubmissionsReclaimCmd added in v0.7.0

type ClassroomSubmissionsReclaimCmd struct {
	CourseID     string `arg:"" name:"courseId" help:"Course ID or alias"`
	CourseworkID string `arg:"" name:"courseworkId" help:"Coursework ID"`
	SubmissionID string `arg:"" name:"submissionId" help:"Submission ID"`
}

func (*ClassroomSubmissionsReclaimCmd) Run added in v0.7.0

type ClassroomSubmissionsReturnCmd added in v0.7.0

type ClassroomSubmissionsReturnCmd struct {
	CourseID     string `arg:"" name:"courseId" help:"Course ID or alias"`
	CourseworkID string `arg:"" name:"courseworkId" help:"Coursework ID"`
	SubmissionID string `arg:"" name:"submissionId" help:"Submission ID"`
}

func (*ClassroomSubmissionsReturnCmd) Run added in v0.7.0

type ClassroomSubmissionsTurnInCmd added in v0.7.0

type ClassroomSubmissionsTurnInCmd struct {
	CourseID     string `arg:"" name:"courseId" help:"Course ID or alias"`
	CourseworkID string `arg:"" name:"courseworkId" help:"Coursework ID"`
	SubmissionID string `arg:"" name:"submissionId" help:"Submission ID"`
}

func (*ClassroomSubmissionsTurnInCmd) Run added in v0.7.0

type ClassroomTeachersAddCmd added in v0.7.0

type ClassroomTeachersAddCmd struct {
	CourseID string `arg:"" name:"courseId" help:"Course ID or alias"`
	UserID   string `arg:"" name:"userId" help:"Teacher user ID or email"`
}

func (*ClassroomTeachersAddCmd) Run added in v0.7.0

type ClassroomTeachersCmd added in v0.7.0

type ClassroomTeachersCmd struct {
	List   ClassroomTeachersListCmd   `cmd:"" default:"withargs" aliases:"ls" help:"List teachers"`
	Get    ClassroomTeachersGetCmd    `cmd:"" aliases:"info,show" help:"Get a teacher"`
	Add    ClassroomTeachersAddCmd    `cmd:"" aliases:"create,new" help:"Add a teacher"`
	Remove ClassroomTeachersRemoveCmd `cmd:"" aliases:"delete,rm,del,remove" help:"Remove a teacher"`
}

type ClassroomTeachersGetCmd added in v0.7.0

type ClassroomTeachersGetCmd struct {
	CourseID string `arg:"" name:"courseId" help:"Course ID or alias"`
	UserID   string `arg:"" name:"userId" help:"Teacher user ID or email"`
}

func (*ClassroomTeachersGetCmd) Run added in v0.7.0

type ClassroomTeachersListCmd added in v0.7.0

type ClassroomTeachersListCmd struct {
	CourseID  string `arg:"" name:"courseId" help:"Course ID or alias"`
	Max       int64  `name:"max" aliases:"limit" help:"Max results" default:"100"`
	Page      string `name:"page" aliases:"cursor" help:"Page token"`
	All       bool   `name:"all" aliases:"all-pages,allpages" help:"Fetch all pages"`
	FailEmpty bool   `name:"fail-empty" aliases:"non-empty,require-results" help:"Exit with code 3 if no results"`
}

func (*ClassroomTeachersListCmd) Run added in v0.7.0

type ClassroomTeachersRemoveCmd added in v0.7.0

type ClassroomTeachersRemoveCmd struct {
	CourseID string `arg:"" name:"courseId" help:"Course ID or alias"`
	UserID   string `arg:"" name:"userId" help:"Teacher user ID or email"`
}

func (*ClassroomTeachersRemoveCmd) Run added in v0.7.0

type ClassroomTopicsCmd added in v0.7.0

type ClassroomTopicsCmd struct {
	List   ClassroomTopicsListCmd   `cmd:"" default:"withargs" aliases:"ls" help:"List topics"`
	Get    ClassroomTopicsGetCmd    `cmd:"" aliases:"info,show" help:"Get a topic"`
	Create ClassroomTopicsCreateCmd `cmd:"" aliases:"add,new" help:"Create a topic"`
	Update ClassroomTopicsUpdateCmd `cmd:"" aliases:"edit,set" help:"Update a topic"`
	Delete ClassroomTopicsDeleteCmd `cmd:"" aliases:"rm,del,remove" help:"Delete a topic"`
}

type ClassroomTopicsCreateCmd added in v0.7.0

type ClassroomTopicsCreateCmd struct {
	CourseID string `arg:"" name:"courseId" help:"Course ID or alias"`
	Name     string `name:"name" help:"Topic name" required:""`
}

func (*ClassroomTopicsCreateCmd) Run added in v0.7.0

type ClassroomTopicsDeleteCmd added in v0.7.0

type ClassroomTopicsDeleteCmd struct {
	CourseID string `arg:"" name:"courseId" help:"Course ID or alias"`
	TopicID  string `arg:"" name:"topicId" help:"Topic ID"`
}

func (*ClassroomTopicsDeleteCmd) Run added in v0.7.0

type ClassroomTopicsGetCmd added in v0.7.0

type ClassroomTopicsGetCmd struct {
	CourseID string `arg:"" name:"courseId" help:"Course ID or alias"`
	TopicID  string `arg:"" name:"topicId" help:"Topic ID"`
}

func (*ClassroomTopicsGetCmd) Run added in v0.7.0

func (c *ClassroomTopicsGetCmd) Run(ctx context.Context, flags *RootFlags) error

type ClassroomTopicsListCmd added in v0.7.0

type ClassroomTopicsListCmd struct {
	CourseID  string `arg:"" name:"courseId" help:"Course ID or alias"`
	Max       int64  `name:"max" aliases:"limit" help:"Max results" default:"100"`
	Page      string `name:"page" aliases:"cursor" help:"Page token"`
	All       bool   `name:"all" aliases:"all-pages,allpages" help:"Fetch all pages"`
	FailEmpty bool   `name:"fail-empty" aliases:"non-empty,require-results" help:"Exit with code 3 if no results"`
}

func (*ClassroomTopicsListCmd) Run added in v0.7.0

type ClassroomTopicsUpdateCmd added in v0.7.0

type ClassroomTopicsUpdateCmd struct {
	CourseID string `arg:"" name:"courseId" help:"Course ID or alias"`
	TopicID  string `arg:"" name:"topicId" help:"Topic ID"`
	Name     string `name:"name" help:"Topic name" required:""`
}

func (*ClassroomTopicsUpdateCmd) Run added in v0.7.0

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"`
}

func (*CompletionCmd) Run added in v0.4.2

func (c *CompletionCmd) Run(_ context.Context) error

type CompletionInternalCmd added in v0.7.0

type CompletionInternalCmd struct {
	Cword int      `name:"cword" help:"Index of the current word" default:"-1"`
	Words []string `arg:"" optional:"" name:"words" help:"Words to complete"`
}

func (*CompletionInternalCmd) Run added in v0.7.0

type ConfigCmd added in v0.7.0

type ConfigCmd struct {
	Get   ConfigGetCmd   `cmd:"" aliases:"show" help:"Get a config value"`
	Keys  ConfigKeysCmd  `cmd:"" aliases:"list-keys,names" help:"List available config keys"`
	Set   ConfigSetCmd   `cmd:"" aliases:"add,update" help:"Set a config value"`
	Unset ConfigUnsetCmd `cmd:"" aliases:"rm,del,remove" help:"Unset a config value"`
	List  ConfigListCmd  `cmd:"" aliases:"ls,all" help:"List all config values"`
	Path  ConfigPathCmd  `cmd:"" aliases:"where" help:"Print config file path"`
}

type ConfigGetCmd added in v0.7.0

type ConfigGetCmd struct {
	Key string `arg:"" help:"Config key to get (timezone)"`
}

func (*ConfigGetCmd) Run added in v0.7.0

func (c *ConfigGetCmd) Run(ctx context.Context) error

type ConfigKeysCmd added in v0.7.0

type ConfigKeysCmd struct{}

func (*ConfigKeysCmd) Run added in v0.7.0

func (c *ConfigKeysCmd) Run(ctx context.Context) error

type ConfigListCmd added in v0.7.0

type ConfigListCmd struct{}

func (*ConfigListCmd) Run added in v0.7.0

func (c *ConfigListCmd) Run(ctx context.Context) error

type ConfigPathCmd added in v0.7.0

type ConfigPathCmd struct{}

func (*ConfigPathCmd) Run added in v0.7.0

func (c *ConfigPathCmd) Run(ctx context.Context) error

type ConfigSetCmd added in v0.7.0

type ConfigSetCmd struct {
	Key   string `arg:"" help:"Config key to set (timezone)"`
	Value string `arg:"" help:"Value to set"`
}

func (*ConfigSetCmd) Run added in v0.7.0

func (c *ConfigSetCmd) Run(ctx context.Context, flags *RootFlags) error

type ConfigUnsetCmd added in v0.7.0

type ConfigUnsetCmd struct {
	Key string `arg:"" help:"Config key to unset (timezone)"`
}

func (*ConfigUnsetCmd) Run added in v0.7.0

func (c *ConfigUnsetCmd) Run(ctx context.Context, flags *RootFlags) error

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" aliases:"ls" help:"List contacts"`
	Get       ContactsGetCmd       `cmd:"" name:"get" aliases:"info,show" help:"Get a contact"`
	Create    ContactsCreateCmd    `cmd:"" name:"create" aliases:"add,new" help:"Create a contact"`
	Update    ContactsUpdateCmd    `cmd:"" name:"update" aliases:"edit,set" help:"Update a contact"`
	Delete    ContactsDeleteCmd    `cmd:"" name:"delete" aliases:"rm,del,remove" 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 ContactsCreateCmd struct {
	Given  string `name:"given" help:"Given name (required)"`
	Family string `name:"family" help:"Family name"`
	Email  string `name:"email" help:"Email address"`
	Phone  string `name:"phone" help:"Phone number"`
}

func (*ContactsCreateCmd) Run added in v0.4.2

func (c *ContactsCreateCmd) Run(ctx context.Context, flags *RootFlags) error

type ContactsDeleteCmd added in v0.4.2

type ContactsDeleteCmd struct {
	ResourceName string `arg:"" name:"resourceName" help:"Resource name (people/...)"`
}

func (*ContactsDeleteCmd) Run added in v0.4.2

func (c *ContactsDeleteCmd) Run(ctx context.Context, flags *RootFlags) error

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 ContactsDirectoryListCmd struct {
	Max       int64  `name:"max" aliases:"limit" help:"Max results" default:"50"`
	Page      string `name:"page" aliases:"cursor" help:"Page token"`
	All       bool   `name:"all" aliases:"all-pages,allpages" help:"Fetch all pages"`
	FailEmpty bool   `name:"fail-empty" aliases:"non-empty,require-results" help:"Exit with code 3 if no results"`
}

func (*ContactsDirectoryListCmd) Run added in v0.4.2

type ContactsDirectorySearchCmd added in v0.4.2

type ContactsDirectorySearchCmd struct {
	Query     []string `arg:"" name:"query" help:"Search query"`
	Max       int64    `name:"max" aliases:"limit" help:"Max results" default:"50"`
	Page      string   `name:"page" aliases:"cursor" help:"Page token"`
	All       bool     `name:"all" aliases:"all-pages,allpages" help:"Fetch all pages"`
	FailEmpty bool     `name:"fail-empty" aliases:"non-empty,require-results" help:"Exit with code 3 if no results"`
}

func (*ContactsDirectorySearchCmd) Run 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"`
}

func (*ContactsGetCmd) Run added in v0.4.2

func (c *ContactsGetCmd) Run(ctx context.Context, flags *RootFlags) error

type ContactsListCmd added in v0.4.2

type ContactsListCmd struct {
	Max  int64  `name:"max" aliases:"limit" help:"Max results" default:"100"`
	Page string `name:"page" help:"Page token"`
}

func (*ContactsListCmd) Run added in v0.4.2

func (c *ContactsListCmd) Run(ctx context.Context, flags *RootFlags) error

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/...)"`
}

func (*ContactsOtherDeleteCmd) Run added in v0.5.0

type ContactsOtherListCmd added in v0.4.2

type ContactsOtherListCmd struct {
	Max       int64  `name:"max" aliases:"limit" help:"Max results" default:"100"`
	Page      string `name:"page" aliases:"cursor" help:"Page token"`
	All       bool   `name:"all" aliases:"all-pages,allpages" help:"Fetch all pages"`
	FailEmpty bool   `name:"fail-empty" aliases:"non-empty,require-results" help:"Exit with code 3 if no results"`
}

func (*ContactsOtherListCmd) Run added in v0.4.2

func (c *ContactsOtherListCmd) Run(ctx context.Context, flags *RootFlags) error

type ContactsOtherSearchCmd added in v0.4.2

type ContactsOtherSearchCmd struct {
	Query []string `arg:"" name:"query" help:"Search query"`
	Max   int64    `name:"max" aliases:"limit" help:"Max results" default:"50"`
}

func (*ContactsOtherSearchCmd) Run added in v0.4.2

type ContactsSearchCmd added in v0.4.2

type ContactsSearchCmd struct {
	Query []string `arg:"" name:"query" help:"Search query"`
	Max   int64    `name:"max" aliases:"limit" help:"Max results" default:"50"`
}

func (*ContactsSearchCmd) Run added in v0.4.2

func (c *ContactsSearchCmd) Run(ctx context.Context, flags *RootFlags) error

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)"`
	FromFile     string `name:"from-file" help:"Update from contact JSON file (use - for stdin)"`
	IgnoreETag   bool   `name:"ignore-etag" help:"Allow updating even if the JSON etag is stale (may overwrite concurrent changes)"`

	// Extra People API fields (not previously exposed by gog)
	Birthday string `name:"birthday" help:"Birthday in YYYY-MM-DD (empty clears)"`
	Notes    string `name:"notes" help:"Notes (stored as People API biography; empty clears)"`
}

func (*ContactsUpdateCmd) Run added in v0.4.2

func (c *ContactsUpdateCmd) Run(ctx context.Context, kctx *kong.Context, flags *RootFlags) error

type DocsCatCmd added in v0.4.2

type DocsCatCmd struct {
	DocID    string `arg:"" name:"docId" help:"Doc ID"`
	MaxBytes int64  `name:"max-bytes" help:"Max bytes to read (0 = unlimited)" default:"2000000"`
	Tab      string `name:"tab" help:"Tab title or ID to read (omit for default behavior)"`
	AllTabs  bool   `name:"all-tabs" help:"Show all tabs with headers"`
}

func (*DocsCatCmd) Run added in v0.4.2

func (c *DocsCatCmd) Run(ctx context.Context, flags *RootFlags) error

type DocsCmd added in v0.4.2

type DocsCmd struct {
	Export      DocsExportCmd      `cmd:"" name:"export" aliases:"download,dl" help:"Export a Google Doc (pdf|docx|txt)"`
	Info        DocsInfoCmd        `cmd:"" name:"info" aliases:"get,show" help:"Get Google Doc metadata"`
	Create      DocsCreateCmd      `cmd:"" name:"create" aliases:"add,new" help:"Create a Google Doc"`
	Copy        DocsCopyCmd        `cmd:"" name:"copy" aliases:"cp,duplicate" help:"Copy a Google Doc"`
	Cat         DocsCatCmd         `cmd:"" name:"cat" aliases:"text,read" help:"Print a Google Doc as plain text"`
	Comments    DocsCommentsCmd    `cmd:"" name:"comments" help:"Manage comments on a Google Doc"`
	ListTabs    DocsListTabsCmd    `cmd:"" name:"list-tabs" help:"List all tabs in a Google Doc"`
	Write       DocsWriteCmd       `cmd:"" name:"write" help:"Write content to a Google Doc"`
	Insert      DocsInsertCmd      `cmd:"" name:"insert" help:"Insert text at a specific position"`
	Delete      DocsDeleteCmd      `cmd:"" name:"delete" help:"Delete text range from document"`
	FindReplace DocsFindReplaceCmd `cmd:"" name:"find-replace" help:"Find and replace text in document"`
	Update      DocsUpdateCmd      `cmd:"" name:"update" help:"Update content in a Google Doc"`
}

type DocsCommentsAddCmd added in v0.11.0

type DocsCommentsAddCmd struct {
	DocID   string `arg:"" name:"docId" help:"Google Doc ID or URL"`
	Content string `arg:"" name:"content" help:"Comment text"`
	Quoted  string `name:"quoted" help:"Quoted text to attach to the comment (shown in UIs when available)"`
	Anchor  string `name:"anchor" help:"Anchor JSON string (advanced; editor UIs may still treat as unanchored)"`
}

DocsCommentsAddCmd creates a comment on a Google Doc.

func (*DocsCommentsAddCmd) Run added in v0.11.0

func (c *DocsCommentsAddCmd) Run(ctx context.Context, flags *RootFlags) error

type DocsCommentsCmd added in v0.11.0

type DocsCommentsCmd struct {
	List    DocsCommentsListCmd    `cmd:"" name:"list" aliases:"ls" help:"List comments on a Google Doc"`
	Get     DocsCommentsGetCmd     `cmd:"" name:"get" aliases:"info,show" help:"Get a comment by ID"`
	Add     DocsCommentsAddCmd     `cmd:"" name:"add" aliases:"create,new" help:"Add a comment to a Google Doc"`
	Reply   DocsCommentsReplyCmd   `cmd:"" name:"reply" aliases:"respond" help:"Reply to a comment"`
	Resolve DocsCommentsResolveCmd `cmd:"" name:"resolve" help:"Resolve a comment (mark as done)"`
	Delete  DocsCommentsDeleteCmd  `cmd:"" name:"delete" aliases:"rm,del,remove" help:"Delete a comment"`
}

DocsCommentsCmd is the parent command for comment operations on a Google Doc.

type DocsCommentsDeleteCmd added in v0.11.0

type DocsCommentsDeleteCmd struct {
	DocID     string `arg:"" name:"docId" help:"Google Doc ID or URL"`
	CommentID string `arg:"" name:"commentId" help:"Comment ID"`
}

DocsCommentsDeleteCmd deletes a comment on a Google Doc.

func (*DocsCommentsDeleteCmd) Run added in v0.11.0

func (c *DocsCommentsDeleteCmd) Run(ctx context.Context, flags *RootFlags) error

type DocsCommentsGetCmd added in v0.11.0

type DocsCommentsGetCmd struct {
	DocID     string `arg:"" name:"docId" help:"Google Doc ID or URL"`
	CommentID string `arg:"" name:"commentId" help:"Comment ID"`
}

DocsCommentsGetCmd retrieves a single comment by ID.

func (*DocsCommentsGetCmd) Run added in v0.11.0

func (c *DocsCommentsGetCmd) Run(ctx context.Context, flags *RootFlags) error

type DocsCommentsListCmd added in v0.11.0

type DocsCommentsListCmd struct {
	DocID           string `arg:"" name:"docId" help:"Google Doc ID or URL"`
	IncludeResolved bool   `name:"include-resolved" aliases:"resolved" help:"Include resolved comments (default: open only)"`
	Max             int64  `name:"max" aliases:"limit" help:"Max results per page" default:"100"`
	Page            string `name:"page" aliases:"cursor" help:"Page token for pagination"`
	All             bool   `name:"all" aliases:"all-pages" help:"Fetch all pages"`
	FailEmpty       bool   `name:"fail-empty" aliases:"non-empty,require-results" help:"Exit with code 3 if no results"`
}

DocsCommentsListCmd lists comments on a Google Doc.

func (*DocsCommentsListCmd) Run added in v0.11.0

func (c *DocsCommentsListCmd) Run(ctx context.Context, flags *RootFlags) error

type DocsCommentsReplyCmd added in v0.11.0

type DocsCommentsReplyCmd struct {
	DocID     string `arg:"" name:"docId" help:"Google Doc ID or URL"`
	CommentID string `arg:"" name:"commentId" help:"Comment ID"`
	Content   string `arg:"" name:"content" help:"Reply text"`
}

DocsCommentsReplyCmd replies to a comment on a Google Doc.

func (*DocsCommentsReplyCmd) Run added in v0.11.0

func (c *DocsCommentsReplyCmd) Run(ctx context.Context, flags *RootFlags) error

type DocsCommentsResolveCmd added in v0.11.0

type DocsCommentsResolveCmd struct {
	DocID     string `arg:"" name:"docId" help:"Google Doc ID or URL"`
	CommentID string `arg:"" name:"commentId" help:"Comment ID"`
	Message   string `name:"message" short:"m" help:"Optional message to include when resolving"`
}

DocsCommentsResolveCmd resolves a comment by posting an empty reply with action "resolve". The Drive API resolves a comment when a reply is created with action="resolve".

func (*DocsCommentsResolveCmd) Run added in v0.11.0

type DocsCopyCmd added in v0.4.2

type DocsCopyCmd struct {
	DocID  string `arg:"" name:"docId" help:"Doc ID"`
	Title  string `arg:"" name:"title" help:"New title"`
	Parent string `name:"parent" help:"Destination folder ID"`
}

func (*DocsCopyCmd) Run added in v0.4.2

func (c *DocsCopyCmd) Run(ctx context.Context, flags *RootFlags) error

type DocsCreateCmd added in v0.4.2

type DocsCreateCmd struct {
	Title  string `arg:"" name:"title" help:"Doc title"`
	Parent string `name:"parent" help:"Destination folder ID"`
	File   string `name:"file" help:"Markdown file to import" type:"existingfile"`
}

func (*DocsCreateCmd) Run added in v0.4.2

func (c *DocsCreateCmd) Run(ctx context.Context, flags *RootFlags) error

type DocsDeleteCmd added in v0.10.0

type DocsDeleteCmd struct {
	DocID string `arg:"" name:"docId" help:"Doc ID"`
	Start int64  `name:"start" required:"" help:"Start index (>= 1)"`
	End   int64  `name:"end" required:"" help:"End index (> start)"`
}

func (*DocsDeleteCmd) Run added in v0.10.0

func (c *DocsDeleteCmd) Run(ctx context.Context, flags *RootFlags) error

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"`
}

func (*DocsExportCmd) Run added in v0.4.2

func (c *DocsExportCmd) Run(ctx context.Context, flags *RootFlags) error

type DocsFindReplaceCmd added in v0.10.0

type DocsFindReplaceCmd struct {
	DocID       string `arg:"" name:"docId" help:"Doc ID"`
	Find        string `arg:"" name:"find" help:"Text to find"`
	ReplaceText string `arg:"" name:"replace" help:"Replacement text"`
	MatchCase   bool   `name:"match-case" help:"Case-sensitive matching"`
}

func (*DocsFindReplaceCmd) Run added in v0.10.0

func (c *DocsFindReplaceCmd) Run(ctx context.Context, flags *RootFlags) error

type DocsInfoCmd added in v0.4.2

type DocsInfoCmd struct {
	DocID string `arg:"" name:"docId" help:"Doc ID"`
}

func (*DocsInfoCmd) Run added in v0.4.2

func (c *DocsInfoCmd) Run(ctx context.Context, flags *RootFlags) error

type DocsInsertCmd added in v0.10.0

type DocsInsertCmd struct {
	DocID   string `arg:"" name:"docId" help:"Doc ID"`
	Content string `arg:"" optional:"" name:"content" help:"Text to insert (or use --file / stdin)"`
	Index   int64  `name:"index" help:"Character index to insert at (1 = beginning)" default:"1"`
	File    string `name:"file" short:"f" help:"Read content from file (use - for stdin)"`
}

func (*DocsInsertCmd) Run added in v0.10.0

func (c *DocsInsertCmd) Run(ctx context.Context, flags *RootFlags) error

type DocsListTabsCmd added in v0.10.0

type DocsListTabsCmd struct {
	DocID string `arg:"" name:"docId" help:"Doc ID"`
}

func (*DocsListTabsCmd) Run added in v0.10.0

func (c *DocsListTabsCmd) Run(ctx context.Context, flags *RootFlags) error

type DocsUpdateCmd added in v0.10.0

type DocsUpdateCmd struct {
	DocID       string `arg:"" name:"docId" help:"Doc ID"`
	Content     string `name:"content" help:"Text content to insert (mutually exclusive with --content-file)"`
	ContentFile string `name:"content-file" help:"File containing text content to insert"`
	Format      string `name:"format" help:"Content format: plain|markdown" default:"plain"`
	Append      bool   `name:"append" help:"Append to end of document instead of replacing all content"`
	Debug       bool   `name:"debug" help:"Enable debug output for markdown formatter"`
}

func (*DocsUpdateCmd) Run added in v0.10.0

func (c *DocsUpdateCmd) Run(ctx context.Context, flags *RootFlags) error

type DocsWriteCmd added in v0.10.0

type DocsWriteCmd struct {
	DocID    string `arg:"" name:"docId" help:"Doc ID"`
	Content  string `arg:"" optional:"" name:"content" help:"Content to write (or use --file / stdin)"`
	File     string `name:"file" short:"f" help:"Read content from file (use - for stdin)"`
	Replace  bool   `name:"replace" help:"Replace all content (default: append)"`
	Markdown bool   `name:"markdown" help:"Convert markdown to Google Docs formatting (requires --replace)"`
}

func (*DocsWriteCmd) Run added in v0.10.0

func (c *DocsWriteCmd) Run(ctx context.Context, flags *RootFlags) error

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:"Move a file to trash (use --permanent to delete forever)" 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"`
	Share       DriveShareCmd       `cmd:"" name:"share" help:"Share a file or folder"`
	Unshare     DriveUnshareCmd     `cmd:"" name:"unshare" help:"Remove a permission from a file"`
	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"`
	Drives      DriveDrivesCmd      `cmd:"" name:"drives" help:"List shared drives (Team Drives)"`
}

type DriveCommentReplyCmd added in v0.5.0

type DriveCommentReplyCmd struct {
	FileID    string `arg:"" name:"fileId" help:"File ID"`
	CommentID string `arg:"" name:"commentId" help:"Comment ID"`
	Content   string `arg:"" name:"content" help:"Reply text"`
}

func (*DriveCommentReplyCmd) Run added in v0.5.0

func (c *DriveCommentReplyCmd) Run(ctx context.Context, flags *RootFlags) error

type DriveCommentsCmd added in v0.5.0

type DriveCommentsCmd struct {
	List   DriveCommentsListCmd   `cmd:"" name:"list" aliases:"ls" help:"List comments on a file"`
	Get    DriveCommentsGetCmd    `cmd:"" name:"get" aliases:"info,show" help:"Get a comment by ID"`
	Create DriveCommentsCreateCmd `cmd:"" name:"create" aliases:"add,new" help:"Create a comment on a file"`
	Update DriveCommentsUpdateCmd `cmd:"" name:"update" aliases:"edit,set" help:"Update a comment"`
	Delete DriveCommentsDeleteCmd `cmd:"" name:"delete" aliases:"rm,del,remove" help:"Delete a comment"`
	Reply  DriveCommentReplyCmd   `cmd:"" name:"reply" aliases:"respond" help:"Reply to a comment"`
}

DriveCommentsCmd is the parent command for comments subcommands

type DriveCommentsCreateCmd added in v0.5.0

type DriveCommentsCreateCmd struct {
	FileID  string `arg:"" name:"fileId" help:"File ID"`
	Content string `arg:"" name:"content" help:"Comment text"`
	Quoted  string `name:"quoted" help:"Text to anchor the comment to (for Google Docs)"`
}

func (*DriveCommentsCreateCmd) Run added in v0.5.0

type DriveCommentsDeleteCmd added in v0.5.0

type DriveCommentsDeleteCmd struct {
	FileID    string `arg:"" name:"fileId" help:"File ID"`
	CommentID string `arg:"" name:"commentId" help:"Comment ID"`
}

func (*DriveCommentsDeleteCmd) Run added in v0.5.0

type DriveCommentsGetCmd added in v0.5.0

type DriveCommentsGetCmd struct {
	FileID    string `arg:"" name:"fileId" help:"File ID"`
	CommentID string `arg:"" name:"commentId" help:"Comment ID"`
}

func (*DriveCommentsGetCmd) Run added in v0.5.0

func (c *DriveCommentsGetCmd) Run(ctx context.Context, flags *RootFlags) error

type DriveCommentsListCmd added in v0.5.0

type DriveCommentsListCmd struct {
	FileID        string `arg:"" name:"fileId" help:"File ID"`
	Max           int64  `name:"max" aliases:"limit" help:"Max results" default:"100"`
	Page          string `name:"page" aliases:"cursor" help:"Page token"`
	All           bool   `name:"all" aliases:"all-pages,allpages" help:"Fetch all pages"`
	FailEmpty     bool   `name:"fail-empty" aliases:"non-empty,require-results" help:"Exit with code 3 if no results"`
	IncludeQuoted bool   `name:"include-quoted" help:"Include the quoted content the comment is anchored to"`
}

func (*DriveCommentsListCmd) Run added in v0.5.0

func (c *DriveCommentsListCmd) Run(ctx context.Context, flags *RootFlags) error

type DriveCommentsUpdateCmd added in v0.5.0

type DriveCommentsUpdateCmd struct {
	FileID    string `arg:"" name:"fileId" help:"File ID"`
	CommentID string `arg:"" name:"commentId" help:"Comment ID"`
	Content   string `arg:"" name:"content" help:"New comment text"`
}

func (*DriveCommentsUpdateCmd) Run added in v0.5.0

type DriveCopyCmd added in v0.4.2

type DriveCopyCmd struct {
	FileID string `arg:"" name:"fileId" help:"File ID"`
	Name   string `arg:"" name:"name" help:"New file name"`
	Parent string `name:"parent" help:"Destination folder ID"`
}

func (*DriveCopyCmd) Run added in v0.4.2

func (c *DriveCopyCmd) Run(ctx context.Context, flags *RootFlags) error

type DriveDeleteCmd added in v0.4.2

type DriveDeleteCmd struct {
	FileID    string `arg:"" name:"fileId" help:"File ID"`
	Permanent bool   `name:"permanent" help:"Permanently delete instead of moving to trash" default:"false"`
}

func (*DriveDeleteCmd) Run added in v0.4.2

func (c *DriveDeleteCmd) Run(ctx context.Context, flags *RootFlags) error

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: inferred)"`
}

func (*DriveDownloadCmd) Run added in v0.4.2

func (c *DriveDownloadCmd) Run(ctx context.Context, flags *RootFlags) error

type DriveDrivesCmd added in v0.7.0

type DriveDrivesCmd struct {
	Max       int64  `name:"max" aliases:"limit" help:"Max results (max allowed: 100)" default:"100"`
	Page      string `name:"page" aliases:"cursor" help:"Page token"`
	All       bool   `name:"all" aliases:"all-pages,allpages" help:"Fetch all pages"`
	FailEmpty bool   `name:"fail-empty" aliases:"non-empty,require-results" help:"Exit with code 3 if no results"`
	Query     string `name:"query" short:"q" help:"Search query for filtering shared drives"`
}

DriveDrivesCmd lists all shared drives the user has access to.

func (*DriveDrivesCmd) Run added in v0.7.0

func (c *DriveDrivesCmd) Run(ctx context.Context, flags *RootFlags) error

type DriveGetCmd added in v0.4.2

type DriveGetCmd struct {
	FileID string `arg:"" name:"fileId" help:"File ID"`
}

func (*DriveGetCmd) Run added in v0.4.2

func (c *DriveGetCmd) Run(ctx context.Context, flags *RootFlags) error

type DriveLsCmd added in v0.4.2

type DriveLsCmd struct {
	Max       int64  `name:"max" aliases:"limit" help:"Max results" default:"20"`
	Page      string `name:"page" aliases:"cursor" help:"Page token"`
	Query     string `name:"query" help:"Drive query filter"`
	Parent    string `name:"parent" help:"Folder ID to list (default: root)"`
	AllDrives bool   `` /* 130-byte string literal not displayed */
}

func (*DriveLsCmd) Run added in v0.4.2

func (c *DriveLsCmd) Run(ctx context.Context, flags *RootFlags) error

type DriveMkdirCmd added in v0.4.2

type DriveMkdirCmd struct {
	Name   string `arg:"" name:"name" help:"Folder name"`
	Parent string `name:"parent" help:"Parent folder ID"`
}

func (*DriveMkdirCmd) Run added in v0.4.2

func (c *DriveMkdirCmd) Run(ctx context.Context, flags *RootFlags) error

type DriveMoveCmd added in v0.4.2

type DriveMoveCmd struct {
	FileID string `arg:"" name:"fileId" help:"File ID"`
	Parent string `name:"parent" help:"New parent folder ID (required)"`
}

func (*DriveMoveCmd) Run added in v0.4.2

func (c *DriveMoveCmd) Run(ctx context.Context, flags *RootFlags) error

type DrivePermissionsCmd added in v0.4.2

type DrivePermissionsCmd struct {
	FileID string `arg:"" name:"fileId" help:"File ID"`
	Max    int64  `name:"max" aliases:"limit" help:"Max results" default:"100"`
	Page   string `name:"page" aliases:"cursor" help:"Page token"`
}

func (*DrivePermissionsCmd) Run added in v0.4.2

func (c *DrivePermissionsCmd) Run(ctx context.Context, flags *RootFlags) error

type DriveRenameCmd added in v0.4.2

type DriveRenameCmd struct {
	FileID  string `arg:"" name:"fileId" help:"File ID"`
	NewName string `arg:"" name:"newName" help:"New name"`
}

func (*DriveRenameCmd) Run added in v0.4.2

func (c *DriveRenameCmd) Run(ctx context.Context, flags *RootFlags) error

type DriveSearchCmd added in v0.4.2

type DriveSearchCmd struct {
	Query     []string `arg:"" name:"query" help:"Search query"`
	RawQuery  bool     `name:"raw-query" aliases:"raw" help:"Treat query as Drive query language (pass through; may error if invalid)"`
	Max       int64    `name:"max" aliases:"limit" help:"Max results" default:"20"`
	Page      string   `name:"page" aliases:"cursor" help:"Page token"`
	AllDrives bool     `` /* 130-byte string literal not displayed */
}

func (*DriveSearchCmd) Run added in v0.4.2

func (c *DriveSearchCmd) Run(ctx context.Context, flags *RootFlags) error

type DriveShareCmd added in v0.4.2

type DriveShareCmd struct {
	FileID       string `arg:"" name:"fileId" help:"File ID"`
	To           string `name:"to" help:"Share target: anyone|user|domain"`
	Anyone       bool   `name:"anyone" hidden:"" help:"(deprecated) Use --to=anyone"`
	Email        string `name:"email" help:"User email (for --to=user)"`
	Domain       string `name:"domain" help:"Domain (for --to=domain; e.g. example.com)"`
	Role         string `name:"role" help:"Permission: reader|writer" default:"reader"`
	Discoverable bool   `name:"discoverable" help:"Allow file discovery in search (anyone/domain only)"`
}

func (*DriveShareCmd) Run added in v0.4.2

func (c *DriveShareCmd) Run(ctx context.Context, flags *RootFlags) error

type DriveURLCmd added in v0.4.2

type DriveURLCmd struct {
	FileIDs []string `arg:"" name:"fileId" help:"File IDs"`
}

func (*DriveURLCmd) Run added in v0.4.2

func (c *DriveURLCmd) Run(ctx context.Context, flags *RootFlags) error

type DriveUnshareCmd added in v0.4.2

type DriveUnshareCmd struct {
	FileID       string `arg:"" name:"fileId" help:"File ID"`
	PermissionID string `arg:"" name:"permissionId" help:"Permission ID"`
}

func (*DriveUnshareCmd) Run added in v0.4.2

func (c *DriveUnshareCmd) Run(ctx context.Context, flags *RootFlags) error

type DriveUploadCmd added in v0.4.2

type DriveUploadCmd struct {
	LocalPath           string `arg:"" name:"localPath" help:"Path to local file"`
	Name                string `name:"name" help:"Override filename (create) or rename target (replace)"`
	Parent              string `name:"parent" help:"Destination folder ID (create only)"`
	ReplaceFileID       string `name:"replace" help:"Replace the content of an existing Drive file ID (preserves shared link/permissions)"`
	MimeType            string `name:"mime-type" help:"Override MIME type inference"`
	KeepRevisionForever bool   `name:"keep-revision-forever" help:"Keep the new head revision forever (binary files only)"`
	Convert             bool   `name:"convert" help:"Auto-convert to native Google format based on file extension (create only)"`
	ConvertTo           string `name:"convert-to" help:"Convert to a specific Google format: doc|sheet|slides (create only)"`
}

func (*DriveUploadCmd) Run added in v0.4.2

func (c *DriveUploadCmd) Run(ctx context.Context, flags *RootFlags) error

type ExitError added in v0.3.0

type ExitError struct {
	Code int
	Err  error
}

func (*ExitError) Error added in v0.3.0

func (e *ExitError) Error() string

func (*ExitError) Unwrap added in v0.3.0

func (e *ExitError) Unwrap() error

type FormsCmd added in v0.11.0

type FormsCmd struct {
	Get       FormsGetCmd       `cmd:"" name:"get" aliases:"info,show" help:"Get a form"`
	Create    FormsCreateCmd    `cmd:"" name:"create" aliases:"new" help:"Create a form"`
	Responses FormsResponsesCmd `cmd:"" name:"responses" help:"Form responses"`
}

type FormsCreateCmd added in v0.11.0

type FormsCreateCmd struct {
	Title       string `name:"title" help:"Form title" required:""`
	Description string `name:"description" help:"Form description"`
}

func (*FormsCreateCmd) Run added in v0.11.0

func (c *FormsCreateCmd) Run(ctx context.Context, flags *RootFlags) error

type FormsGetCmd added in v0.11.0

type FormsGetCmd struct {
	FormID string `arg:"" name:"formId" help:"Form ID"`
}

func (*FormsGetCmd) Run added in v0.11.0

func (c *FormsGetCmd) Run(ctx context.Context, flags *RootFlags) error

type FormsResponseGetCmd added in v0.11.0

type FormsResponseGetCmd struct {
	FormID     string `arg:"" name:"formId" help:"Form ID"`
	ResponseID string `arg:"" name:"responseId" help:"Response ID"`
}

func (*FormsResponseGetCmd) Run added in v0.11.0

func (c *FormsResponseGetCmd) Run(ctx context.Context, flags *RootFlags) error

type FormsResponsesCmd added in v0.11.0

type FormsResponsesCmd struct {
	List FormsResponsesListCmd `cmd:"" name:"list" aliases:"ls" help:"List form responses"`
	Get  FormsResponseGetCmd   `cmd:"" name:"get" aliases:"info,show" help:"Get a form response"`
}

type FormsResponsesListCmd added in v0.11.0

type FormsResponsesListCmd struct {
	FormID string `arg:"" name:"formId" help:"Form ID"`
	Max    int    `name:"max" help:"Maximum responses" default:"20"`
	Page   string `name:"page" help:"Page token"`
	Filter string `name:"filter" help:"Filter expression"`
}

func (*FormsResponsesListCmd) Run added in v0.11.0

func (c *FormsResponsesListCmd) Run(ctx context.Context, flags *RootFlags) error

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 (used when --out is empty or points to a directory)"`
}

func (*GmailAttachmentCmd) Run added in v0.4.2

func (c *GmailAttachmentCmd) Run(ctx context.Context, flags *RootFlags) error

type GmailAutoForwardCmd added in v0.4.2

type GmailAutoForwardCmd struct {
	Get    GmailAutoForwardGetCmd    `cmd:"" name:"get" aliases:"info,show" help:"Get current auto-forwarding settings"`
	Update GmailAutoForwardUpdateCmd `cmd:"" name:"update" aliases:"edit,set" help:"Update auto-forwarding settings"`
}

type GmailAutoForwardGetCmd added in v0.4.2

type GmailAutoForwardGetCmd struct{}

func (*GmailAutoForwardGetCmd) Run added in v0.4.2

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"`
}

func (*GmailAutoForwardUpdateCmd) Run added in v0.4.2

type GmailBatchCmd added in v0.4.2

type GmailBatchCmd struct {
	Delete GmailBatchDeleteCmd `cmd:"" name:"delete" aliases:"rm,del,remove" help:"Permanently delete multiple messages"`
	Modify GmailBatchModifyCmd `cmd:"" name:"modify" aliases:"update,edit,set" help:"Modify labels on multiple messages"`
}

type GmailBatchDeleteCmd added in v0.4.2

type GmailBatchDeleteCmd struct {
	MessageIDs []string `arg:"" name:"messageId" help:"Message IDs"`
}

func (*GmailBatchDeleteCmd) Run added in v0.4.2

func (c *GmailBatchDeleteCmd) Run(ctx context.Context, flags *RootFlags) error

type GmailBatchModifyCmd added in v0.4.2

type GmailBatchModifyCmd struct {
	MessageIDs []string `arg:"" name:"messageId" help:"Message IDs"`
	Add        string   `name:"add" help:"Labels to add (comma-separated, name or ID)"`
	Remove     string   `name:"remove" help:"Labels to remove (comma-separated, name or ID)"`
}

func (*GmailBatchModifyCmd) Run added in v0.4.2

func (c *GmailBatchModifyCmd) Run(ctx context.Context, flags *RootFlags) error

type GmailCmd added in v0.4.2

type GmailCmd struct {
	Search     GmailSearchCmd     `cmd:"" name:"search" aliases:"find,query,ls,list" group:"Read" help:"Search threads using Gmail query syntax"`
	Messages   GmailMessagesCmd   `cmd:"" name:"messages" aliases:"message,msg,msgs" group:"Read" help:"Message operations"`
	Thread     GmailThreadCmd     `cmd:"" name:"thread" aliases:"threads,read" group:"Organize" help:"Thread operations (get, modify)"`
	Get        GmailGetCmd        `cmd:"" name:"get" aliases:"info,show" 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" aliases:"label" 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" aliases:"draft" 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"`
}

func (*GmailDelegatesAddCmd) Run added in v0.4.2

func (c *GmailDelegatesAddCmd) Run(ctx context.Context, flags *RootFlags) error

type GmailDelegatesCmd added in v0.4.2

type GmailDelegatesCmd struct {
	List   GmailDelegatesListCmd   `cmd:"" name:"list" aliases:"ls" help:"List all delegates"`
	Get    GmailDelegatesGetCmd    `cmd:"" name:"get" aliases:"info,show" help:"Get a specific delegate's information"`
	Add    GmailDelegatesAddCmd    `cmd:"" name:"add" aliases:"create,new" help:"Add a delegate"`
	Remove GmailDelegatesRemoveCmd `cmd:"" name:"remove" aliases:"delete,rm,del" help:"Remove a delegate"`
}

type GmailDelegatesGetCmd added in v0.4.2

type GmailDelegatesGetCmd struct {
	DelegateEmail string `arg:"" name:"delegateEmail" help:"Delegate email"`
}

func (*GmailDelegatesGetCmd) Run added in v0.4.2

func (c *GmailDelegatesGetCmd) Run(ctx context.Context, flags *RootFlags) error

type GmailDelegatesListCmd added in v0.4.2

type GmailDelegatesListCmd struct{}

func (*GmailDelegatesListCmd) Run added in v0.4.2

func (c *GmailDelegatesListCmd) Run(ctx context.Context, flags *RootFlags) error

type GmailDelegatesRemoveCmd added in v0.4.2

type GmailDelegatesRemoveCmd struct {
	DelegateEmail string `arg:"" name:"delegateEmail" help:"Delegate email"`
}

func (*GmailDelegatesRemoveCmd) Run added in v0.4.2

type GmailDraftsCmd added in v0.4.2

type GmailDraftsCmd struct {
	List   GmailDraftsListCmd   `cmd:"" name:"list" aliases:"ls" help:"List drafts"`
	Get    GmailDraftsGetCmd    `cmd:"" name:"get" aliases:"info,show" help:"Get draft details"`
	Delete GmailDraftsDeleteCmd `cmd:"" name:"delete" aliases:"rm,del,remove" help:"Delete a draft"`
	Send   GmailDraftsSendCmd   `cmd:"" name:"send" aliases:"post" help:"Send a draft"`
	Create GmailDraftsCreateCmd `cmd:"" name:"create" aliases:"add,new" help:"Create a draft"`
	Update GmailDraftsUpdateCmd `cmd:"" name:"update" aliases:"edit,set" 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)"`
}

func (*GmailDraftsCreateCmd) Run added in v0.4.2

func (c *GmailDraftsCreateCmd) Run(ctx context.Context, flags *RootFlags) error

type GmailDraftsDeleteCmd added in v0.4.2

type GmailDraftsDeleteCmd struct {
	DraftID string `arg:"" name:"draftId" help:"Draft ID"`
}

func (*GmailDraftsDeleteCmd) Run added in v0.4.2

func (c *GmailDraftsDeleteCmd) Run(ctx context.Context, flags *RootFlags) error

type GmailDraftsGetCmd added in v0.4.2

type GmailDraftsGetCmd struct {
	DraftID  string `arg:"" name:"draftId" help:"Draft ID"`
	Download bool   `name:"download" help:"Download draft attachments"`
}

func (*GmailDraftsGetCmd) Run added in v0.4.2

func (c *GmailDraftsGetCmd) Run(ctx context.Context, flags *RootFlags) error

type GmailDraftsListCmd added in v0.4.2

type GmailDraftsListCmd struct {
	Max       int64  `name:"max" aliases:"limit" help:"Max results" default:"20"`
	Page      string `name:"page" aliases:"cursor" help:"Page token"`
	All       bool   `name:"all" aliases:"all-pages,allpages" help:"Fetch all pages"`
	FailEmpty bool   `name:"fail-empty" aliases:"non-empty,require-results" help:"Exit with code 3 if no results"`
}

func (*GmailDraftsListCmd) Run added in v0.4.2

func (c *GmailDraftsListCmd) Run(ctx context.Context, flags *RootFlags) error

type GmailDraftsSendCmd added in v0.4.2

type GmailDraftsSendCmd struct {
	DraftID string `arg:"" name:"draftId" help:"Draft ID"`
}

func (*GmailDraftsSendCmd) Run added in v0.4.2

func (c *GmailDraftsSendCmd) Run(ctx context.Context, flags *RootFlags) error

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)"`
}

func (*GmailDraftsUpdateCmd) Run added in v0.5.0

func (c *GmailDraftsUpdateCmd) Run(ctx context.Context, flags *RootFlags) error

type GmailFiltersCmd added in v0.4.2

type GmailFiltersCmd struct {
	List   GmailFiltersListCmd   `cmd:"" name:"list" aliases:"ls" help:"List all email filters"`
	Get    GmailFiltersGetCmd    `cmd:"" name:"get" aliases:"info,show" help:"Get a specific filter"`
	Create GmailFiltersCreateCmd `cmd:"" name:"create" aliases:"add,new" help:"Create a new email filter"`
	Delete GmailFiltersDeleteCmd `cmd:"" name:"delete" aliases:"rm,del,remove" 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"`
}

func (*GmailFiltersCreateCmd) Run added in v0.4.2

func (c *GmailFiltersCreateCmd) Run(ctx context.Context, flags *RootFlags) error

type GmailFiltersDeleteCmd added in v0.4.2

type GmailFiltersDeleteCmd struct {
	FilterID string `arg:"" name:"filterId" help:"Filter ID"`
}

func (*GmailFiltersDeleteCmd) Run added in v0.4.2

func (c *GmailFiltersDeleteCmd) Run(ctx context.Context, flags *RootFlags) error

type GmailFiltersGetCmd added in v0.4.2

type GmailFiltersGetCmd struct {
	FilterID string `arg:"" name:"filterId" help:"Filter ID"`
}

func (*GmailFiltersGetCmd) Run added in v0.4.2

func (c *GmailFiltersGetCmd) Run(ctx context.Context, flags *RootFlags) error

type GmailFiltersListCmd added in v0.4.2

type GmailFiltersListCmd struct{}

func (*GmailFiltersListCmd) Run added in v0.4.2

func (c *GmailFiltersListCmd) Run(ctx context.Context, flags *RootFlags) error

type GmailForwardingCmd added in v0.4.2

type GmailForwardingCmd struct {
	List   GmailForwardingListCmd   `cmd:"" name:"list" aliases:"ls" help:"List all forwarding addresses"`
	Get    GmailForwardingGetCmd    `cmd:"" name:"get" aliases:"info,show" help:"Get a specific forwarding address"`
	Create GmailForwardingCreateCmd `cmd:"" name:"create" aliases:"add,new" help:"Create/add a forwarding address"`
	Delete GmailForwardingDeleteCmd `cmd:"" name:"delete" aliases:"rm,del,remove" help:"Delete a forwarding address"`
}

type GmailForwardingCreateCmd added in v0.4.2

type GmailForwardingCreateCmd struct {
	ForwardingEmail string `arg:"" name:"forwardingEmail" help:"Forwarding email"`
}

func (*GmailForwardingCreateCmd) Run added in v0.4.2

type GmailForwardingDeleteCmd added in v0.4.2

type GmailForwardingDeleteCmd struct {
	ForwardingEmail string `arg:"" name:"forwardingEmail" help:"Forwarding email"`
}

func (*GmailForwardingDeleteCmd) Run added in v0.4.2

type GmailForwardingGetCmd added in v0.4.2

type GmailForwardingGetCmd struct {
	ForwardingEmail string `arg:"" name:"forwardingEmail" help:"Forwarding email"`
}

func (*GmailForwardingGetCmd) Run added in v0.4.2

func (c *GmailForwardingGetCmd) Run(ctx context.Context, flags *RootFlags) error

type GmailForwardingListCmd added in v0.4.2

type GmailForwardingListCmd struct{}

func (*GmailForwardingListCmd) Run added in v0.4.2

type GmailGetCmd added in v0.4.2

type GmailGetCmd struct {
	MessageID string `arg:"" name:"messageId" help:"Message ID"`
	Format    string `name:"format" help:"Message format: full|metadata|raw" default:"full"`
	Headers   string `name:"headers" help:"Metadata headers (comma-separated; only for --format=metadata)"`
}

func (*GmailGetCmd) Run added in v0.4.2

func (c *GmailGetCmd) Run(ctx context.Context, flags *RootFlags) error

type GmailHistoryCmd added in v0.4.2

type GmailHistoryCmd struct {
	Since     string `name:"since" help:"Start history ID"`
	Max       int64  `name:"max" aliases:"limit" help:"Max results" default:"100"`
	Page      string `name:"page" aliases:"cursor" help:"Page token"`
	All       bool   `name:"all" aliases:"all-pages,allpages" help:"Fetch all pages"`
	FailEmpty bool   `name:"fail-empty" aliases:"non-empty,require-results" help:"Exit with code 3 if no results"`
}

func (*GmailHistoryCmd) Run added in v0.4.2

func (c *GmailHistoryCmd) Run(ctx context.Context, flags *RootFlags) error

type GmailLabelsCmd added in v0.4.2

type GmailLabelsCmd struct {
	List   GmailLabelsListCmd   `cmd:"" name:"list" aliases:"ls" help:"List labels"`
	Get    GmailLabelsGetCmd    `cmd:"" name:"get" aliases:"info,show" help:"Get label details (including counts)"`
	Create GmailLabelsCreateCmd `cmd:"" name:"create" aliases:"add,new" help:"Create a new label"`
	Modify GmailLabelsModifyCmd `cmd:"" name:"modify" aliases:"update,edit,set" help:"Modify labels on threads"`
	Delete GmailLabelsDeleteCmd `cmd:"" name:"delete" aliases:"rm,del" help:"Delete a label"`
}

type GmailLabelsCreateCmd added in v0.5.0

type GmailLabelsCreateCmd struct {
	Name string `arg:"" help:"Label name"`
}

func (*GmailLabelsCreateCmd) Run added in v0.5.0

func (c *GmailLabelsCreateCmd) Run(ctx context.Context, flags *RootFlags) error

type GmailLabelsDeleteCmd added in v0.10.0

type GmailLabelsDeleteCmd struct {
	Label string `arg:"" name:"labelIdOrName" help:"Label ID or name"`
}

func (*GmailLabelsDeleteCmd) Run added in v0.10.0

func (c *GmailLabelsDeleteCmd) Run(ctx context.Context, flags *RootFlags) error

type GmailLabelsGetCmd added in v0.4.2

type GmailLabelsGetCmd struct {
	Label string `arg:"" name:"labelIdOrName" help:"Label ID or name"`
}

func (*GmailLabelsGetCmd) Run added in v0.4.2

func (c *GmailLabelsGetCmd) Run(ctx context.Context, flags *RootFlags) error

type GmailLabelsListCmd added in v0.4.2

type GmailLabelsListCmd struct{}

func (*GmailLabelsListCmd) Run added in v0.4.2

func (c *GmailLabelsListCmd) Run(ctx context.Context, flags *RootFlags) error

type GmailLabelsModifyCmd added in v0.4.2

type GmailLabelsModifyCmd struct {
	ThreadIDs []string `arg:"" name:"threadId" help:"Thread IDs"`
	Add       string   `name:"add" help:"Labels to add (comma-separated, name or ID)"`
	Remove    string   `name:"remove" help:"Labels to remove (comma-separated, name or ID)"`
}

func (*GmailLabelsModifyCmd) Run added in v0.4.2

func (c *GmailLabelsModifyCmd) Run(ctx context.Context, flags *RootFlags) error

type GmailMessagesCmd added in v0.9.0

type GmailMessagesCmd struct {
	Search GmailMessagesSearchCmd `cmd:"" name:"search" aliases:"find,query,ls,list" group:"Read" help:"Search messages using Gmail query syntax"`
}

type GmailMessagesSearchCmd added in v0.9.0

type GmailMessagesSearchCmd struct {
	Query       []string `arg:"" name:"query" help:"Search query"`
	Max         int64    `name:"max" aliases:"limit" help:"Max results" default:"10"`
	Page        string   `name:"page" aliases:"cursor" help:"Page token"`
	All         bool     `name:"all" aliases:"all-pages,allpages" help:"Fetch all pages"`
	FailEmpty   bool     `name:"fail-empty" aliases:"non-empty,require-results" help:"Exit with code 3 if no results"`
	Timezone    string   `name:"timezone" short:"z" help:"Output timezone (IANA name, e.g. America/New_York, UTC). Default: local"`
	Local       bool     `name:"local" help:"Use local timezone (default behavior, useful to override --timezone)"`
	IncludeBody bool     `name:"include-body" help:"Include decoded message body (JSON is full; text output is truncated)"`
}

func (*GmailMessagesSearchCmd) Run added in v0.9.0

type GmailSearchCmd added in v0.4.2

type GmailSearchCmd struct {
	Query     []string `arg:"" name:"query" help:"Search query"`
	Max       int64    `name:"max" aliases:"limit" help:"Max results" default:"10"`
	Page      string   `name:"page" aliases:"cursor" help:"Page token"`
	All       bool     `name:"all" aliases:"all-pages,allpages" help:"Fetch all pages"`
	FailEmpty bool     `name:"fail-empty" aliases:"non-empty,require-results" help:"Exit with code 3 if no results"`
	Oldest    bool     `name:"oldest" help:"Show first message date instead of last"`
	Timezone  string   `name:"timezone" short:"z" help:"Output timezone (IANA name, e.g. America/New_York, UTC). Default: local"`
	Local     bool     `name:"local" help:"Use local timezone (default behavior, useful to override --timezone)"`
}

func (*GmailSearchCmd) Run added in v0.4.2

func (c *GmailSearchCmd) Run(ctx context.Context, flags *RootFlags) error

type GmailSendAsCmd added in v0.4.2

type GmailSendAsCmd struct {
	List   GmailSendAsListCmd   `cmd:"" name:"list" aliases:"ls" help:"List send-as aliases"`
	Get    GmailSendAsGetCmd    `cmd:"" name:"get" aliases:"info,show" help:"Get details of a send-as alias"`
	Create GmailSendAsCreateCmd `cmd:"" name:"create" aliases:"add,new" help:"Create a new send-as alias"`
	Verify GmailSendAsVerifyCmd `cmd:"" name:"verify" aliases:"resend" help:"Resend verification email for a send-as alias"`
	Delete GmailSendAsDeleteCmd `cmd:"" name:"delete" aliases:"rm,del,remove" help:"Delete a send-as alias"`
	Update GmailSendAsUpdateCmd `cmd:"" name:"update" aliases:"edit,set" 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"`
}

func (*GmailSendAsCreateCmd) Run added in v0.4.2

func (c *GmailSendAsCreateCmd) Run(ctx context.Context, flags *RootFlags) error

type GmailSendAsDeleteCmd added in v0.4.2

type GmailSendAsDeleteCmd struct {
	Email string `arg:"" name:"email" help:"Send-as email"`
}

func (*GmailSendAsDeleteCmd) Run added in v0.4.2

func (c *GmailSendAsDeleteCmd) Run(ctx context.Context, flags *RootFlags) error

type GmailSendAsGetCmd added in v0.4.2

type GmailSendAsGetCmd struct {
	Email string `arg:"" name:"email" help:"Send-as email"`
}

func (*GmailSendAsGetCmd) Run added in v0.4.2

func (c *GmailSendAsGetCmd) Run(ctx context.Context, flags *RootFlags) error

type GmailSendAsListCmd added in v0.4.2

type GmailSendAsListCmd struct{}

func (*GmailSendAsListCmd) Run added in v0.4.2

func (c *GmailSendAsListCmd) Run(ctx context.Context, flags *RootFlags) error

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"`
}

func (*GmailSendAsUpdateCmd) Run added in v0.4.2

func (c *GmailSendAsUpdateCmd) Run(ctx context.Context, kctx *kong.Context, flags *RootFlags) error

type GmailSendAsVerifyCmd added in v0.4.2

type GmailSendAsVerifyCmd struct {
	Email string `arg:"" name:"email" help:"Send-as email"`
}

func (*GmailSendAsVerifyCmd) Run added in v0.4.2

func (c *GmailSendAsVerifyCmd) Run(ctx context.Context, flags *RootFlags) error

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"`
	Quote            bool     `name:"quote" help:"Include quoted original message in reply (requires --reply-to-message-id or --thread-id)"`
}

func (*GmailSendCmd) Run added in v0.4.2

func (c *GmailSendCmd) Run(ctx context.Context, flags *RootFlags) error

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.

func (*GmailThreadAttachmentsCmd) Run added in v0.5.0

type GmailThreadCmd added in v0.4.2

type GmailThreadCmd struct {
	Get         GmailThreadGetCmd         `` /* 128-byte string literal not displayed */
	Modify      GmailThreadModifyCmd      `cmd:"" name:"modify" aliases:"update,edit,set" help:"Modify labels on all messages in a thread"`
	Attachments GmailThreadAttachmentsCmd `cmd:"" name:"attachments" aliases:"files" 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:""`
}

func (*GmailThreadGetCmd) Run added in v0.4.2

func (c *GmailThreadGetCmd) Run(ctx context.Context, flags *RootFlags) error

type GmailThreadModifyCmd added in v0.4.2

type GmailThreadModifyCmd struct {
	ThreadID string `arg:"" name:"threadId" help:"Thread ID"`
	Add      string `name:"add" help:"Labels to add (comma-separated, name or ID)"`
	Remove   string `name:"remove" help:"Labels to remove (comma-separated, name or ID)"`
}

func (*GmailThreadModifyCmd) Run added in v0.4.2

func (c *GmailThreadModifyCmd) Run(ctx context.Context, flags *RootFlags) error

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 GmailTrackOpensCmd struct {
	TrackingID string `arg:"" optional:"" help:"Tracking ID from send command"`
	To         string `name:"to" help:"Filter by recipient email"`
	Since      string `name:"since" help:"Filter by time (e.g., '24h', '2024-01-01')"`
}

func (*GmailTrackOpensCmd) Run added in v0.5.0

func (c *GmailTrackOpensCmd) Run(ctx context.Context, flags *RootFlags) error

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)"`
}

func (*GmailTrackSetupCmd) Run added in v0.5.0

func (c *GmailTrackSetupCmd) Run(ctx context.Context, flags *RootFlags) error

type GmailTrackStatusCmd added in v0.5.0

type GmailTrackStatusCmd struct{}

func (*GmailTrackStatusCmd) Run added in v0.5.0

func (c *GmailTrackStatusCmd) Run(ctx context.Context, flags *RootFlags) error

type GmailURLCmd added in v0.4.2

type GmailURLCmd struct {
	ThreadIDs []string `arg:"" name:"threadId" help:"Thread IDs"`
}

func (*GmailURLCmd) Run added in v0.4.2

func (c *GmailURLCmd) Run(ctx context.Context, flags *RootFlags) error

type GmailVacationCmd added in v0.4.2

type GmailVacationCmd struct {
	Get    GmailVacationGetCmd    `cmd:"" name:"get" aliases:"info,show" help:"Get current vacation responder settings"`
	Update GmailVacationUpdateCmd `cmd:"" name:"update" aliases:"edit,set" help:"Update vacation responder settings"`
}

type GmailVacationGetCmd added in v0.4.2

type GmailVacationGetCmd struct{}

func (*GmailVacationGetCmd) Run added in v0.4.2

func (c *GmailVacationGetCmd) Run(ctx context.Context, flags *RootFlags) error

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"`
}

func (*GmailVacationUpdateCmd) Run added in v0.4.2

func (c *GmailVacationUpdateCmd) Run(ctx context.Context, kctx *kong.Context, flags *RootFlags) error

type GmailWatchCmd added in v0.4.2

type GmailWatchCmd struct {
	Start  GmailWatchStartCmd  `cmd:"" name:"start" aliases:"begin" help:"Start Gmail watch for Pub/Sub"`
	Status GmailWatchStatusCmd `cmd:"" name:"status" aliases:"ls" help:"Show stored watch state"`
	Renew  GmailWatchRenewCmd  `cmd:"" name:"renew" aliases:"update" help:"Renew Gmail watch using stored config"`
	Stop   GmailWatchStopCmd   `cmd:"" name:"stop" aliases:"rm,delete" 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)"`
}

func (*GmailWatchRenewCmd) Run added in v0.4.2

func (c *GmailWatchRenewCmd) Run(ctx context.Context, flags *RootFlags) error

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"`
	Timezone      string `name:"timezone" short:"z" help:"Output timezone (IANA name, e.g. America/New_York, UTC). Default: local"`
	Local         bool   `name:"local" help:"Use local timezone (default behavior, useful to override --timezone)"`
	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"`
	SharedToken   string `name:"token" help:"Shared token for x-gog-token or ?token="`
	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"`
	ExcludeLabels string `` /* 163-byte string literal not displayed */
	SaveHook      bool   `name:"save-hook" help:"Persist hook settings to watch state"`
}

func (*GmailWatchServeCmd) Run added in v0.4.2

func (c *GmailWatchServeCmd) Run(ctx context.Context, kctx *kong.Context, flags *RootFlags) error

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"`
}

func (*GmailWatchStartCmd) Run added in v0.4.2

func (c *GmailWatchStartCmd) Run(ctx context.Context, kctx *kong.Context, flags *RootFlags) error

type GmailWatchStatusCmd added in v0.4.2

type GmailWatchStatusCmd struct{}

func (*GmailWatchStatusCmd) Run added in v0.4.2

func (c *GmailWatchStatusCmd) Run(ctx context.Context, flags *RootFlags) error

type GmailWatchStopCmd added in v0.4.2

type GmailWatchStopCmd struct{}

func (*GmailWatchStopCmd) Run added in v0.4.2

func (c *GmailWatchStopCmd) Run(ctx context.Context, flags *RootFlags) error

type GroupsCmd added in v0.5.0

type GroupsCmd struct {
	List    GroupsListCmd    `cmd:"" name:"list" aliases:"ls" 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 GroupsListCmd struct {
	Max       int64  `name:"max" aliases:"limit" help:"Max results" default:"100"`
	Page      string `name:"page" aliases:"cursor" help:"Page token"`
	All       bool   `name:"all" aliases:"all-pages,allpages" help:"Fetch all pages"`
	FailEmpty bool   `name:"fail-empty" aliases:"non-empty,require-results" help:"Exit with code 3 if no results"`
}

func (*GroupsListCmd) Run added in v0.5.0

func (c *GroupsListCmd) Run(ctx context.Context, flags *RootFlags) error

type GroupsMembersCmd added in v0.5.0

type GroupsMembersCmd struct {
	GroupEmail string `arg:"" name:"groupEmail" help:"Group email (e.g., [email protected])"`
	Max        int64  `name:"max" aliases:"limit" help:"Max results" default:"100"`
	Page       string `name:"page" aliases:"cursor" help:"Page token"`
	All        bool   `name:"all" aliases:"all-pages,allpages" help:"Fetch all pages"`
	FailEmpty  bool   `name:"fail-empty" aliases:"non-empty,require-results" help:"Exit with code 3 if no results"`
}

func (*GroupsMembersCmd) Run added in v0.5.0

func (c *GroupsMembersCmd) Run(ctx context.Context, flags *RootFlags) error

type InlineMatch added in v0.10.0

type InlineMatch struct {
	Start   int
	End     int
	Content string
	Type    string
	URL     string
}

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)"`
}

func (*KeepAttachmentCmd) Run added in v0.5.0

func (c *KeepAttachmentCmd) Run(ctx context.Context, flags *RootFlags, keep *KeepCmd) error

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)"`
}

func (*KeepGetCmd) Run added in v0.5.0

func (c *KeepGetCmd) Run(ctx context.Context, flags *RootFlags, keep *KeepCmd) error

type KeepListCmd added in v0.5.0

type KeepListCmd struct {
	Max       int64  `name:"max" aliases:"limit" help:"Max results" default:"100"`
	Page      string `name:"page" aliases:"cursor" help:"Page token"`
	All       bool   `name:"all" aliases:"all-pages,allpages" help:"Fetch all pages"`
	FailEmpty bool   `name:"fail-empty" aliases:"non-empty,require-results" help:"Exit with code 3 if no results"`
	Filter    string `name:"filter" help:"Filter expression (e.g. 'create_time > \"2024-01-01T00:00:00Z\"')"`
}

func (*KeepListCmd) Run added in v0.5.0

func (c *KeepListCmd) Run(ctx context.Context, flags *RootFlags, keep *KeepCmd) error

type KeepSearchCmd added in v0.5.0

type KeepSearchCmd struct {
	Query string `arg:"" name:"query" help:"Text to search for in title and body"`
	Max   int64  `name:"max" aliases:"limit" help:"Max results to fetch before filtering" default:"500"`
}

func (*KeepSearchCmd) Run added in v0.5.0

func (c *KeepSearchCmd) Run(ctx context.Context, flags *RootFlags, keep *KeepCmd) error

type MarkdownElement added in v0.10.0

type MarkdownElement struct {
	Type       MarkdownElementType
	Content    string
	Children   []MarkdownElement
	URL        string     // for links
	Level      int        // for headings and lists
	TableCells [][]string // for tables: rows of cells
}

MarkdownElement represents a parsed markdown element

func ParseMarkdown added in v0.10.0

func ParseMarkdown(text string) []MarkdownElement

ParseMarkdown parses markdown text into structured elements

type MarkdownElementType added in v0.10.0

type MarkdownElementType int

MarkdownElementType represents the type of markdown element

const (
	MDText MarkdownElementType = iota
	MDHeading1
	MDHeading2
	MDHeading3
	MDHeading4
	MDHeading5
	MDHeading6
	MDBold
	MDItalic
	MDBoldItalic
	MDCode
	MDCodeBlock
	MDLink
	MDImage
	MDListItem
	MDNumberedList
	MDBlockquote
	MDHorizontalRule
	MDParagraph
	MDEmptyLine
	MDTable
)

type OpenCmd added in v0.10.0

type OpenCmd struct {
	Target string `arg:"" name:"target" help:"Google URL or ID"`
	Type   string `` /* 152-byte string literal not displayed */
}

func (*OpenCmd) Run added in v0.10.0

func (c *OpenCmd) Run(ctx context.Context) error

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 ParagraphStyle added in v0.10.0

type ParagraphStyle struct {
	Type  MarkdownElementType
	Start int64
	End   int64
}

ParagraphStyle represents paragraph-level formatting

type PeopleCmd added in v0.4.2

type PeopleCmd struct {
	Me        PeopleMeCmd        `cmd:"" name:"me" help:"Show your profile (people/me)"`
	Get       PeopleGetCmd       `cmd:"" name:"get" aliases:"info,show" help:"Get a user profile by ID"`
	Search    PeopleSearchCmd    `cmd:"" name:"search" aliases:"find,query" help:"Search the Workspace directory"`
	Relations PeopleRelationsCmd `cmd:"" name:"relations" help:"Get user relations"`
}

type PeopleGetCmd added in v0.8.0

type PeopleGetCmd struct {
	UserID string `arg:"" name:"userId" help:"User ID (people/...)"`
}

func (*PeopleGetCmd) Run added in v0.8.0

func (c *PeopleGetCmd) Run(ctx context.Context, flags *RootFlags) error

type PeopleMeCmd added in v0.4.2

type PeopleMeCmd struct{}

func (*PeopleMeCmd) Run added in v0.4.2

func (c *PeopleMeCmd) Run(ctx context.Context, flags *RootFlags) error

type PeopleRelationsCmd added in v0.8.0

type PeopleRelationsCmd struct {
	UserID string `arg:"" optional:"" name:"userId" help:"User ID (people/...)"`
	Type   string `name:"type" help:"Filter relation type"`
}

func (*PeopleRelationsCmd) Run added in v0.8.0

func (c *PeopleRelationsCmd) Run(ctx context.Context, flags *RootFlags) error

type PeopleSearchCmd added in v0.8.0

type PeopleSearchCmd struct {
	Query     []string `arg:"" name:"query" help:"Search query"`
	Max       int64    `name:"max" aliases:"limit" help:"Max results" default:"50"`
	Page      string   `name:"page" aliases:"cursor" help:"Page token"`
	All       bool     `name:"all" aliases:"all-pages,allpages" help:"Fetch all pages"`
	FailEmpty bool     `name:"fail-empty" aliases:"non-empty,require-results" help:"Exit with code 3 if no results"`
}

func (*PeopleSearchCmd) Run added in v0.8.0

func (c *PeopleSearchCmd) Run(ctx context.Context, flags *RootFlags) error

type RootFlags added in v0.4.2

type RootFlags struct {
	Color          string `help:"Color output: auto|always|never" default:"${color}"`
	Account        string `` /* 157-byte string literal not displayed */
	Client         string `help:"OAuth client name (selects stored credentials + token bucket)" default:"${client}"`
	EnableCommands string `help:"Comma-separated list of enabled top-level commands (restricts CLI)" default:"${enabled_commands}"`
	JSON           bool   `help:"Output JSON to stdout (best for scripting)" default:"${json}" aliases:"machine" short:"j"`
	Plain          bool   `help:"Output stable, parseable text to stdout (TSV; no colors)" default:"${plain}" aliases:"tsv" short:"p"`
	ResultsOnly    bool   `name:"results-only" help:"In JSON mode, emit only the primary result (drops envelope fields like nextPageToken)"`
	Select         string `` /* 167-byte string literal not displayed */
	DryRun         bool   `help:"Do not make changes; print intended actions and exit successfully" aliases:"noop,preview,dryrun" short:"n"`
	Force          bool   `help:"Skip confirmations for destructive commands" aliases:"yes,assume-yes" short:"y"`
	NoInput        bool   `help:"Never prompt; fail instead (useful for CI)" aliases:"non-interactive,noninteractive"`
	Verbose        bool   `help:"Enable verbose logging" short:"v"`
}

type SchemaCmd added in v0.10.0

type SchemaCmd struct {
	Command       []string `arg:"" optional:"" name:"command" help:"Optional command path to describe (e.g. drive ls). Default: entire CLI"`
	IncludeHidden bool     `name:"include-hidden" help:"Include hidden commands and flags"`
}

func (*SchemaCmd) Run added in v0.10.0

func (c *SchemaCmd) Run(ctx context.Context, kctx *kong.Context) error

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"`
}

func (*SheetsAppendCmd) Run added in v0.4.2

func (c *SheetsAppendCmd) Run(ctx context.Context, flags *RootFlags) error

type SheetsClearCmd added in v0.4.2

type SheetsClearCmd struct {
	SpreadsheetID string `arg:"" name:"spreadsheetId" help:"Spreadsheet ID"`
	Range         string `arg:"" name:"range" help:"Range (eg. Sheet1!A1:B2)"`
}

func (*SheetsClearCmd) Run added in v0.4.2

func (c *SheetsClearCmd) Run(ctx context.Context, flags *RootFlags) error

type SheetsCmd added in v0.4.2

type SheetsCmd struct {
	Get      SheetsGetCmd      `cmd:"" name:"get" aliases:"read,show" help:"Get values from a range"`
	Update   SheetsUpdateCmd   `cmd:"" name:"update" aliases:"edit,set" help:"Update values in a range"`
	Append   SheetsAppendCmd   `cmd:"" name:"append" aliases:"add" help:"Append values to a range"`
	Clear    SheetsClearCmd    `cmd:"" name:"clear" help:"Clear values in a range"`
	Format   SheetsFormatCmd   `cmd:"" name:"format" help:"Apply cell formatting to a range"`
	Notes    SheetsNotesCmd    `cmd:"" name:"notes" help:"Get cell notes from a range"`
	Metadata SheetsMetadataCmd `cmd:"" name:"metadata" aliases:"info" help:"Get spreadsheet metadata"`
	Create   SheetsCreateCmd   `cmd:"" name:"create" aliases:"new" help:"Create a new spreadsheet"`
	Copy     SheetsCopyCmd     `cmd:"" name:"copy" aliases:"cp,duplicate" help:"Copy a Google Sheet"`
	Export   SheetsExportCmd   `cmd:"" name:"export" aliases:"download,dl" help:"Export a Google Sheet (pdf|xlsx|csv) via Drive"`
}

type SheetsCopyCmd added in v0.4.2

type SheetsCopyCmd struct {
	SpreadsheetID string `arg:"" name:"spreadsheetId" help:"Spreadsheet ID"`
	Title         string `arg:"" name:"title" help:"New spreadsheet title"`
	Parent        string `name:"parent" help:"Destination folder ID"`
}

func (*SheetsCopyCmd) Run added in v0.4.2

func (c *SheetsCopyCmd) Run(ctx context.Context, flags *RootFlags) error

type SheetsCreateCmd added in v0.4.2

type SheetsCreateCmd struct {
	Title  string `arg:"" name:"title" help:"Spreadsheet title"`
	Sheets string `name:"sheets" help:"Comma-separated sheet names to create"`
}

func (*SheetsCreateCmd) Run added in v0.4.2

func (c *SheetsCreateCmd) Run(ctx context.Context, flags *RootFlags) error

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"`
}

func (*SheetsExportCmd) Run added in v0.4.2

func (c *SheetsExportCmd) Run(ctx context.Context, flags *RootFlags) error

type SheetsFormatCmd added in v0.7.0

type SheetsFormatCmd struct {
	SpreadsheetID string `arg:"" name:"spreadsheetId" help:"Spreadsheet ID"`
	Range         string `arg:"" name:"range" help:"Range (eg. Sheet1!A1:B2)"`
	FormatJSON    string `name:"format-json" help:"Cell format as JSON (Sheets API CellFormat)"`
	FormatFields  string `name:"format-fields" help:"Format field mask (eg. userEnteredFormat.textFormat.bold or textFormat.bold)"`
}

func (*SheetsFormatCmd) Run added in v0.7.0

func (c *SheetsFormatCmd) Run(ctx context.Context, flags *RootFlags) error

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"`
}

func (*SheetsGetCmd) Run added in v0.4.2

func (c *SheetsGetCmd) Run(ctx context.Context, flags *RootFlags) error

type SheetsMetadataCmd added in v0.4.2

type SheetsMetadataCmd struct {
	SpreadsheetID string `arg:"" name:"spreadsheetId" help:"Spreadsheet ID"`
}

func (*SheetsMetadataCmd) Run added in v0.4.2

func (c *SheetsMetadataCmd) Run(ctx context.Context, flags *RootFlags) error

type SheetsNotesCmd added in v0.11.0

type SheetsNotesCmd struct {
	SpreadsheetID string `arg:"" name:"spreadsheetId" help:"Spreadsheet ID"`
	Range         string `arg:"" name:"range" help:"Range (eg. Sheet1!A1:B10)"`
}

func (*SheetsNotesCmd) Run added in v0.11.0

func (c *SheetsNotesCmd) Run(ctx context.Context, flags *RootFlags) error

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"`
}

func (*SheetsUpdateCmd) Run added in v0.4.2

func (c *SheetsUpdateCmd) Run(ctx context.Context, flags *RootFlags) error

type Slide added in v0.10.0

type Slide struct {
	Title    string
	Layout   SlideLayout
	Elements []SlideElement
}

Slide represents a single slide

func ParseMarkdownToSlides added in v0.10.0

func ParseMarkdownToSlides(markdown string) []Slide

ParseMarkdownToSlides parses markdown into slide structures

type SlideElement added in v0.10.0

type SlideElement struct {
	Type     string // "title", "body", "bullets", "code"
	Content  string
	Items    []string // for bullet lists
	IsBold   bool
	IsItalic bool
}

SlideElement represents an element on a slide

type SlideLayout added in v0.10.0

type SlideLayout string

SlideLayout represents the layout type for a slide

const (
	LayoutTitleOnly          SlideLayout = "TITLE"
	LayoutTitleAndBody       SlideLayout = "TITLE_AND_BODY"
	LayoutTitleAndTwoColumns SlideLayout = "TITLE_AND_TWO_COLUMNS"
	LayoutSectionHeader      SlideLayout = "SECTION_HEADER"
	LayoutBlank              SlideLayout = "BLANK"
)

type SlidesAddSlideCmd added in v0.10.0

type SlidesAddSlideCmd struct {
	PresentationID string `arg:"" name:"presentationId" help:"Presentation ID"`
	Image          string `arg:"" name:"image" help:"Local image file (PNG/JPG)" type:"existingfile"`
	Notes          string `name:"notes" help:"Speaker notes text"`
	NotesFile      string `name:"notes-file" help:"Path to file containing speaker notes" type:"existingfile"`
	Before         string `name:"before" help:"Insert before this slide ID (appends to end if omitted)" optional:""`
}

func (*SlidesAddSlideCmd) Run added in v0.10.0

func (c *SlidesAddSlideCmd) Run(ctx context.Context, flags *RootFlags) error

type SlidesCmd added in v0.4.2

type SlidesCmd struct {
	Export             SlidesExportCmd             `cmd:"" name:"export" aliases:"download,dl" help:"Export a Google Slides deck (pdf|pptx)"`
	Info               SlidesInfoCmd               `cmd:"" name:"info" aliases:"get,show" help:"Get Google Slides presentation metadata"`
	Create             SlidesCreateCmd             `cmd:"" name:"create" aliases:"add,new" help:"Create a Google Slides presentation"`
	CreateFromMarkdown SlidesCreateFromMarkdownCmd `cmd:"" name:"create-from-markdown" help:"Create a Google Slides presentation from markdown"`
	Copy               SlidesCopyCmd               `cmd:"" name:"copy" aliases:"cp,duplicate" help:"Copy a Google Slides presentation"`
	AddSlide           SlidesAddSlideCmd           `cmd:"" name:"add-slide" help:"Add a slide with a full-bleed image and optional speaker notes"`
	ListSlides         SlidesListSlidesCmd         `cmd:"" name:"list-slides" help:"List all slides with their object IDs"`
	DeleteSlide        SlidesDeleteSlideCmd        `cmd:"" name:"delete-slide" help:"Delete a slide by object ID"`
	ReadSlide          SlidesReadSlideCmd          `cmd:"" name:"read-slide" help:"Read slide content: speaker notes, text elements, and images"`
	UpdateNotes        SlidesUpdateNotesCmd        `cmd:"" name:"update-notes" help:"Update speaker notes on an existing slide"`
	ReplaceSlide       SlidesReplaceSlideCmd       `cmd:"" name:"replace-slide" help:"Replace the image on an existing slide in-place"`
}

type SlidesCopyCmd added in v0.4.2

type SlidesCopyCmd struct {
	PresentationID string `arg:"" name:"presentationId" help:"Presentation ID"`
	Title          string `arg:"" name:"title" help:"New title"`
	Parent         string `name:"parent" help:"Destination folder ID"`
}

func (*SlidesCopyCmd) Run added in v0.4.2

func (c *SlidesCopyCmd) Run(ctx context.Context, flags *RootFlags) error

type SlidesCreateCmd added in v0.4.2

type SlidesCreateCmd struct {
	Title    string `arg:"" name:"title" help:"Presentation title"`
	Parent   string `name:"parent" help:"Destination folder ID"`
	Template string `name:"template" help:"Template presentation ID to copy from"`
}

func (*SlidesCreateCmd) Run added in v0.4.2

func (c *SlidesCreateCmd) Run(ctx context.Context, flags *RootFlags) error

type SlidesCreateFromMarkdownCmd added in v0.10.0

type SlidesCreateFromMarkdownCmd struct {
	Title       string `arg:"" name:"title" help:"Presentation title"`
	Content     string `name:"content" help:"Markdown content (inline)"`
	ContentFile string `name:"content-file" help:"Read markdown content from file"`
	Parent      string `name:"parent" help:"Destination folder ID"`
	Debug       bool   `name:"debug" help:"Show debug output"`
}

func (*SlidesCreateFromMarkdownCmd) Run added in v0.10.0

type SlidesDeleteSlideCmd added in v0.10.0

type SlidesDeleteSlideCmd struct {
	PresentationID string `arg:"" name:"presentationId" help:"Presentation ID"`
	SlideID        string `arg:"" name:"slideId" help:"Slide object ID to delete (use 'slides list-slides' to find IDs)"`
}

func (*SlidesDeleteSlideCmd) Run added in v0.10.0

func (c *SlidesDeleteSlideCmd) Run(ctx context.Context, flags *RootFlags) error

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"`
}

func (*SlidesExportCmd) Run added in v0.4.2

func (c *SlidesExportCmd) Run(ctx context.Context, flags *RootFlags) error

type SlidesInfoCmd added in v0.4.2

type SlidesInfoCmd struct {
	PresentationID string `arg:"" name:"presentationId" help:"Presentation ID"`
}

func (*SlidesInfoCmd) Run added in v0.4.2

func (c *SlidesInfoCmd) Run(ctx context.Context, flags *RootFlags) error

type SlidesListSlidesCmd added in v0.10.0

type SlidesListSlidesCmd struct {
	PresentationID string `arg:"" name:"presentationId" help:"Presentation ID"`
}

func (*SlidesListSlidesCmd) Run added in v0.10.0

func (c *SlidesListSlidesCmd) Run(ctx context.Context, flags *RootFlags) error

type SlidesReadSlideCmd added in v0.10.0

type SlidesReadSlideCmd struct {
	PresentationID string `arg:"" name:"presentationId" help:"Presentation ID"`
	SlideID        string `arg:"" name:"slideId" help:"Slide object ID (use 'slides list-slides' to find IDs)"`
}

func (*SlidesReadSlideCmd) Run added in v0.10.0

func (c *SlidesReadSlideCmd) Run(ctx context.Context, flags *RootFlags) error

type SlidesReplaceSlideCmd added in v0.10.0

type SlidesReplaceSlideCmd struct {
	PresentationID string  `arg:"" name:"presentationId" help:"Presentation ID"`
	SlideID        string  `arg:"" name:"slideId" help:"Slide object ID to replace"`
	Image          string  `arg:"" name:"image" help:"Local image file (PNG/JPG/GIF)" type:"existingfile"`
	Notes          *string `name:"notes" help:"New speaker notes text (omit to preserve existing notes; use --notes '' to clear)"`
	NotesFile      string  `name:"notes-file" help:"Path to file containing new speaker notes" type:"existingfile"`
}

func (*SlidesReplaceSlideCmd) Run added in v0.10.0

func (c *SlidesReplaceSlideCmd) Run(ctx context.Context, flags *RootFlags) error

type SlidesUpdateNotesCmd added in v0.10.0

type SlidesUpdateNotesCmd struct {
	PresentationID string  `arg:"" name:"presentationId" help:"Presentation ID"`
	SlideID        string  `arg:"" name:"slideId" help:"Slide object ID"`
	Notes          *string `name:"notes" help:"Speaker notes text (use --notes '' to clear notes)"`
	NotesFile      string  `name:"notes-file" help:"Path to file containing speaker notes" type:"existingfile"`
}

func (*SlidesUpdateNotesCmd) Run added in v0.10.0

func (c *SlidesUpdateNotesCmd) Run(ctx context.Context, flags *RootFlags) error

type TableData added in v0.10.0

type TableData struct {
	StartIndex int64
	Cells      [][]string
}

TableData represents a table to be inserted natively

func MarkdownToDocsRequests added in v0.10.0

func MarkdownToDocsRequests(elements []MarkdownElement, baseIndex int64) ([]*docs.Request, string, []TableData)

MarkdownToDocsRequests converts parsed markdown elements to Google Docs batch update requests. baseIndex is the insertion location in the document. Returns: requests, plainText, tableData (for native table insertion)

type TableInserter added in v0.10.0

type TableInserter struct {
	// contains filtered or unexported fields
}

TableInserter handles multi-step table insertion for native Google Docs tables

func NewTableInserter added in v0.10.0

func NewTableInserter(svc *docs.Service, docID string) *TableInserter

func (*TableInserter) InsertNativeTable added in v0.10.0

func (ti *TableInserter) InsertNativeTable(ctx context.Context, tableIndex int64, cells [][]string) (int64, error)

InsertNativeTable inserts a native Google Docs table and populates it with content Returns the end index of the table after insertion

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 (RFC3339 or YYYY-MM-DD; time may be ignored by Google Tasks)"`
	Parent      string `name:"parent" help:"Parent task ID (create as subtask)"`
	Previous    string `name:"previous" help:"Previous sibling task ID (controls ordering)"`
	Repeat      string `name:"repeat" help:"Repeat task: daily, weekly, monthly, yearly"`
	RepeatCount int    `name:"repeat-count" help:"Number of occurrences to create (requires --repeat)"`
	RepeatUntil string `name:"repeat-until" help:"Repeat until date/time (RFC3339 or YYYY-MM-DD; requires --repeat)"`
}

func (*TasksAddCmd) Run added in v0.4.2

func (c *TasksAddCmd) Run(ctx context.Context, flags *RootFlags) error

type TasksClearCmd added in v0.4.2

type TasksClearCmd struct {
	TasklistID string `arg:"" name:"tasklistId" help:"Task list ID"`
}

func (*TasksClearCmd) Run added in v0.4.2

func (c *TasksClearCmd) Run(ctx context.Context, flags *RootFlags) error

type TasksCmd added in v0.4.2

type TasksCmd struct {
	Lists  TasksListsCmd  `cmd:"" name:"lists" help:"List task lists"`
	List   TasksListCmd   `cmd:"" name:"list" aliases:"ls" help:"List tasks"`
	Get    TasksGetCmd    `cmd:"" name:"get" aliases:"info,show" help:"Get a task"`
	Add    TasksAddCmd    `cmd:"" name:"add" help:"Add a task" aliases:"create"`
	Update TasksUpdateCmd `cmd:"" name:"update" aliases:"edit,set" 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" aliases:"rm,del,remove" help:"Delete a task"`
	Clear  TasksClearCmd  `cmd:"" name:"clear" help:"Clear completed tasks"`
}

type TasksDeleteCmd added in v0.4.2

type TasksDeleteCmd struct {
	TasklistID string `arg:"" name:"tasklistId" help:"Task list ID"`
	TaskID     string `arg:"" name:"taskId" help:"Task ID"`
}

func (*TasksDeleteCmd) Run added in v0.4.2

func (c *TasksDeleteCmd) Run(ctx context.Context, flags *RootFlags) error

type TasksDoneCmd added in v0.4.2

type TasksDoneCmd struct {
	TasklistID string `arg:"" name:"tasklistId" help:"Task list ID"`
	TaskID     string `arg:"" name:"taskId" help:"Task ID"`
}

func (*TasksDoneCmd) Run added in v0.4.2

func (c *TasksDoneCmd) Run(ctx context.Context, flags *RootFlags) error

type TasksGetCmd added in v0.7.0

type TasksGetCmd struct {
	TasklistID string `arg:"" name:"tasklistId" help:"Task list ID"`
	TaskID     string `arg:"" name:"taskId" help:"Task ID"`
}

func (*TasksGetCmd) Run added in v0.7.0

func (c *TasksGetCmd) Run(ctx context.Context, flags *RootFlags) error

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" aliases:"cursor" help:"Page token"`
	All           bool   `name:"all" aliases:"all-pages,allpages" help:"Fetch all pages"`
	FailEmpty     bool   `name:"fail-empty" aliases:"non-empty,require-results" help:"Exit with code 3 if no results"`
	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" default:"true"`
	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)"`
}

func (*TasksListCmd) Run added in v0.4.2

func (c *TasksListCmd) Run(ctx context.Context, flags *RootFlags) error

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"`
}

func (*TasksListsCreateCmd) Run added in v0.4.2

func (c *TasksListsCreateCmd) Run(ctx context.Context, flags *RootFlags) error

type TasksListsListCmd added in v0.4.2

type TasksListsListCmd struct {
	Max       int64  `name:"max" aliases:"limit" help:"Max results (max allowed: 1000)" default:"100"`
	Page      string `name:"page" aliases:"cursor" help:"Page token"`
	All       bool   `name:"all" aliases:"all-pages,allpages" help:"Fetch all pages"`
	FailEmpty bool   `name:"fail-empty" aliases:"non-empty,require-results" help:"Exit with code 3 if no results"`
}

func (*TasksListsListCmd) Run added in v0.4.2

func (c *TasksListsListCmd) Run(ctx context.Context, flags *RootFlags) error

type TasksUndoCmd added in v0.4.2

type TasksUndoCmd struct {
	TasklistID string `arg:"" name:"tasklistId" help:"Task list ID"`
	TaskID     string `arg:"" name:"taskId" help:"Task ID"`
}

func (*TasksUndoCmd) Run added in v0.4.2

func (c *TasksUndoCmd) Run(ctx context.Context, flags *RootFlags) error

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 (RFC3339 or YYYY-MM-DD; time may be ignored; set empty to clear)"`
	Status     string `name:"status" help:"New status: needsAction|completed (set empty to clear)"`
}

func (*TasksUpdateCmd) Run added in v0.4.2

func (c *TasksUpdateCmd) Run(ctx context.Context, kctx *kong.Context, flags *RootFlags) error

type TextStyle added in v0.10.0

type TextStyle struct {
	Bold   bool
	Italic bool
	Code   bool
	Link   string
	Start  int64
	End    int64
}

TextStyle represents text formatting

func ParseInlineFormatting added in v0.10.0

func ParseInlineFormatting(text string) ([]TextStyle, string)

ParseInlineFormatting parses inline markdown formatting within text Returns styles with indices relative to the stripped plain text (UTF-16 code units)

type TimeCmd added in v0.7.0

type TimeCmd struct {
	Now TimeNowCmd `cmd:"" name:"now" help:"Show current time"`
}

type TimeNowCmd added in v0.7.0

type TimeNowCmd struct {
	Timezone string `name:"timezone" help:"Timezone (e.g., America/New_York, UTC)"`
}

func (*TimeNowCmd) Run added in v0.7.0

func (c *TimeNowCmd) Run(ctx context.Context) error

type TimeRange added in v0.5.0

type TimeRange struct {
	From     time.Time
	To       time.Time
	Location *time.Location
}

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

func (tr *TimeRange) FormatHuman() string

FormatHuman returns a human-readable description of the time range.

func (*TimeRange) FormatRFC3339 added in v0.5.0

func (tr *TimeRange) FormatRFC3339() (from, to string)

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{}

func (*VersionCmd) Run added in v0.4.2

func (c *VersionCmd) Run(ctx context.Context) error

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL