cmd

package
v0.38.2 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2026 License: MIT Imports: 123 Imported by: 0

Documentation ¶

Overview ¶

Package cmd provides CLI commands for Google Docs operations.

Package cmd provides CLI commands for Google Docs operations.

Index ¶

Constants ¶

This section is empty.

Variables ¶

This section is empty.

Functions ¶

func CreatePresentationFromMarkdownV2 ¶

func CreatePresentationFromMarkdownV2(ctx context.Context, opts CreatePresentationFromMarkdownOptions) (*slides.Presentation, error)

CreatePresentationFromMarkdownV2 is the slidey orchestrator. It:

  1. Runs the asset pipeline (uploads icons + diagrams to Drive),
  2. Creates the presentation,
  3. Reads its page size to derive LayoutGeometry,
  4. Renders the first BatchUpdate (slides + content + image refs),
  5. Re-fetches the presentation, finds notes object IDs,
  6. Renders the second BatchUpdate (speaker notes),
  7. Cleans up the temp Drive files.

func Execute ¶

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

func ExitCode ¶

func ExitCode(err error) int

func VersionString ¶

func VersionString() string

Types ¶

type APICallCmd ¶

type APICallCmd struct {
	API        string `arg:"" name:"api" help:"Discovery API name"`
	Version    string `arg:"" name:"version" help:"Discovery API version"`
	Method     string `arg:"" name:"method" help:"Discovery method ID"`
	ParamsJSON string `name:"params" help:"JSON object of path and query parameters" default:"{}"`
	BodyJSON   string `name:"body" help:"JSON request body or @file"`
	Scope      string `name:"scope" help:"OAuth scope override (default: narrowest Discovery-listed scope)"`
	AllowWrite bool   `name:"allow-write" help:"Allow non-read HTTP methods (also requires confirmation or --force)"`
}

func (*APICallCmd) Run ¶

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

type APICmd ¶

type APICmd struct {
	List     APIListCmd     `cmd:"" help:"List Google Discovery APIs"`
	Describe APIDescribeCmd `cmd:"" help:"Describe a Discovery API or method"`
	Call     APICallCmd     `cmd:"" help:"Call a Discovery-described API method"`
}

type APIDescribeCmd ¶

type APIDescribeCmd struct {
	API     string `arg:"" name:"api" help:"Discovery API name (for example gmail)"`
	Version string `arg:"" name:"version" help:"Discovery API version (for example v1)"`
	Method  string `arg:"" optional:"" name:"method" help:"Optional Discovery method ID"`
}

func (*APIDescribeCmd) Run ¶

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

type APIListCmd ¶

type APIListCmd struct {
	All bool `name:"all" help:"Include non-preferred API versions"`
}

func (*APIListCmd) Run ¶

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

type AdminCmd ¶

type AdminCmd struct {
	Users    AdminUsersCmd    `cmd:"" name:"users" help:"Manage Workspace users"`
	Groups   AdminGroupsCmd   `cmd:"" name:"groups" help:"Manage Workspace groups"`
	Orgunits AdminOrgunitsCmd `cmd:"" name:"orgunits" aliases:"org-units,ou" help:"Manage Workspace organizational units"`
}

AdminCmd provides Google Workspace admin commands using the Admin SDK Directory API. Requires domain-wide delegation with a service account.

type AdminGroupsCmd ¶

type AdminGroupsCmd struct {
	List    AdminGroupsListCmd    `cmd:"" name:"list" aliases:"ls" help:"List groups in a domain"`
	Members AdminGroupsMembersCmd `cmd:"" name:"members" help:"Manage group members"`
}

AdminGroupsCmd manages Workspace groups.

type AdminGroupsListCmd ¶

type AdminGroupsListCmd struct {
	Domain    string `name:"domain" help:"Domain to list groups from (e.g., example.com)"`
	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 (*AdminGroupsListCmd) Run ¶

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

type AdminGroupsMembersAddCmd ¶

type AdminGroupsMembersAddCmd struct {
	GroupEmail  string `arg:"" name:"groupEmail" help:"Group email"`
	MemberEmail string `arg:"" name:"memberEmail" help:"Member email to add"`
	Role        string `name:"role" help:"Member role (MEMBER, MANAGER, OWNER)" default:"MEMBER"`
}

func (*AdminGroupsMembersAddCmd) Run ¶

type AdminGroupsMembersCmd ¶

type AdminGroupsMembersCmd struct {
	List   AdminGroupsMembersListCmd   `cmd:"" name:"list" aliases:"ls" help:"List group members"`
	Add    AdminGroupsMembersAddCmd    `cmd:"" name:"add" aliases:"invite" help:"Add a member to a group"`
	Remove AdminGroupsMembersRemoveCmd `cmd:"" name:"remove" aliases:"rm,del,delete" help:"Remove a member from a group"`
}

type AdminGroupsMembersListCmd ¶

type AdminGroupsMembersListCmd struct {
	GroupEmail string `arg:"" name:"groupEmail" help:"Group email (e.g., engineering@example.com)"`
	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 (*AdminGroupsMembersListCmd) Run ¶

type AdminGroupsMembersRemoveCmd ¶

type AdminGroupsMembersRemoveCmd struct {
	GroupEmail  string `arg:"" name:"groupEmail" help:"Group email"`
	MemberEmail string `arg:"" name:"memberEmail" help:"Member email to remove"`
}

func (*AdminGroupsMembersRemoveCmd) Run ¶

type AdminOrgunitsCmd ¶

type AdminOrgunitsCmd struct {
	List   AdminOrgunitsListCmd   `cmd:"" name:"list" aliases:"ls" help:"List organizational units"`
	Get    AdminOrgunitsGetCmd    `cmd:"" name:"get" aliases:"info,show" help:"Get organizational unit details"`
	Create AdminOrgunitsCreateCmd `cmd:"" name:"create" aliases:"add,new" help:"Create an organizational unit"`
	Update AdminOrgunitsUpdateCmd `cmd:"" name:"update" aliases:"edit,set" help:"Update an organizational unit"`
	Delete AdminOrgunitsDeleteCmd `cmd:"" name:"delete" aliases:"rm,del,remove" help:"Delete an organizational unit"`
}

AdminOrgunitsCmd manages Workspace organizational units.

type AdminOrgunitsCreateCmd ¶

type AdminOrgunitsCreateCmd struct {
	Name        string `arg:"" name:"name" help:"Org unit name"`
	Parent      string `name:"parent" help:"Parent org unit path" default:"/"`
	Description string `name:"description" help:"Description"`
}

func (*AdminOrgunitsCreateCmd) Run ¶

type AdminOrgunitsDeleteCmd ¶

type AdminOrgunitsDeleteCmd struct {
	Path string `arg:"" name:"path" help:"Org unit path or ID"`
}

func (*AdminOrgunitsDeleteCmd) Run ¶

type AdminOrgunitsGetCmd ¶

type AdminOrgunitsGetCmd struct {
	Path string `arg:"" name:"path" help:"Org unit path or ID"`
}

func (*AdminOrgunitsGetCmd) Run ¶

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

type AdminOrgunitsListCmd ¶

type AdminOrgunitsListCmd struct {
	Parent string `name:"parent" help:"Parent org unit path or ID" default:"/"`
	Type   string `` /* 134-byte string literal not displayed */
}

func (*AdminOrgunitsListCmd) Run ¶

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

type AdminOrgunitsUpdateCmd ¶

type AdminOrgunitsUpdateCmd struct {
	Path        string  `arg:"" name:"path" help:"Org unit path or ID"`
	Name        *string `name:"name" help:"New org unit name"`
	Parent      *string `name:"parent" help:"New parent org unit path"`
	Description *string `name:"description" help:"Description"`
}

func (*AdminOrgunitsUpdateCmd) Run ¶

type AdminUsersCmd ¶

type AdminUsersCmd struct {
	List    AdminUsersListCmd    `cmd:"" name:"list" aliases:"ls" help:"List users in a domain"`
	Get     AdminUsersGetCmd     `cmd:"" name:"get" aliases:"info,show" help:"Get user details"`
	Create  AdminUsersCreateCmd  `cmd:"" name:"create" aliases:"add,new" help:"Create a new user"`
	Delete  AdminUsersDeleteCmd  `cmd:"" name:"delete" aliases:"rm,del,remove" help:"Delete a user account"`
	Suspend AdminUsersSuspendCmd `cmd:"" name:"suspend" help:"Suspend a user account"`
}

AdminUsersCmd manages Workspace users.

type AdminUsersCreateCmd ¶

type AdminUsersCreateCmd struct {
	Email         string `arg:"" name:"email" help:"User email (e.g., user@example.com)"`
	GivenName     string `name:"given" aliases:"first-name,given-name,fn" help:"Given (first) name"`
	FamilyName    string `name:"family" aliases:"last-name,family-name,ln" help:"Family (last) name"`
	Password      string `name:"password" aliases:"pass" help:"Initial password (generated if omitted)"`
	ChangePwd     bool   `name:"change-password" help:"Require password change on first login"`
	OrgUnit       string `name:"org-unit" aliases:"ou" help:"Organization unit path"`
	Suspended     bool   `name:"suspended" help:"Create user in suspended state"`
	Archived      bool   `name:"archived" help:"Create user in archived state"`
	RecoveryEmail string `name:"recovery-email" help:"Recovery email address"`
	RecoveryPhone string `name:"recovery-phone" help:"Recovery phone number in E.164 format"`
	HashFunction  string `name:"hash-function" help:"Password hash function when --password is pre-hashed (MD5, SHA-1, crypt)"`
	Admin         bool   `name:"admin" help:"Not supported; assign admin roles separately after user creation"`
}

func (*AdminUsersCreateCmd) Run ¶

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

type AdminUsersDeleteCmd ¶

type AdminUsersDeleteCmd struct {
	UserEmail string `arg:"" name:"userEmail" help:"User email to delete"`
}

func (*AdminUsersDeleteCmd) Run ¶

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

type AdminUsersGetCmd ¶

type AdminUsersGetCmd struct {
	UserEmail string `arg:"" name:"userEmail" help:"User email (e.g., user@example.com)"`
}

func (*AdminUsersGetCmd) Run ¶

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

type AdminUsersListCmd ¶

type AdminUsersListCmd struct {
	Domain    string `name:"domain" help:"Domain to list users from (e.g., example.com)"`
	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 (*AdminUsersListCmd) Run ¶

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

type AdminUsersSuspendCmd ¶

type AdminUsersSuspendCmd struct {
	UserEmail string `arg:"" name:"userEmail" help:"User email to suspend"`
}

func (*AdminUsersSuspendCmd) Run ¶

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

type AnalyticsAccountsCmd ¶

type AnalyticsAccountsCmd struct {
	Max       int64  `name:"max" aliases:"limit" help:"Max account summaries per page (API max 200)" 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 (*AnalyticsAccountsCmd) Run ¶

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

type AnalyticsCmd ¶

type AnalyticsCmd struct {
	Accounts AnalyticsAccountsCmd `cmd:"" name:"accounts" aliases:"list,ls" default:"withargs" help:"List GA4 account summaries"`
	Report   AnalyticsReportCmd   `cmd:"" name:"report" help:"Run a GA4 report (Analytics Data API)"`
}

type AnalyticsReportCmd ¶

type AnalyticsReportCmd struct {
	Property   string `arg:"" name:"property" help:"GA4 property ID or resource (e.g. 123456789 or properties/123456789)"`
	From       string `name:"from" help:"Start date (YYYY-MM-DD or GA relative date like 7daysAgo)" default:"7daysAgo"`
	To         string `name:"to" help:"End date (YYYY-MM-DD or GA relative date like today)" default:"today"`
	Dimensions string `name:"dimensions" help:"Comma-separated dimensions (e.g. date,country)" default:"date"`
	Metrics    string `name:"metrics" help:"Comma-separated metrics (e.g. activeUsers,sessions)" default:"activeUsers"`
	Max        int64  `name:"max" aliases:"limit" help:"Max rows to return (1-250000)" default:"100"`
	Offset     int64  `name:"offset" help:"Row offset for pagination" default:"0"`
	FailEmpty  bool   `name:"fail-empty" aliases:"non-empty,require-results" help:"Exit with code 3 if no rows"`
}

func (*AnalyticsReportCmd) Run ¶

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

type AppScriptCmd ¶

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

	Pull        AppScriptPullCmd        `cmd:"" name:"pull" help:"Pull an Apps Script project into a local directory"`
	Deployments AppScriptDeploymentsCmd `cmd:"" name:"deployments" aliases:"list-deployments" help:"List deployments"`
	Versions    AppScriptVersionsCmd    `cmd:"" name:"versions" aliases:"list-versions" help:"List versions"`
}

type AppScriptContentCmd ¶

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

func (*AppScriptContentCmd) Run ¶

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

type AppScriptCreateCmd ¶

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 ¶

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

type AppScriptDeploymentsCmd ¶ added in v0.38.0

type AppScriptDeploymentsCmd struct {
	ScriptID  string `arg:"" name:"scriptId" help:"Script 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 deployments"`
}

func (*AppScriptDeploymentsCmd) Run ¶ added in v0.38.0

type AppScriptGetCmd ¶

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

func (*AppScriptGetCmd) Run ¶

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

type AppScriptPullCmd ¶ added in v0.38.0

type AppScriptPullCmd struct {
	ScriptID  string `arg:"" name:"scriptId" help:"Script ID"`
	Dir       string `arg:"" name:"dir" help:"Local directory to write files into (created if missing)" type:"path"`
	Overwrite bool   `name:"overwrite" help:"Overwrite files that already exist in dir"`
}

func (*AppScriptPullCmd) Run ¶ added in v0.38.0

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

type AppScriptRunCmd ¶

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 ¶

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

type AppScriptVersionsCmd ¶ added in v0.38.0

type AppScriptVersionsCmd struct {
	ScriptID  string `arg:"" name:"scriptId" help:"Script 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 versions"`
}

func (*AppScriptVersionsCmd) Run ¶ added in v0.38.0

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

type AssetMap ¶

type AssetMap struct {
	Icons    map[slidesmarkdown.IconRef]ImageRef
	Diagrams map[string]ImageRef
}

AssetMap pairs parsed AST references with uploaded Drive ImageRefs. Icons is keyed by slidesmarkdown.IconRef value (Style+Name); Diagrams is keyed by slidesmarkdown.DiagramBlock.ID.

func NewAssetMap ¶

func NewAssetMap() AssetMap

NewAssetMap returns an empty initialized AssetMap.

type AssetPipeline ¶

type AssetPipeline struct {
	Config   AssetPipelineConfig
	Uploader Uploader
	// contains filtered or unexported fields
}

AssetPipeline resolves all FA icon and mermaid diagram references in a slice of Slides into ImageRefs by fetching/rendering them and uploading to Drive via the Uploader.

func (*AssetPipeline) Cleanup ¶

func (p *AssetPipeline) Cleanup(ctx context.Context) error

Cleanup deletes every Drive file the pipeline uploaded, unless Config.KeepTempImages is true.

func (*AssetPipeline) Resolve ¶

func (p *AssetPipeline) Resolve(ctx context.Context, slides []slidesmarkdown.Slide) (AssetMap, error)

Resolve walks all slides, collects unique IconRefs and DiagramBlocks, fetches/renders/uploads each, and returns the resulting AssetMap.

Per-asset failures are logged (warn-and-skip) unless Config.Strict.

type AssetPipelineConfig ¶

type AssetPipelineConfig struct {
	HTTPClient        *http.Client
	MMDCPath          string
	SVGRasterizerPath string
	Strict            bool
	KeepTempImages    bool
	DefaultFAStyle    string
}

AssetPipelineConfig holds the runtime knobs for the pipeline.

func DefaultAssetPipelineConfig ¶

func DefaultAssetPipelineConfig() AssetPipelineConfig

DefaultAssetPipelineConfig returns a config with sane defaults: 30s HTTP timeout, mmdc on PATH, non-strict, no image retention.

type AuthAddCmd ¶

type AuthAddCmd struct {
	Email        string        `arg:"" name:"email" help:"Google Account or Google Workspace email (ordinary non-Google mailboxes cannot authorize)"`
	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"`
	ListenAddr   string        `name:"listen-addr" help:"Address to listen on for OAuth callback (for example 0.0.0.0 or 0.0.0.0:8080)"`
	RedirectHost string        `name:"redirect-host" help:"Hostname for OAuth callback in browser flows; builds https://{host}/oauth2/callback"`
	RedirectURI  string        `` /* 129-byte string literal not displayed */
	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        `` /* 246-byte string literal not displayed */
	DriveScope   string        `name:"drive-scope" help:"Drive scope mode: full|readonly|file" enum:"full,readonly,file" default:"full"`
	GmailScope   string        `name:"gmail-scope" help:"Gmail scope mode: full|readonly|send|read-send" enum:"full,readonly,send,read-send" default:"full"`
	ExtraScopes  string        `name:"extra-scopes" help:"Comma-separated list of additional OAuth scope URIs to request (appended after service scopes)"`
}

func (*AuthAddCmd) Run ¶

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

type AuthAliasCmd ¶

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 ¶

type AuthAliasListCmd struct{}

func (*AuthAliasListCmd) Run ¶

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

type AuthAliasSetCmd ¶

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

func (*AuthAliasSetCmd) Run ¶

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

type AuthAliasUnsetCmd ¶

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

func (*AuthAliasUnsetCmd) Run ¶

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

type AuthCmd ¶

type AuthCmd struct {
	Setup       AuthSetupCmd          `cmd:"" name:"setup" help:"Guide Google Cloud, OAuth client, and account setup"`
	Credentials AuthCredentialsCmd    `cmd:"" name:"credentials" help:"Manage OAuth client credentials"`
	Add         AuthAddCmd            `cmd:"" name:"add" help:"Authorize a Google Account or Google Workspace account and store a refresh token"`
	Import      AuthImportCmd         `cmd:"" name:"import" help:"Import a required refresh token and optional current access token non-interactively"`
	Services    AuthServicesCmd       `cmd:"" name:"services" help:"List supported auth services and scopes"`
	List        AuthListCmd           `cmd:"" name:"list" help:"List stored accounts"`
	Doctor      AuthDoctorCmd         `cmd:"" name:"doctor" help:"Diagnose auth, keyring, and refresh-token issues"`
	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 interactive 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 ¶

type AuthCredentialsCmd struct {
	Set    AuthCredentialsSetCmd    `cmd:"" default:"withargs" help:"Store OAuth client credentials"`
	List   AuthCredentialsListCmd   `cmd:"" name:"list" help:"List stored OAuth client credentials"`
	Remove AuthCredentialsRemoveCmd `cmd:"" name:"remove" help:"Remove stored OAuth client credentials"`
}

type AuthCredentialsListCmd ¶

type AuthCredentialsListCmd struct{}

func (*AuthCredentialsListCmd) Run ¶

type AuthCredentialsRemoveCmd ¶

type AuthCredentialsRemoveCmd struct {
	Client string `arg:"" optional:"" name:"client" help:"Client name to remove (omit for default, or 'all' to remove every client)"`
}

func (*AuthCredentialsRemoveCmd) Run ¶

type AuthCredentialsSetCmd ¶

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)"`
	ExpandEnv bool   `name:"expand-env" help:"Expand environment placeholders in client_id/client_secret values"`
	Insecure  bool   `name:"insecure" help:"Store OAuth client_secret in credentials.json instead of the keyring"`
}

func (*AuthCredentialsSetCmd) Run ¶

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

type AuthDoctorCmd ¶

type AuthDoctorCmd struct {
	Check   bool          `name:"check" help:"Verify refresh tokens by exchanging for access tokens"`
	Timeout time.Duration `name:"timeout" help:"Per-token check timeout" default:"15s"`
}

func (*AuthDoctorCmd) Run ¶

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

type AuthImportCmd ¶

type AuthImportCmd struct {
	Email                string `name:"email" required:"" help:"Account email"`
	RefreshTokenStdin    bool   `name:"refresh-token-stdin" help:"Read OAuth refresh token from stdin"`
	RefreshTokenFile     string `name:"refresh-token-file" type:"path" help:"Read OAuth refresh token from file"`
	RefreshTokenEnv      string `name:"refresh-token-env" help:"Read OAuth refresh token from the named environment variable"`
	AccessTokenStdin     bool   `name:"access-token-stdin" help:"Also read a current OAuth access token from stdin (requires a refresh-token source)"`
	AccessTokenFile      string `` /* 126-byte string literal not displayed */
	AccessTokenEnv       string `` /* 139-byte string literal not displayed */
	AccessTokenExpiresAt string `name:"access-token-expires-at" help:"Expiry for the optional access token (RFC3339; default: now+1h when provided)"`
	ServicesCSV          string `name:"services" help:"Comma-separated services to record on the token (informational; does not affect scopes)"`
}

func (*AuthImportCmd) Run ¶

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

type AuthKeepCmd ¶

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 ¶

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

type AuthKeyringCmd ¶

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 ¶

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

type AuthListCmd ¶

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 ¶

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

type AuthManageCmd ¶

type AuthManageCmd struct {
	ForceConsent bool          `name:"force-consent" help:"Force consent screen when adding accounts"`
	ServicesCSV  string        `` /* 246-byte string literal not displayed */
	Timeout      time.Duration `name:"timeout" help:"Server timeout duration" default:"10m"`
	ListenAddr   string        `name:"listen-addr" help:"Loopback address to listen on for the accounts manager (for example 127.0.0.1:8080 or [::1]:8080)"`
	RedirectHost string        `name:"redirect-host" help:"Hostname for OAuth callback; builds https://{host}/oauth2/callback"`
}

func (*AuthManageCmd) Run ¶

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

type AuthRemoveCmd ¶

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

func (*AuthRemoveCmd) Run ¶

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

type AuthServiceAccountCmd ¶

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 ¶

type AuthServiceAccountSetCmd struct {
	Email    string `arg:"" name:"email" help:"Email to impersonate (Workspace user email)" required:""`
	Key      string `name:"key" help:"Path to service account JSON key file, or '-' for stdin"`
	KeyStdin bool   `name:"key-stdin" help:"Read service account JSON key from stdin"`
	KeyEnv   string `name:"key-env" help:"Read service account JSON key from the named environment variable"`
}

func (*AuthServiceAccountSetCmd) Run ¶

type AuthServiceAccountStatusCmd ¶

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

func (*AuthServiceAccountStatusCmd) Run ¶

type AuthServiceAccountUnsetCmd ¶

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

func (*AuthServiceAccountUnsetCmd) Run ¶

type AuthServicesCmd ¶

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

func (*AuthServicesCmd) Run ¶

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

type AuthSetupCmd ¶

type AuthSetupCmd struct {
	Email         string `arg:"" optional:"" name:"email" help:"Google account to authorize after setup"`
	Project       string `name:"gcloud-project" aliases:"project-id" help:"Google Cloud project ID (default: active gcloud project)"`
	ProjectName   string `name:"project-name" help:"Display name when creating a project" default:"gog CLI"`
	ServicesCSV   string `` /* 130-byte string literal not displayed */
	Credentials   string `name:"credentials" type:"path" help:"Downloaded Desktop OAuth client JSON to store"`
	CreateProject bool   `name:"create-project" help:"Create --gcloud-project with gcloud (requires confirmation)"`
	EnableAPIs    bool   `name:"enable-apis" help:"Enable selected Google APIs with gcloud"`
	Login         bool   `name:"login" help:"Run browser OAuth after project/client setup"`
	ForceConsent  bool   `name:"force-consent" help:"Force OAuth consent when --login runs"`
	OpenConsole   bool   `name:"open-console" help:"Open the OAuth client page for the selected project"`
}

func (*AuthSetupCmd) Run ¶

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

type AuthStatusCmd ¶

type AuthStatusCmd struct{}

func (*AuthStatusCmd) Run ¶

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

type AuthTokensCmd ¶

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 ¶

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

func (*AuthTokensDeleteCmd) Run ¶

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

type AuthTokensExportCmd ¶

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 ¶

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

type AuthTokensImportCmd ¶

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

func (*AuthTokensImportCmd) Run ¶

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

type AuthTokensListCmd ¶

type AuthTokensListCmd struct{}

func (*AuthTokensListCmd) Run ¶

type BackupCatCmd ¶

type BackupCatCmd struct {
	Shard  string `arg:"" name:"shard" help:"Manifest shard path, or absolute path under the backup repo"`
	Pretty bool   `name:"pretty" help:"Pretty-print each JSONL row"`
	Out    string `name:"out" help:"Write decrypted JSONL to this file instead of stdout"`
	// contains filtered or unexported fields
}

func (*BackupCatCmd) Run ¶

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

type BackupCmd ¶

type BackupCmd struct {
	Init   BackupInitCmd   `cmd:"" name:"init" help:"Initialize encrypted backup config and repository"`
	Push   BackupPushCmd   `cmd:"" name:"push" help:"Export services into encrypted backup shards"`
	Status BackupStatusCmd `cmd:"" name:"status" help:"Inspect backup manifest without decrypting shards"`
	Verify BackupVerifyCmd `cmd:"" name:"verify" help:"Decrypt and verify all backup shards"`
	Cat    BackupCatCmd    `cmd:"" name:"cat" help:"Decrypt one backup shard to stdout"`
	Export BackupExportCmd `cmd:"" name:"export" help:"Write a local plaintext export"`
	Gmail  BackupGmailCmd  `cmd:"" name:"gmail" help:"Gmail backup operations"`
}

type BackupExportCmd ¶

type BackupExportCmd struct {
	Out              string `name:"out" help:"Plaintext export directory" default:"~/Documents/gog-backup-export"`
	GmailFormat      string `name:"gmail-format" help:"Gmail message export format: eml, markdown, or both" default:"eml" enum:"eml,markdown,both"`
	GmailAttachments string `` /* 133-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*BackupExportCmd) Run ¶

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

type BackupGmailCmd ¶

type BackupGmailCmd struct {
	Push BackupGmailPushCmd `cmd:"" name:"push" help:"Export Gmail into encrypted backup shards"`
}

type BackupGmailPushCmd ¶

type BackupGmailPushCmd struct {
	Query            string        `name:"query" help:"Gmail query for bounded/test backups"`
	Max              int64         `name:"max" aliases:"limit" help:"Max Gmail messages to export; 0 means all" default:"0"`
	IncludeSpamTrash bool          `name:"include-spam-trash" help:"Include spam and trash" default:"true"`
	ShardMaxRows     int           `name:"shard-max-rows" help:"Max messages per encrypted shard" default:"1000"`
	CacheMessages    bool          `` /* 127-byte string literal not displayed */
	RefreshCache     bool          `name:"gmail-refresh-cache" help:"Refetch messages even when a local backup cache entry exists"`
	Checkpoints      bool          `` /* 129-byte string literal not displayed */
	CheckpointRows   int           `` /* 129-byte string literal not displayed */
	CheckpointEvery  time.Duration `` /* 134-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*BackupGmailPushCmd) Run ¶

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

type BackupInitCmd ¶

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

func (*BackupInitCmd) Run ¶

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

type BackupPushCmd ¶

type BackupPushCmd struct {
	Services             string        `name:"services" help:"Comma-separated services to back up" default:"gmail"`
	Query                string        `name:"query" help:"Gmail query for bounded/test backups"`
	Max                  int64         `name:"max" aliases:"limit" help:"Max Gmail messages to export; 0 means all" default:"0"`
	IncludeSpamTrash     bool          `name:"include-spam-trash" help:"Include Gmail spam and trash" default:"true"`
	ShardMaxRows         int           `name:"shard-max-rows" help:"Max rows per encrypted shard" default:"1000"`
	DriveContents        bool          `name:"drive-contents" help:"Download/export Drive file contents into encrypted shards" default:"true" negatable:""`
	DriveBinaryContents  bool          `name:"drive-binary-contents" help:"Include non-Google Drive binary file bytes in encrypted shards"`
	DriveContentMaxBytes int64         `` /* 134-byte string literal not displayed */
	DriveCollaboration   bool          `name:"drive-collaboration" help:"Back up Drive permissions, comments, and revision metadata" default:"true" negatable:""`
	DriveContentTimeout  time.Duration `name:"drive-content-timeout" help:"Per-file Drive content export/download timeout" default:"2m"`
	WorkspaceNative      bool          `name:"workspace-native" help:"Fetch full native Docs/Sheets/Slides API JSON in addition to Drive exports"`
	WorkspaceMaxFiles    int           `` /* 126-byte string literal not displayed */
	GmailCache           bool          `` /* 133-byte string literal not displayed */
	GmailRefreshCache    bool          `name:"gmail-refresh-cache" help:"Refetch Gmail messages even when a local backup cache entry exists"`
	GmailCheckpoints     bool          `` /* 141-byte string literal not displayed */
	GmailCheckpointRows  int           `` /* 135-byte string literal not displayed */
	GmailCheckpointEvery time.Duration `` /* 146-byte string literal not displayed */
	BestEffort           bool          `name:"best-effort" help:"Record optional service errors as backup rows and continue" default:"true" negatable:""`
	// contains filtered or unexported fields
}

func (*BackupPushCmd) Run ¶

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

type BackupStatusCmd ¶

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

func (*BackupStatusCmd) Run ¶

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

type BackupVerifyCmd ¶

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

func (*BackupVerifyCmd) Run ¶

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

type BatchAbortCmd ¶

type BatchAbortCmd struct {
	BatchID string `arg:"" name:"batchId" help:"Batch ID"`
}

func (*BatchAbortCmd) Run ¶

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

type BatchBeginCmd ¶

type BatchBeginCmd struct {
	Service string `name:"service" help:"Google API service" enum:"docs" default:"docs"`
	DocID   string `name:"doc" required:"" help:"Google Doc ID"`
	Name    string `name:"name" help:"Optional batch label"`
}

func (*BatchBeginCmd) Run ¶

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

type BatchCmd ¶

type BatchCmd struct {
	Begin BatchBeginCmd `cmd:"" help:"Begin a persisted request batch"`
	List  BatchListCmd  `cmd:"" aliases:"ls" help:"List persisted request batches"`
	Show  BatchShowCmd  `cmd:"" help:"Show a persisted request batch"`
	End   BatchEndCmd   `cmd:"" aliases:"submit" help:"Submit and remove a request batch"`
	Abort BatchAbortCmd `cmd:"" aliases:"rm,delete" help:"Delete a request batch without submitting"`
	Prune BatchPruneCmd `cmd:"" help:"Delete stale request batches"`
}

type BatchEndCmd ¶

type BatchEndCmd struct {
	BatchID         string `arg:"" name:"batchId" help:"Batch ID"`
	ContinueOnError bool   `name:"continue-on-error" help:"After an atomic validation failure, submit requests individually and retain failures"`
	AutoSplit       bool   `name:"auto-split" help:"Submit batches over 500 requests as ordered chunks (non-atomic)"`
}

func (*BatchEndCmd) Run ¶

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

type BatchListCmd ¶

type BatchListCmd struct{}

func (*BatchListCmd) Run ¶

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

type BatchPruneCmd ¶

type BatchPruneCmd struct {
	OlderThan time.Duration `name:"older-than" help:"Delete batches not updated within this duration" default:"72h"`
}

func (*BatchPruneCmd) Run ¶

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

type BatchShowCmd ¶

type BatchShowCmd struct {
	BatchID string `arg:"" name:"batchId" help:"Batch ID"`
}

func (*BatchShowCmd) Run ¶

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

type BoxRect ¶

type BoxRect struct {
	LeftPT, TopPT, WidthPT, HeightPT float64
}

BoxRect is a positioned rectangle in points.

func ColumnBoxes ¶

func ColumnBoxes(g LayoutGeometry, n int) []BoxRect

ColumnBoxes returns N side-by-side body box rectangles using the page geometry. Heights are clamped to (pageHeight - bodyTop - margin).

func SingleBodyBox ¶

func SingleBodyBox(g LayoutGeometry) BoxRect

SingleBodyBox returns one full-width body box at the body-top.

func TitleBox ¶

func TitleBox(g LayoutGeometry) BoxRect

TitleBox returns the title-bar box at the top of the slide.

type CLI ¶

type CLI struct {
	RootFlags `embed:""`

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

	// Action-first desire paths.
	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"`
	Backup        BackupCmd             `cmd:"" help:"Encrypted Google account backups"`
	Batch         BatchCmd              `cmd:"" help:"Build and submit persisted Google Docs request batches"`
	Groups        GroupsCmd             `cmd:"" aliases:"group" help:"Cloud Identity Groups (Workspace only)"`
	Admin         AdminCmd              `cmd:"" help:"Google Workspace Admin (Directory API) - requires domain-wide delegation"`
	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"`
	Maps          MapsCmd               `cmd:"" aliases:"map" help:"Google Maps"`
	Classroom     ClassroomCmd          `cmd:"" aliases:"class" help:"Google Classroom"`
	Time          TimeCmd               `cmd:"" help:"Local time utilities"`
	Update        UpdateCmd             `cmd:"" help:"Check gogcli release status"`
	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"`
	Sites         SitesCmd              `cmd:"" aliases:"site" help:"Google Sites (Drive-backed)"`
	Meet          MeetCmd               `cmd:"" aliases:"meeting" help:"Google Meet"`
	Zoom          ZoomCmd               `cmd:"" help:"Zoom"`
	AppScript     AppScriptCmd          `cmd:"" name:"appscript" aliases:"script,apps-script" help:"Google Apps Script"`
	Analytics     AnalyticsCmd          `cmd:"" aliases:"ga" help:"Google Analytics"`
	SearchConsole SearchConsoleCmd      `cmd:"" name:"searchconsole" aliases:"gsc,search-console,webmasters" help:"Google Search Console"`
	YouTube       YouTubeCmd            `cmd:"" name:"youtube" aliases:"yt" help:"YouTube Data API (search, activities, videos, playlists, comments, channels)"`
	Photos        PhotosCmd             `cmd:"" name:"photos" aliases:"photo" help:"Google Photos Library and Picker APIs"`
	API           APICmd                `cmd:"" name:"api" help:"Google Discovery APIs and generic method calls"`
	Config        ConfigCmd             `cmd:"" help:"Manage configuration"`
	Schema        SchemaCmd             `cmd:"" help:"Machine-readable command/flag schema" aliases:"help-json,helpjson"`
	Mcp           McpCmd                `cmd:"" name:"mcp" help:"Run a typed, allowlisted MCP server over stdio"`
	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 ¶

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 ¶

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

type CalendarAliasCmd ¶

type CalendarAliasCmd struct {
	List  CalendarAliasListCmd  `cmd:"" name:"list" help:"List calendar aliases"`
	Set   CalendarAliasSetCmd   `cmd:"" name:"set" help:"Set a calendar alias"`
	Unset CalendarAliasUnsetCmd `cmd:"" name:"unset" help:"Remove a calendar alias"`
}

type CalendarAliasListCmd ¶

type CalendarAliasListCmd struct{}

func (*CalendarAliasListCmd) Run ¶

type CalendarAliasSetCmd ¶

type CalendarAliasSetCmd struct {
	Alias      string `arg:"" name:"alias" help:"Alias name (no spaces)"`
	CalendarID string `arg:"" name:"calendarId" help:"Calendar ID (e.g., abc123@group.calendar.google.com)"`
}

func (*CalendarAliasSetCmd) Run ¶

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

type CalendarAliasUnsetCmd ¶

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

func (*CalendarAliasUnsetCmd) Run ¶

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

type CalendarCalendarsCmd ¶

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 ¶

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

type CalendarChangedCmd ¶

type CalendarChangedCmd struct {
	CalendarID string   `arg:"" name:"calendarId" optional:"" help:"Calendar ID (default: primary)"`
	Cal        []string `name:"cal" help:"Calendar ID or name (can be repeated)"`
	Calendars  string   `name:"calendars" help:"Comma-separated calendar IDs, names, or indices from 'calendar calendars'"`
	Since      string   `` /* 127-byte string literal not displayed */
	Max        int64    `name:"max" aliases:"limit" help:"Max results" default:"10"`
	All        bool     `name:"all" help:"Fetch from all calendars"`
	FailEmpty  bool     `name:"fail-empty" aliases:"non-empty,require-results" help:"Exit with code 3 if no results"`
	Weekday    bool     `name:"weekday" help:"Include start/end day-of-week columns"`
	Location   bool     `name:"location" help:"Include event LOCATION column in table output"`
}

func (*CalendarChangedCmd) Run ¶

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

type CalendarCmd ¶

type CalendarCmd struct {
	Calendars       CalendarCalendarsCmd       `cmd:"" name:"calendars" help:"List calendars"`
	Subscribe       CalendarSubscribeCmd       `cmd:"" name:"subscribe" aliases:"sub,add-calendar" help:"Add a calendar to your calendar list"`
	Unsubscribe     CalendarUnsubscribeCmd     `cmd:"" name:"unsubscribe" aliases:"unsub" help:"Remove a calendar from your calendar list"`
	CreateCalendar  CalendarCreateCalendarCmd  `cmd:"" name:"create-calendar" aliases:"new-calendar" help:"Create a new secondary calendar"`
	DeleteCalendar  CalendarDeleteCalendarCmd  `cmd:"" name:"delete-calendar" help:"Delete an owned secondary calendar"`
	ACL             CalendarAclCmd             `cmd:"" name:"acl" aliases:"permissions,perms" help:"List calendar ACL"`
	Alias           CalendarAliasCmd           `cmd:"" name:"alias" help:"Manage calendar aliases"`
	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"`
	Raw             CalendarRawCmd             `` /* 128-byte string literal not displayed */
	Create          CalendarCreateCmd          `cmd:"" name:"create" aliases:"add,new" help:"Create an event"`
	Update          CalendarUpdateCmd          `cmd:"" name:"update" aliases:"edit,set" help:"Update an event"`
	Move            CalendarMoveCmd            `cmd:"" name:"move" aliases:"transfer" help:"Move an event to another calendar"`
	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 busy-time overlaps across calendars"`
	Changed         CalendarChangedCmd         `cmd:"" name:"changed" help:"List most recently changed events (including deletions)"`
	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 Workspace group members (service account, direct token, or ADC)"`
	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 ¶

type CalendarColorsCmd struct{}

func (*CalendarColorsCmd) Run ¶

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

type CalendarConflictsCmd ¶

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:"Window length in days, measured from --from when given, otherwise from today (timezone-aware)" default:"0"`
	WeekStart string   `name:"week-start" help:"Week start day for --week (sun, mon, ...)" default:""`
	Cal       []string `name:"cal" help:"Calendar ID, name, or index (can be repeated)"`
	Calendars string   `name:"calendars" help:"Comma-separated calendar IDs, names, or indices from 'calendar calendars'"`
	All       bool     `name:"all" help:"Query all calendars"`
}

func (*CalendarConflictsCmd) Run ¶

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

type CalendarCreateCalendarCmd ¶

type CalendarCreateCalendarCmd struct {
	Summary     string `arg:"" name:"summary" help:"Calendar display name"`
	Description string `name:"description" help:"Calendar description"`
	TimeZone    string `name:"timezone" aliases:"tz" help:"IANA timezone (e.g., America/New_York)"`
	Location    string `name:"location" help:"Calendar location"`
}

func (*CalendarCreateCalendarCmd) Run ¶

type CalendarCreateCmd ¶

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)"`
	StartTimezone         string   `name:"start-timezone" aliases:"from-timezone" help:"IANA timezone metadata for --from (e.g., Europe/Rome)"`
	EndTimezone           string   `name:"end-timezone" aliases:"to-timezone" help:"IANA timezone metadata for --to (e.g., America/New_York)"`
	Timezone              string   `` /* 175-byte string literal not displayed */
	Description           string   `name:"description" help:"Description"`
	Location              string   `name:"location" help:"Location"`
	LocationSearch        string   `name:"location-search" help:"Resolve a Google Places text search and use the best match as event location"`
	PlaceID               string   `name:"place-id" help:"Resolve a Google Places ID and use it as event location"`
	PlaceLanguage         string   `name:"place-language" help:"Places API language code for location lookup"`
	PlaceRegion           string   `name:"place-region" help:"Places API region code for location lookup"`
	Attendees             string   `name:"attendees" help:"Comma-separated attendee emails; modifiers: ;optional, ;resource, ;comment=TEXT"`
	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." sep:"none"`
	Reminders             []string `` /* 128-byte string literal not displayed */
	NoReminders           bool     `name:"no-reminders" xor:"reminders" help:"Disable all event reminders"`
	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"`
	WithZoom              bool     `name:"with-zoom" help:"Create a Zoom video conference for this event"`
	IncludePasswords      bool     `name:"include-passwords" help:"Do not redact Zoom meeting passwords in output" env:"GOG_ZOOM_INCLUDE_PASSWORDS"`
	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"`
	// contains filtered or unexported fields
}

func (*CalendarCreateCmd) Run ¶

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

type CalendarDeleteCalendarCmd ¶

type CalendarDeleteCalendarCmd struct {
	CalendarID string `arg:"" name:"calendarId" help:"Owned secondary calendar ID or alias"`
}

func (*CalendarDeleteCalendarCmd) Run ¶

type CalendarDeleteCmd ¶

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 ¶

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

type CalendarEventCmd ¶

type CalendarEventCmd struct {
	CalendarID string `arg:"" name:"calendarId" help:"Calendar ID"`
	EventID    string `arg:"" name:"eventId" help:"Event ID"`
	Timezone   string `` /* 200-byte string literal not displayed */
}

func (*CalendarEventCmd) Run ¶

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

type CalendarEventsCmd ¶

type CalendarEventsCmd struct {
	CalendarID        []string `` /* 139-byte string literal not displayed */
	Cal               []string `name:"cal" help:"Calendar ID or name (can be repeated)"`
	Calendars         string   `name:"calendars" help:"Comma-separated calendar IDs, names, or indices from 'calendar calendars'"`
	From              string   `name:"from" help:"Start time (RFC3339 with timezone, date, or relative: now, today, tomorrow, monday)"`
	To                string   `name:"to" help:"End time (RFC3339 with timezone, date, or relative: now, today, tomorrow, monday)"`
	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:"Window length in days, measured from --from when given, otherwise from today (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"`
	EventTypes        []string `` /* 155-byte string literal not displayed */
	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}"`
	Location          bool     `name:"location" help:"Include event LOCATION column in table output"`
	Sort              string   `` /* 191-byte string literal not displayed */
	Order             string   `name:"order" help:"Sort order" enum:"asc,desc" default:"asc"`
	Timezone          string   `` /* 201-byte string literal not displayed */
}

func (*CalendarEventsCmd) Run ¶

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

type CalendarFocusTimeCmd ¶

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

func (*CalendarFocusTimeCmd) Run ¶

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

type CalendarFreeBusyCmd ¶

type CalendarFreeBusyCmd struct {
	CalendarIDs string   `arg:"" optional:"" name:"calendarIds" help:"Comma-separated calendar IDs, names, or indices from 'calendar calendars'"`
	Cal         []string `name:"cal" help:"Calendar ID, name, or index (can be repeated)"`
	All         bool     `name:"all" help:"Query all calendars"`
	From        string   `name:"from" help:"Start time (RFC3339 with timezone, date, or relative: now, today, tomorrow, monday)"`
	To          string   `name:"to" help:"End time (RFC3339 with timezone, date, or relative: now, today, tomorrow, monday)"`
}

func (*CalendarFreeBusyCmd) Run ¶

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

type CalendarMoveCmd ¶

type CalendarMoveCmd struct {
	CalendarID            string `arg:"" name:"calendarId" help:"Source calendar ID"`
	EventID               string `arg:"" name:"eventId" help:"Event ID"`
	DestinationCalendarID string `arg:"" name:"destinationCalendarId" help:"Destination calendar ID that becomes the event organizer"`
	SendUpdates           string `name:"send-updates" help:"Notification mode: all, externalOnly, none (default: none)"`
}

func (*CalendarMoveCmd) Run ¶

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

type CalendarOOOCmd ¶

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 datetime (RFC3339; date-only is not supported by Google Calendar API)"`
	To             string `name:"to" required:"" help:"End datetime (RFC3339; date-only is not supported by Google Calendar API)"`
	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:"Unsupported for out-of-office events; Google Calendar API rejects all-day OOO"`
}

func (*CalendarOOOCmd) Run ¶

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

type CalendarProposeTimeCmd ¶

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)"`
	// contains filtered or unexported fields
}

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 ¶

type CalendarRawCmd ¶

type CalendarRawCmd struct {
	CalendarID string `arg:"" name:"calendarId" help:"Calendar ID (e.g. 'primary', an email, or a calendar ID)"`
	EventID    string `arg:"" name:"eventId" help:"Event ID"`
	Pretty     bool   `name:"pretty" help:"Pretty-print JSON (default: compact single-line)"`
}

CalendarRawCmd dumps the full Events.Get response as JSON, using the existing calendar-resolution helper so short names, "primary", and email aliases all work the same as they do for `calendar event`.

REST reference: https://developers.google.com/calendar/api/v3/reference/events/get Go type: https://pkg.go.dev/google.golang.org/api/calendar/v3#Event

func (*CalendarRawCmd) Run ¶

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

type CalendarRespondCmd ¶

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 ¶

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

type CalendarSearchCmd ¶

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 ¶

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

type CalendarSubscribeCmd ¶

type CalendarSubscribeCmd struct {
	CalendarID string `arg:"" name:"calendarId" help:"Calendar ID to subscribe to (e.g., user@example.com or calendar ID)"`
	ColorID    string `name:"color-id" help:"Color ID (1-24, see 'calendar colors')"`
	Hidden     bool   `name:"hidden" help:"Hide from the calendar list UI"`
	Selected   bool   `name:"selected" help:"Show events in the calendar UI" default:"true" negatable:""`
}

func (*CalendarSubscribeCmd) Run ¶

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

type CalendarTeamCmd ¶

type CalendarTeamCmd struct {
	GroupEmail string `arg:"" help:"Google Group email (e.g., engineering@company.com)"`
	FreeBusy   bool   `name:"freebusy" help:"Show only busy/free blocks (faster, single API call)"`
	Query      string `name:"query" short:"q" help:"Filter events by title (case-insensitive)"`
	Max        int64  `name:"max" 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 ¶

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

type CalendarTimeCmd ¶

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 ¶

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

type CalendarUnsubscribeCmd ¶

type CalendarUnsubscribeCmd struct {
	CalendarID string `arg:"" name:"calendarId" help:"Calendar ID or alias to remove from your calendar list"`
}

func (*CalendarUnsubscribeCmd) Run ¶

type CalendarUpdateCmd ¶

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)"`
	StartTimezone         string   `name:"start-timezone" aliases:"from-timezone" help:"IANA timezone metadata for --from (e.g., Europe/Rome)"`
	EndTimezone           string   `name:"end-timezone" aliases:"to-timezone" help:"IANA timezone metadata for --to (e.g., America/New_York)"`
	Description           string   `name:"description" help:"New description (set empty to clear)"`
	Location              string   `name:"location" help:"New location (set empty to clear)"`
	LocationSearch        string   `name:"location-search" help:"Resolve a Google Places text search and use the best match as event location"`
	PlaceID               string   `name:"place-id" help:"Resolve a Google Places ID and use it as event location"`
	PlaceLanguage         string   `name:"place-language" help:"Places API language code for location lookup"`
	PlaceRegion           string   `name:"place-region" help:"Places API region code for location lookup"`
	Attendees             string   `` /* 138-byte string literal not displayed */
	AddAttendee           string   `` /* 144-byte string literal not displayed */
	Attachments           []string `name:"attachment" help:"File attachment URL (can be repeated; replaces all; set empty to clear)"`
	AllDay                bool     `name:"all-day" help:"All-day event (use date-only in --from/--to)"`
	Recurrence            []string `` /* 128-byte string literal not displayed */
	Reminders             []string `` /* 168-byte string literal not displayed */
	NoReminders           bool     `name:"no-reminders" xor:"reminders" help:"Disable all event reminders"`
	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"`
	WithMeet              bool     `name:"with-meet" help:"Create a Google Meet video conference for this event"`
	RegenerateMeet        bool     `name:"regenerate-meet" help:"Replace the event's Google Meet video conference"`
	WithZoom              bool     `name:"with-zoom" help:"Create a Zoom video conference for this event"`
	RegenerateZoom        bool     `name:"regenerate-zoom" help:"Replace the event's Zoom video conference"`
	RemoveZoom            bool     `name:"remove-zoom" help:"Remove the event's Zoom video conference"`
	IncludePasswords      bool     `name:"include-passwords" help:"Do not redact Zoom meeting passwords in output" env:"GOG_ZOOM_INCLUDE_PASSWORDS"`
	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)"`
	// contains filtered or unexported fields
}

func (*CalendarUpdateCmd) Run ¶

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

type CalendarUsersCmd ¶

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 ¶

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

type CalendarWorkingLocationCmd ¶

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 ¶

type ChatCmd ¶

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 ¶

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 ¶

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 ¶

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

type ChatDMSpaceCmd ¶

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

func (*ChatDMSpaceCmd) Run ¶

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

type ChatMessagesCmd ¶

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"`
	React     ChatMessagesReactCmd     `cmd:"" name:"react" help:"Add an emoji reaction to a message"`
	Reactions ChatMessagesReactionsCmd `cmd:"" name:"reactions" aliases:"reaction" help:"Manage emoji reactions on a message"`
}

type ChatMessagesListCmd ¶

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 ¶

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

type ChatMessagesReactCmd ¶

type ChatMessagesReactCmd struct {
	Message string `arg:"" name:"message" help:"Message resource (spaces/.../messages/...) or bare message ID"`
	Emoji   string `arg:"" name:"emoji" help:"Emoji unicode character (e.g. 👍)"`
	Space   string `name:"space" help:"Space name (required when message is a bare ID)"`
}

func (*ChatMessagesReactCmd) Run ¶

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

type ChatMessagesReactionsCmd ¶

type ChatMessagesReactionsCmd struct {
	Create ChatMessagesReactionsCreateCmd `cmd:"" name:"create" aliases:"add" help:"Add an emoji reaction to a message"`
	List   ChatMessagesReactionsListCmd   `cmd:"" name:"list" aliases:"ls" help:"List reactions on a message"`
	Delete ChatMessagesReactionsDeleteCmd `cmd:"" name:"delete" aliases:"remove,rm" help:"Delete a reaction"`
}

type ChatMessagesReactionsCreateCmd ¶

type ChatMessagesReactionsCreateCmd struct {
	Message string `arg:"" name:"message" help:"Message resource (spaces/.../messages/...) or bare message ID"`
	Emoji   string `arg:"" name:"emoji" help:"Emoji unicode character (e.g. 📦)"`
	Space   string `name:"space" help:"Space name (required when message is a bare ID)"`
}

func (*ChatMessagesReactionsCreateCmd) Run ¶

type ChatMessagesReactionsDeleteCmd ¶

type ChatMessagesReactionsDeleteCmd struct {
	Reaction string `arg:"" name:"reaction" help:"Reaction resource (spaces/.../messages/.../reactions/...)"`
}

func (*ChatMessagesReactionsDeleteCmd) Run ¶

type ChatMessagesReactionsListCmd ¶

type ChatMessagesReactionsListCmd struct {
	Message string `arg:"" name:"message" help:"Message resource (spaces/.../messages/...) or bare message ID"`
	Space   string `name:"space" help:"Space name (required when message is a bare ID)"`
	Max     int64  `name:"max" aliases:"limit" help:"Max results" default:"50"`
	Page    string `name:"page" aliases:"cursor" help:"Page token"`
	All     bool   `name:"all" help:"Fetch all pages"`
}

func (*ChatMessagesReactionsListCmd) Run ¶

type ChatMessagesSendCmd ¶

type ChatMessagesSendCmd struct {
	Space  string   `arg:"" name:"space" help:"Space name (spaces/...)"`
	Text   string   `name:"text" help:"Message text (required unless --attach is provided)"`
	Thread string   `name:"thread" help:"Reply to thread (spaces/.../threads/...)"`
	Attach []string `name:"attach" help:"Attachment file path, e.g. an image (repeatable)"`
}

func (*ChatMessagesSendCmd) Run ¶

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

type ChatSpacesCmd ¶

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 ¶

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 ¶

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

type ChatSpacesFindCmd ¶

type ChatSpacesFindCmd struct {
	DisplayName string `arg:"" name:"displayName" help:"Space display name (substring match, case-insensitive)"`
	Max         int64  `name:"max" aliases:"limit" help:"Max results per page" default:"100"`
	Exact       bool   `name:"exact" help:"Require an exact, case-insensitive match on displayName instead of substring match"`
}

func (*ChatSpacesFindCmd) Run ¶

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

type ChatSpacesListCmd ¶

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 ¶

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

type ChatThreadsCmd ¶

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

type ChatThreadsListCmd ¶

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 ¶

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

type ChipSpec ¶

type ChipSpec struct {
	Type    ChipType
	Value   string   // email for person, date string for date, etc.
	Options []string // dropdown options
}

ChipSpec holds parsed smart chip specification.

type ChipType ¶

type ChipType int

ChipType represents the type of smart chip to insert.

const (
	ChipTypeUnknown ChipType = iota
	ChipTypePerson
	ChipTypeDate
	ChipTypeFile
	ChipTypePlace
	ChipTypeDropdown
	ChipTypeChart
	ChipTypeBookmark
)

type ClassroomAnnouncementsAssigneesCmd ¶

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 ¶

type ClassroomAnnouncementsCmd ¶

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 ¶

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 ¶

type ClassroomAnnouncementsDeleteCmd ¶

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

func (*ClassroomAnnouncementsDeleteCmd) Run ¶

type ClassroomAnnouncementsGetCmd ¶

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

func (*ClassroomAnnouncementsGetCmd) Run ¶

type ClassroomAnnouncementsListCmd ¶

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 ¶

type ClassroomAnnouncementsUpdateCmd ¶

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 ¶

type ClassroomCmd ¶

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 ¶

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

func (*ClassroomCoursesArchiveCmd) Run ¶

type ClassroomCoursesCmd ¶

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 an archived course"`
	Archive   ClassroomCoursesArchiveCmd   `cmd:"" aliases:"arch" help:"Archive a course and wait until the state is visible"`
	Unarchive ClassroomCoursesUnarchiveCmd `cmd:"" aliases:"unarch,restore" help:"Unarchive a course and wait until the state is visible"`
	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 ¶

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 ¶

type ClassroomCoursesDeleteCmd ¶

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

func (*ClassroomCoursesDeleteCmd) Run ¶

type ClassroomCoursesGetCmd ¶

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

func (*ClassroomCoursesGetCmd) Run ¶

type ClassroomCoursesJoinCmd ¶

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 ¶

type ClassroomCoursesLeaveCmd ¶

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 ¶

type ClassroomCoursesListCmd ¶

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 ¶

type ClassroomCoursesURLCmd ¶

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

func (*ClassroomCoursesURLCmd) Run ¶

type ClassroomCoursesUnarchiveCmd ¶

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

func (*ClassroomCoursesUnarchiveCmd) Run ¶

type ClassroomCoursesUpdateCmd ¶

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 ¶

type ClassroomCourseworkAssigneesCmd ¶

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 ¶

type ClassroomCourseworkCmd ¶

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 ¶

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 ¶

type ClassroomCourseworkDeleteCmd ¶

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

func (*ClassroomCourseworkDeleteCmd) Run ¶

type ClassroomCourseworkGetCmd ¶

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

func (*ClassroomCourseworkGetCmd) Run ¶

type ClassroomCourseworkListCmd ¶

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 ¶

type ClassroomCourseworkUpdateCmd ¶

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 ¶

type ClassroomGuardianInvitesCmd ¶

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 ¶

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

func (*ClassroomGuardianInvitesCreateCmd) Run ¶

type ClassroomGuardianInvitesGetCmd ¶

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

func (*ClassroomGuardianInvitesGetCmd) Run ¶

type ClassroomGuardianInvitesListCmd ¶

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 ¶

type ClassroomGuardiansCmd ¶

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 ¶

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

func (*ClassroomGuardiansDeleteCmd) Run ¶

type ClassroomGuardiansGetCmd ¶

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

func (*ClassroomGuardiansGetCmd) Run ¶

type ClassroomGuardiansListCmd ¶

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 ¶

type ClassroomInvitationsAcceptCmd ¶

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

func (*ClassroomInvitationsAcceptCmd) Run ¶

type ClassroomInvitationsCmd ¶

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 ¶

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 ¶

type ClassroomInvitationsDeleteCmd ¶

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

func (*ClassroomInvitationsDeleteCmd) Run ¶

type ClassroomInvitationsGetCmd ¶

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

func (*ClassroomInvitationsGetCmd) Run ¶

type ClassroomInvitationsListCmd ¶

type ClassroomInvitationsListCmd struct {
	CourseID  string `name:"course" help:"Filter by course ID (required when --user is omitted)"`
	UserID    string `name:"user" help:"Filter by user ID or email (required when --course is omitted)"`
	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 ¶

type ClassroomMaterialsCmd ¶

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 ¶

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 ¶

type ClassroomMaterialsDeleteCmd ¶

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

func (*ClassroomMaterialsDeleteCmd) Run ¶

type ClassroomMaterialsGetCmd ¶

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

func (*ClassroomMaterialsGetCmd) Run ¶

type ClassroomMaterialsListCmd ¶

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 ¶

type ClassroomMaterialsUpdateCmd ¶

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 ¶

type ClassroomProfileCmd ¶

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

type ClassroomProfileGetCmd ¶

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

func (*ClassroomProfileGetCmd) Run ¶

type ClassroomRosterCmd ¶

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 ¶

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

type ClassroomStudentsAddCmd ¶

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 ¶

type ClassroomStudentsCmd ¶

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" help:"Remove a student"`
}

type ClassroomStudentsGetCmd ¶

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 ¶

type ClassroomStudentsListCmd ¶

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 ¶

type ClassroomStudentsRemoveCmd ¶

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 ¶

type ClassroomSubmissionsCmd ¶

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 ¶

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 ¶

type ClassroomSubmissionsGradeCmd ¶

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 ¶

type ClassroomSubmissionsListCmd ¶

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 ¶

type ClassroomSubmissionsReclaimCmd ¶

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 ¶

type ClassroomSubmissionsReturnCmd ¶

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 ¶

type ClassroomSubmissionsTurnInCmd ¶

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 ¶

type ClassroomTeachersAddCmd ¶

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 ¶

type ClassroomTeachersCmd ¶

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" help:"Remove a teacher"`
}

type ClassroomTeachersGetCmd ¶

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 ¶

type ClassroomTeachersListCmd ¶

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 ¶

type ClassroomTeachersRemoveCmd ¶

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 ¶

type ClassroomTopicsCmd ¶

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 ¶

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

func (*ClassroomTopicsCreateCmd) Run ¶

type ClassroomTopicsDeleteCmd ¶

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

func (*ClassroomTopicsDeleteCmd) Run ¶

type ClassroomTopicsGetCmd ¶

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

func (*ClassroomTopicsGetCmd) Run ¶

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

type ClassroomTopicsListCmd ¶

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 ¶

type ClassroomTopicsUpdateCmd ¶

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 ¶

type CompletionCmd ¶

type CompletionCmd struct {
	Shell string `arg:"" name:"shell" help:"Shell (bash|zsh|fish|powershell)" enum:"bash,zsh,fish,powershell"`
}

func (*CompletionCmd) Run ¶

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

type CompletionInternalCmd ¶

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 ¶

type ConfigCmd ¶

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"`
	NoSend ConfigNoSendCmd `cmd:"" name:"no-send" aliases:"nosend" help:"Manage per-account Gmail no-send guards"`
}

type ConfigGetCmd ¶

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

func (*ConfigGetCmd) Run ¶

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

type ConfigKeysCmd ¶

type ConfigKeysCmd struct{}

func (*ConfigKeysCmd) Run ¶

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

type ConfigListCmd ¶

type ConfigListCmd struct{}

func (*ConfigListCmd) Run ¶

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

type ConfigNoSendCmd ¶

type ConfigNoSendCmd struct {
	Set    ConfigNoSendSetCmd    `cmd:"" aliases:"add,enable" help:"Block Gmail send operations for an account"`
	Remove ConfigNoSendRemoveCmd `cmd:"" aliases:"rm,del,delete,unset,disable" help:"Remove an account no-send guard"`
	List   ConfigNoSendListCmd   `cmd:"" aliases:"ls" help:"List accounts with no-send guards"`
}

type ConfigNoSendListCmd ¶

type ConfigNoSendListCmd struct{}

func (*ConfigNoSendListCmd) Run ¶

type ConfigNoSendRemoveCmd ¶

type ConfigNoSendRemoveCmd struct {
	Account string `arg:"" help:"Account email to unguard"`
}

func (*ConfigNoSendRemoveCmd) Run ¶

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

type ConfigNoSendSetCmd ¶

type ConfigNoSendSetCmd struct {
	Account string `arg:"" help:"Account email to guard"`
}

func (*ConfigNoSendSetCmd) Run ¶

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

type ConfigPathCmd ¶

type ConfigPathCmd struct{}

func (*ConfigPathCmd) Run ¶

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

type ConfigSetCmd ¶

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

func (*ConfigSetCmd) Run ¶

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

type ConfigUnsetCmd ¶

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

func (*ConfigUnsetCmd) Run ¶

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

type ContactsCmd ¶

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"`
	Export    ContactsExportCmd    `cmd:"" name:"export" help:"Export contacts as vCard (.vcf)"`
	Dedupe    ContactsDedupeCmd    `cmd:"" name:"dedupe" help:"Find likely duplicate contacts and optionally merge them"`
	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"`
	Raw       ContactsRawCmd       `cmd:"" name:"raw" help:"Dump raw People API response as JSON (People.Get; lossless; for scripting and LLM consumption)"`
}

type ContactsCreateCmd ¶

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"`
	Organization string   `name:"org" help:"Organization/company name"`
	Title        string   `name:"title" help:"Job title"`
	URL          []string `name:"url" help:"URL (can be repeated for multiple URLs)"`
	Note         string   `name:"note" help:"Note/biography"`
	Address      []string `name:"address" sep:";" help:"Postal address (can be repeated for multiple addresses)"`
	Gender       string   `name:"gender" help:"Gender value"`
	Custom       []string `name:"custom" help:"Custom field as key=value (can be repeated)"`
	Relation     []string `name:"relation" help:"Relation as type=person (can be repeated)"`
}

func (*ContactsCreateCmd) Run ¶

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

type ContactsDedupeCmd ¶

type ContactsDedupeCmd struct {
	Match     string   `name:"match" help:"Match fields: email,phone,name" default:"email,phone"`
	Max       int64    `name:"max" aliases:"limit" help:"Max contacts to scan (0 = all)" default:"0"`
	Resources []string `name:"resource" help:"Limit dedupe to exact contact resource names (people/...); repeatable"`
	Apply     bool     `name:"apply" aliases:"merge" help:"Merge duplicate groups and delete redundant contacts (requires confirmation)"`
	FailEmpty bool     `name:"fail-empty" aliases:"non-empty,require-results" help:"Exit with code 3 if no duplicates"`
}

func (*ContactsDedupeCmd) Run ¶

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

type ContactsDeleteCmd ¶

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

func (*ContactsDeleteCmd) Run ¶

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

type ContactsDirectoryCmd ¶

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 ¶

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 ¶

type ContactsDirectorySearchCmd ¶

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 ¶

type ContactsExportCmd ¶

type ContactsExportCmd struct {
	Selector string `arg:"" optional:"" name:"selector" help:"Contact resource name (people/...), email, or name"`
	Query    string `name:"query" help:"Search query to export (max 30 results)"`
	All      bool   `name:"all" help:"Export all personal contacts"`
	Out      string `name:"out" short:"o" help:"Output path (.vcf), or - for stdout" default:"-"`
	Max      int64  `name:"max" aliases:"limit" help:"Max results for --query (1-30)" default:"30"`
	PageSize int64  `name:"page-size" help:"Page size for --all (1-1000)" default:"1000"`
	Page     string `name:"page" help:"Start page token for --all"`
}

func (*ContactsExportCmd) Run ¶

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

type ContactsGetCmd ¶

type ContactsGetCmd struct {
	Identifier string `arg:"" name:"resourceName" help:"Resource name (people/...) or email"`
}

func (*ContactsGetCmd) Run ¶

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

type ContactsListCmd ¶

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

func (*ContactsListCmd) Run ¶

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

type ContactsOtherCmd ¶

type ContactsOtherCmd struct {
	List   ContactsOtherListCmd   `cmd:"" name:"list" help:"List other contacts"`
	Search ContactsOtherSearchCmd `cmd:"" name:"search" help:"Search other contacts"`
}

type ContactsOtherListCmd ¶

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 ¶

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

type ContactsOtherSearchCmd ¶

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 ¶

type ContactsRawCmd ¶

type ContactsRawCmd struct {
	Identifier   string `arg:"" name:"identifier" help:"Contact resource name (people/...) or email"`
	PersonFields string `name:"person-fields" help:"People API personFields mask (default: broad set)"`
	Pretty       bool   `name:"pretty" help:"Pretty-print JSON (default: compact single-line)"`
}

ContactsRawCmd mirrors PeopleRawCmd but lives under the `contacts` group for users who think of these operations in contact terms. Wraps the same underlying People.Get call.

REST reference: https://developers.google.com/people/api/rest/v1/people/get

func (*ContactsRawCmd) Run ¶

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

type ContactsSearchCmd ¶

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 ¶

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

type ContactsUpdateCmd ¶

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)"`
	Organization string   `name:"org" help:"Organization/company name (empty clears)"`
	Title        string   `name:"title" help:"Job title (empty clears)"`
	URL          []string `name:"url" help:"URL (can be repeated; empty clears all)"`
	Note         string   `name:"note" help:"Note/biography (empty clears)"`
	Address      []string `name:"address" sep:";" help:"Postal address (can be repeated; empty clears all)"`
	Gender       string   `name:"gender" help:"Gender value (empty clears)"`
	Custom       []string `name:"custom" help:"Custom field as key=value (can be repeated; empty clears all)"`
	Relation     []string `name:"relation" help:"Relation as type=person (can be repeated; empty clears all)"`
	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 ¶

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

type CreatePresentationFromMarkdownOptions ¶

type CreatePresentationFromMarkdownOptions struct {
	Title         string
	Parent        string
	Slides        []slidesmarkdown.Slide
	SlidesService *slides.Service
	DriveService  *drive.Service
	Pipeline      AssetPipelineConfig
	NoNotes       bool
}

CreatePresentationFromMarkdownOptions controls the slidey-aware orchestrator. Wired from SlidesCreateFromMarkdownCmd in slides.go.

type DocImage ¶

type DocImage = docssed.DocumentImage

DocImage is the projection-owned image metadata used by the command executor.

type DocsAddTabCmd ¶

type DocsAddTabCmd struct {
	DocID     string `arg:"" name:"docId" help:"Google Doc ID or URL"`
	Title     string `name:"title" help:"User-visible tab title"`
	Index     *int64 `name:"index" help:"Zero-based tab index within the parent"`
	ParentTab string `name:"parent-tab" help:"Optional parent tab title or ID"`
	IconEmoji string `name:"icon-emoji" help:"Optional tab emoji icon"`
}

func (*DocsAddTabCmd) Run ¶

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

type DocsBodyPlacementFlags ¶

type DocsBodyPlacementFlags struct {
	Index      *int64 `name:"index" help:"Character index (1 = beginning); omit for end-of-doc"`
	At         string `name:"at" help:"Anchor by literal text and use the start of the matched range"`
	Occurrence *int   `name:"occurrence" help:"Use the Nth --at match (1-based; required when --at is ambiguous)"`
	MatchCase  bool   `name:"match-case" help:"Use case-sensitive --at matching"`
	AtEnd      bool   `name:"at-end" help:"Target end-of-doc/tab (mutually exclusive with --index and --at)"`
	Tab        string `name:"tab" help:"Target a specific tab by title or ID (see docs list-tabs)"`
}

type DocsCatCmd ¶

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"`
	Raw      bool   `name:"raw" help:"Output the raw Google Docs API JSON response without modifications"`
	Numbered bool   `name:"numbered" short:"N" help:"Prefix each paragraph with its number"`
	Chips    bool   `name:"chips" help:"Render Google Docs smart chips and text links inline in text output"`
}

func (*DocsCatCmd) Run ¶

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

type DocsCellStyleCmd ¶

type DocsCellStyleCmd struct {
	DocID           string `arg:"" name:"docId" help:"Doc ID"`
	TableIndex      int    `name:"table-index" help:"1-based table index in document order; negative indexes count from the end" default:"1"`
	Row             int    `name:"row" required:"" help:"1-based row number"`
	Col             int    `name:"col" required:"" help:"1-based column number"`
	RowSpan         int64  `name:"row-span" help:"Number of rows to style" default:"1"`
	ColSpan         int64  `name:"col-span" help:"Number of columns to style" default:"1"`
	BackgroundColor string `name:"background-color" aliases:"bg-color" help:"Cell background color as #RRGGBB or #RGB"`
	BorderAll       string `name:"border-all" help:"All borders as WIDTH[,COLOR[,SOLID|DOT|DASH]] (e.g. 1pt,#000,DASH)"`
	BorderTop       string `name:"border-top" help:"Top border; overrides --border-all"`
	BorderBottom    string `name:"border-bottom" help:"Bottom border; overrides --border-all"`
	BorderLeft      string `name:"border-left" help:"Left border; overrides --border-all"`
	BorderRight     string `name:"border-right" help:"Right border; overrides --border-all"`
	PaddingAll      string `name:"padding-all" help:"All cell padding (points by default; supports pt, in, cm, mm)"`
	PaddingTop      string `name:"padding-top" help:"Top cell padding; overrides --padding-all"`
	PaddingBottom   string `name:"padding-bottom" help:"Bottom cell padding; overrides --padding-all"`
	PaddingLeft     string `name:"padding-left" help:"Left cell padding; overrides --padding-all"`
	PaddingRight    string `name:"padding-right" help:"Right cell padding; overrides --padding-all"`
	ContentAlign    string `name:"content-align" help:"Vertical content alignment: top, middle, or bottom"`
	TextColor       string `name:"text-color" help:"Text color as #RRGGBB or #RGB"`
	Bold            bool   `name:"bold" help:"Set cell text bold"`
	Italic          bool   `name:"italic" help:"Set cell text italic"`
	Underline       bool   `name:"underline" help:"Set cell text underline"`
	Tab             string `name:"tab" help:"Target a specific tab by title or ID (see docs list-tabs)"`
	Batch           string `name:"batch" help:"Append requests to a persisted Docs batch instead of submitting"`
}

func (*DocsCellStyleCmd) Run ¶

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

type DocsCellUpdateCmd ¶

type DocsCellUpdateCmd struct {
	DocID       string `arg:"" name:"docId" help:"Doc ID"`
	TableIndex  int    `name:"table-index" help:"1-based table index in document order; negative indexes count from the end" default:"1"`
	Row         int    `name:"row" required:"" help:"1-based row number"`
	Col         int    `name:"col" required:"" help:"1-based column number"`
	Content     string `name:"content" help:"Replacement content (omit when using --content-file)"`
	ContentFile string `name:"content-file" help:"Read replacement content from a file"`
	Format      string `name:"format" help:"Content format: markdown|plain" default:"markdown" enum:"markdown,plain"`
	Append      bool   `name:"append" help:"Append inside the cell instead of replacing existing cell content"`
	Tab         string `name:"tab" help:"Target a specific tab by title or ID (see docs list-tabs)"`
	TabID       string `name:"tab-id" hidden:"" help:"(deprecated) Use --tab"`
}

func (*DocsCellUpdateCmd) Run ¶

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

type DocsClearCmd ¶

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

func (*DocsClearCmd) Run ¶

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

type DocsCmd ¶

type DocsCmd struct {
	Export           DocsExportCmd           `cmd:"" name:"export" aliases:"download,dl" help:"Export a Google Doc (pdf|docx|txt|md|html)"`
	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 files"`
	Tabs             DocsTabsCmd             `cmd:"" name:"tabs" help:"Manage Google Doc tabs"`
	Header           DocsHeaderCmd           `cmd:"" name:"header" aliases:"headers" help:"List, create, or delete document headers"`
	Footer           DocsFooterCmd           `cmd:"" name:"footer" aliases:"footers" help:"List, create, or delete document footers"`
	AddTab           DocsAddTabCmd           `cmd:"" name:"add-tab" help:"Add a tab to a Google Doc"`
	RenameTab        DocsRenameTabCmd        `cmd:"" name:"rename-tab" help:"Rename a tab in a Google Doc"`
	DeleteTab        DocsDeleteTabCmd        `cmd:"" name:"delete-tab" help:"Delete a tab from 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"`
	InsertTable      DocsInsertTableCmd      `` /* 148-byte string literal not displayed */
	CellUpdate       DocsCellUpdateCmd       `cmd:"" name:"cell-update" aliases:"update-cell" help:"Replace or append content inside a specific table cell"`
	CellStyle        DocsCellStyleCmd        `cmd:"" name:"cell-style" help:"Apply table cell, border, padding, alignment, and text styling"`
	TableRow         DocsTableRowCmd         `cmd:"" name:"table-row" help:"Insert, delete, style, or pin native table rows"`
	TableColumn      DocsTableColumnCmd      `cmd:"" name:"table-column" help:"Insert or delete native table columns"`
	TableMerge       DocsTableMergeCmd       `cmd:"" name:"table-merge" help:"Merge a native table cell range"`
	TableUnmerge     DocsTableUnmergeCmd     `cmd:"" name:"table-unmerge" aliases:"table-split" help:"Unmerge the region containing a native table cell"`
	TableColumnWidth DocsTableColumnWidthCmd `cmd:"" name:"table-column-width" aliases:"table-width,column-width" help:"Set or reset native table column widths"`
	InsertImage      DocsInsertImageCmd      `cmd:"" name:"insert-image" help:"Insert a public image URL or upload a local image into a Google Doc"`
	ReplaceImage     DocsReplaceImageCmd     `cmd:"" name:"replace-image" help:"Replace an existing image without changing its position or bounds"`
	InsertPerson     DocsInsertPersonCmd     `cmd:"" name:"insert-person" help:"Insert a native person smart chip"`
	InsertFileChip   DocsInsertFileChipCmd   `cmd:"" name:"insert-file-chip" aliases:"insert-rich-link" help:"Insert a native Drive file smart chip"`
	InsertDateChip   DocsInsertDateChipCmd   `cmd:"" name:"insert-date-chip" help:"Insert a native date smart chip"`
	InsertPageBreak  DocsInsertPageBreakCmd  `` /* 135-byte string literal not displayed */
	Footnote         DocsFootnoteCmd         `cmd:"" name:"insert-footnote" help:"Insert and populate a footnote"`
	SectionBreak     DocsSectionBreakCmd     `cmd:"" name:"insert-section-break" help:"Insert a continuous or next-page section break"`
	HorizontalRule   DocsHorizontalRuleCmd   `cmd:"" name:"insert-horizontal-rule" aliases:"insert-hr,hr" help:"Insert a paragraph-border horizontal rule"`
	SectionColumns   DocsSectionColumnsCmd   `cmd:"" name:"section-columns" help:"Set the column count for a document section"`
	Delete           DocsDeleteCmd           `cmd:"" name:"delete" help:"Delete text range from document"`
	FindRange        DocsFindRangeCmd        `cmd:"" name:"find-range" help:"Find text and print Docs API UTF-16 index ranges"`
	FindReplace      DocsFindReplaceCmd      `` /* 138-byte string literal not displayed */
	Update           DocsUpdateCmd           `cmd:"" name:"update" help:"Insert or replace text at a specific index or range in a Google Doc"`
	Edit             DocsEditCmd             `cmd:"" name:"edit" help:"Find and replace text in a Google Doc"`
	Format           DocsFormatCmd           `cmd:"" name:"format" help:"Apply text or paragraph formatting to a Google Doc"`
	Sed              DocsSedCmd              `cmd:"" name:"sed" help:"Regex find/replace (sed-style: s/pattern/replacement/g)"`
	Clear            DocsClearCmd            `cmd:"" name:"clear" help:"Clear all content from a Google Doc"`
	Structure        DocsStructureCmd        `cmd:"" name:"structure" aliases:"struct" help:"Show document structure with numbered paragraphs"`
	Tables           DocsTablesCmd           `cmd:"" name:"tables" help:"List native tables"`
	Images           DocsImagesCmd           `cmd:"" name:"images" help:"List document images"`
	Headings         DocsHeadingsCmd         `cmd:"" name:"headings" help:"List document headings"`
	Paragraphs       DocsParagraphsCmd       `cmd:"" name:"paragraphs" help:"List document paragraphs"`
	Suggestions      DocsSuggestionsCmd      `cmd:"" name:"suggestions" help:"List pending text suggestions"`
	NamedRanges      DocsNamedRangesCmd      `cmd:"" name:"named-range" aliases:"named-ranges,namedranges,nr" help:"Manage named ranges"`
	Raw              DocsRawCmd              `` /* 127-byte string literal not displayed */
	PageLayout       DocsPageLayoutCmd       `` /* 128-byte string literal not displayed */
}

type DocsCommentsAddCmd ¶

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 ¶

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

type DocsCommentsCmd ¶

type DocsCommentsCmd struct {
	List    DocsCommentsListCmd    `cmd:"" name:"list" aliases:"ls" help:"List comments on a Google Doc"`
	Poll    DocsCommentsPollCmd    `cmd:"" name:"poll" help:"Poll new and modified comments with persisted state"`
	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"`
	Locate  DocsCommentsLocateCmd  `cmd:"" name:"locate" help:"Resolve a comment quote to Docs API index ranges"`
	Reply   DocsCommentsReplyCmd   `cmd:"" name:"reply" aliases:"respond" help:"Reply to a comment"`
	Resolve DocsCommentsResolveCmd `cmd:"" name:"resolve" help:"Resolve a comment (mark as done)"`
	Reopen  DocsCommentsReopenCmd  `cmd:"" name:"reopen" help:"Reopen a previously resolved comment"`
	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 ¶

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 ¶

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

type DocsCommentsGetCmd ¶

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 ¶

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

type DocsCommentsListCmd ¶

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"`
	Since           string `name:"since" help:"Only return comments modified at or after this RFC3339 timestamp"`
	Locate          bool   `name:"locate" help:"Attach each comment's tab and index ranges (one extra Docs fetch)"`
	Tab             string `name:"tab" help:"Only comments located in this tab by title or ID (implies --locate)"`
	TabID           string `name:"tab-id" hidden:"" help:"(deprecated) Use --tab"`
}

DocsCommentsListCmd lists comments on a Google Doc.

func (*DocsCommentsListCmd) Run ¶

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

type DocsCommentsLocateCmd ¶

type DocsCommentsLocateCmd struct {
	DocID               string `arg:"" name:"docId" help:"Google Doc ID or URL"`
	CommentID           string `arg:"" name:"commentId" help:"Comment ID"`
	MatchCase           bool   `name:"match-case" help:"Use case-sensitive matching"`
	NormalizeWhitespace bool   `name:"normalize-whitespace" help:"Collapse whitespace while matching" default:"true" negatable:""`
	Tab                 string `name:"tab" help:"Target a specific tab by title or ID (see docs list-tabs)"`
	TabID               string `name:"tab-id" hidden:"" help:"(deprecated) Use --tab"`
}

func (*DocsCommentsLocateCmd) Run ¶

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

type DocsCommentsPollCmd ¶

type DocsCommentsPollCmd struct {
	DocID           string        `arg:"" name:"docId" help:"Google Doc ID or URL"`
	StateFile       string        `name:"state-file" required:"" help:"JSON file that stores the comment time watermark"`
	Interval        time.Duration `name:"interval" help:"Delay between polls" default:"60s"`
	IncludeResolved bool          `name:"include-resolved" aliases:"resolved" help:"Include resolved comments"`
	OnNew           string        `name:"on-new" help:"Trusted local shell command run for each comment; comment event JSON is provided on stdin"`
	MaxIterations   int           `name:"max-iterations" help:"Stop after N polls; 0 runs until interrupted" default:"0"`
	Max             int64         `name:"max" aliases:"limit" help:"Max comments per API page" default:"100"`
}

func (*DocsCommentsPollCmd) Run ¶

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

type DocsCommentsReopenCmd ¶

type DocsCommentsReopenCmd 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 reopening"`
}

DocsCommentsReopenCmd reopens a previously resolved comment on a Google Doc. The Drive API reopens a comment when a reply is created with action="reopen".

func (*DocsCommentsReopenCmd) Run ¶

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

type DocsCommentsReplyCmd ¶

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"`
	Action    string `` /* 136-byte string literal not displayed */
}

DocsCommentsReplyCmd replies to a comment on a Google Doc.

func (*DocsCommentsReplyCmd) Run ¶

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

type DocsCommentsResolveCmd ¶

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 ¶

type DocsCopyCmd ¶

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 ¶

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

type DocsCreateCmd ¶

type DocsCreateCmd struct {
	Title    string `arg:"" name:"title" help:"Doc title"`
	Parent   string `name:"parent" help:"Destination folder ID"`
	File     string `` /* 179-byte string literal not displayed */
	Pageless bool   `name:"pageless" help:"Set document to pageless mode"`
}

func (*DocsCreateCmd) Run ¶

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

type DocsDeleteCmd ¶

type DocsDeleteCmd struct {
	DocID      string `arg:"" name:"docId" help:"Doc ID"`
	Start      *int64 `name:"start" help:"Start index (>= 1; required unless --at is set)"`
	End        *int64 `name:"end" help:"End index (> start; required unless --at is set)"`
	At         string `name:"at" help:"Anchor by literal text and delete that matched range"`
	Occurrence *int   `name:"occurrence" help:"Use the Nth --at match (1-based; required when --at is ambiguous)"`
	MatchCase  bool   `name:"match-case" help:"Use case-sensitive --at matching"`
	Tab        string `name:"tab" help:"Target a specific tab by title or ID (see docs list-tabs)"`
	Segment    string `name:"segment" help:"Target an exact header, footer, or footnote segment ID"`
	TabID      string `name:"tab-id" hidden:"" help:"(deprecated) Use --tab"`
	Batch      string `name:"batch" help:"Append requests to a persisted Docs batch instead of submitting"`
}

func (*DocsDeleteCmd) Run ¶

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

type DocsDeleteTabCmd ¶

type DocsDeleteTabCmd struct {
	DocID string `arg:"" name:"docId" help:"Google Doc ID or URL"`
	Tab   string `name:"tab" help:"Existing tab title or ID"`
}

func (*DocsDeleteTabCmd) Run ¶

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

type DocsEditCmd ¶

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

func (*DocsEditCmd) Run ¶

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

type DocsExportCmd ¶

type DocsExportCmd struct {
	DocID     string         `arg:"" name:"docId" help:"Doc ID"`
	Output    OutputPathFlag `embed:""`
	Format    string         `name:"format" help:"Export format: pdf|docx|txt|md|html" default:"pdf"`
	Tab       string         `name:"tab" help:"(experimental) Export a specific tab by title or ID (see 'gog docs list-tabs')"`
	Overwrite bool           `name:"overwrite" help:"Overwrite an existing output file"`
}

func (*DocsExportCmd) Run ¶

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

type DocsFindRangeCmd ¶

type DocsFindRangeCmd struct {
	DocID               string `arg:"" name:"docId" help:"Doc ID"`
	Text                string `arg:"" name:"text" help:"Text to find"`
	MatchCase           bool   `name:"match-case" help:"Use case-sensitive matching"`
	All                 bool   `name:"all" help:"Return all matches"`
	Occurrence          *int   `name:"occurrence" help:"Return the Nth occurrence (1-based; default first)"`
	NormalizeWhitespace bool   `name:"normalize-whitespace" help:"Collapse whitespace while matching" default:"true" negatable:""`
	FailEmpty           bool   `name:"fail-empty" aliases:"non-empty,require-results" help:"Exit with code 3 if no matches"`
	Tab                 string `name:"tab" help:"Target a specific tab by title or ID (see docs list-tabs)"`
	Segment             string `name:"segment" help:"Target an exact header, footer, or footnote segment ID"`
	TabID               string `name:"tab-id" hidden:"" help:"(deprecated) Use --tab"`
}

func (*DocsFindRangeCmd) Run ¶

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

type DocsFindReplaceCmd ¶

type DocsFindReplaceCmd struct {
	DocID       string `arg:"" name:"docId" help:"Doc ID"`
	Find        string `arg:"" name:"find" help:"Text to find"`
	ReplaceText string `arg:"" optional:"" name:"replace" help:"Replacement text (omit when using --content-file)"`
	ContentFile string `name:"content-file" help:"Read replacement from a file instead of the positional argument."`
	MatchCase   bool   `name:"match-case" help:"Case-sensitive matching"`
	Format      string `` /* 174-byte string literal not displayed */
	First       bool   `name:"first" help:"Replace only the first occurrence instead of all."`
	Tab         string `name:"tab" help:"Target a specific tab by title or ID (see docs list-tabs)"`
	TabID       string `name:"tab-id" hidden:"" help:"(deprecated) Use --tab"`
}

func (*DocsFindReplaceCmd) Run ¶

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

type DocsFooterCmd ¶

type DocsFooterCmd struct {
	List   DocsFooterListCmd   `cmd:"" name:"list" aliases:"ls" help:"List footers and their segment IDs"`
	Create DocsFooterCreateCmd `cmd:"" name:"create" aliases:"add,new" help:"Create and optionally populate a footer"`
	Delete DocsFooterDeleteCmd `cmd:"" name:"delete" aliases:"rm,remove,del" help:"Delete a footer"`
}

type DocsFooterCreateCmd ¶

type DocsFooterCreateCmd struct {
	DocID     string                 `arg:"" name:"docId" help:"Doc ID"`
	Text      string                 `name:"text" help:"Initial footer text"`
	File      string                 `name:"file" help:"Read initial footer text from a file ('-' for stdin)"`
	Placement DocsBodyPlacementFlags `embed:""`
}

func (*DocsFooterCreateCmd) Run ¶

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

type DocsFooterDeleteCmd ¶

type DocsFooterDeleteCmd struct {
	DocID     string `arg:"" name:"docId" help:"Doc ID"`
	SegmentID string `arg:"" name:"footerId" help:"Exact footer segment ID"`
	Tab       string `name:"tab" help:"Tab title or ID containing the footer"`
}

func (*DocsFooterDeleteCmd) Run ¶

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

type DocsFooterListCmd ¶

type DocsFooterListCmd struct {
	DocID string `arg:"" name:"docId" help:"Doc ID"`
	Tab   string `name:"tab" help:"Limit results to a tab title or ID"`
}

func (*DocsFooterListCmd) Run ¶

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

type DocsFootnoteCmd ¶

type DocsFootnoteCmd struct {
	DocID     string                 `arg:"" name:"docId" help:"Doc ID"`
	Text      string                 `name:"text" help:"Footnote text"`
	File      string                 `name:"file" help:"Read footnote text from a file ('-' for stdin)"`
	Placement DocsBodyPlacementFlags `embed:""`
}

func (*DocsFootnoteCmd) Run ¶

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

type DocsFormatCmd ¶

type DocsFormatCmd struct {
	DocID     string          `arg:"" name:"docId" help:"Doc ID"`
	Match     string          `name:"match" help:"Only format the first text match"`
	MatchAll  bool            `name:"match-all" help:"Format all matches instead of only the first"`
	MatchCase bool            `name:"match-case" help:"Use case-sensitive matching with --match"`
	Tab       string          `name:"tab" help:"Target a specific tab by title or ID (see docs list-tabs)"`
	Segment   string          `name:"segment" help:"Target an exact header, footer, or footnote segment ID"`
	TabID     string          `name:"tab-id" hidden:"" help:"(deprecated) Use --tab"`
	Link      string          `name:"link" help:"Set hyperlink target (http://, https://, mailto:, #bookmarkId, or #heading-slug)"`
	NoLink    bool            `name:"no-link" help:"Clear hyperlink"`
	Batch     string          `name:"batch" help:"Append requests to a persisted Docs batch instead of submitting"`
	Format    DocsFormatFlags `embed:""`
}

func (*DocsFormatCmd) Run ¶

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

type DocsFormatFlags ¶

type DocsFormatFlags struct {
	FontFamily        string   `name:"font-family" help:"Font family, for example Arial or Georgia"`
	FontSize          float64  `name:"font-size" help:"Font size in points"`
	TextColor         string   `name:"text-color" help:"Text color as #RRGGBB or #RGB"`
	BgColor           string   `name:"bg-color" help:"Text background color as #RRGGBB or #RGB"`
	Code              bool     `name:"code" help:"Apply code style (Courier New + grey background)"`
	Bold              bool     `name:"bold" help:"Set bold"`
	NoBold            bool     `name:"no-bold" help:"Clear bold"`
	Italic            bool     `name:"italic" help:"Set italic"`
	NoItalic          bool     `name:"no-italic" help:"Clear italic"`
	Underline         bool     `name:"underline" help:"Set underline"`
	NoUnderline       bool     `name:"no-underline" help:"Clear underline"`
	Strikethrough     bool     `name:"strikethrough" aliases:"strike" help:"Set strikethrough"`
	NoStrike          bool     `name:"no-strikethrough" aliases:"no-strike" help:"Clear strikethrough"`
	Alignment         string   `name:"alignment" help:"Paragraph alignment: left, center, right, justify, start, end, justified"`
	LineSpacing       float64  `name:"line-spacing" help:"Paragraph line spacing percentage, for example 100 or 150"`
	SpacingMode       string   `name:"spacing-mode" help:"Paragraph spacing mode: NEVER_COLLAPSE or COLLAPSE_LISTS"`
	HeadingLevel      *int     `name:"heading-level" help:"Set paragraph named style to HEADING_1..HEADING_6 (shortcut for --named-style=HEADING_N)"`
	NamedStyle        string   `name:"named-style" help:"Set paragraph named style: NORMAL_TEXT, TITLE, SUBTITLE, HEADING_1..HEADING_6"`
	Bullets           bool     `name:"bullets" help:"Create a bulleted list with the default disc preset"`
	Ordered           bool     `name:"ordered" help:"Create a numbered list with the default decimal preset"`
	BulletPreset      string   `name:"bullet-preset" placeholder:"PRESET" help:"Create a list with a Google Docs bullet glyph preset"`
	NoBullets         bool     `name:"no-bullets" help:"Remove bullets or numbering"`
	IndentStart       *float64 `name:"indent-start" placeholder:"PT" help:"Paragraph start indentation in points"`
	IndentFirstLine   *float64 `name:"indent-first-line" placeholder:"PT" help:"Paragraph first-line indentation in points"`
	IndentEnd         *float64 `name:"indent-end" placeholder:"PT" help:"Paragraph end indentation in points"`
	SpaceAbove        *float64 `name:"space-above" placeholder:"PT" help:"Space above the paragraph in points"`
	SpaceBelow        *float64 `name:"space-below" placeholder:"PT" help:"Space below the paragraph in points"`
	KeepWithNext      *bool    `` /* 132-byte string literal not displayed */
	KeepLinesTogether *bool    `` /* 146-byte string literal not displayed */
	// contains filtered or unexported fields
}

type DocsHeaderCmd ¶

type DocsHeaderCmd struct {
	List   DocsHeaderListCmd   `cmd:"" name:"list" aliases:"ls" help:"List headers and their segment IDs"`
	Create DocsHeaderCreateCmd `cmd:"" name:"create" aliases:"add,new" help:"Create and optionally populate a header"`
	Delete DocsHeaderDeleteCmd `cmd:"" name:"delete" aliases:"rm,remove,del" help:"Delete a header"`
}

type DocsHeaderCreateCmd ¶

type DocsHeaderCreateCmd struct {
	DocID     string                 `arg:"" name:"docId" help:"Doc ID"`
	Text      string                 `name:"text" help:"Initial header text"`
	File      string                 `name:"file" help:"Read initial header text from a file ('-' for stdin)"`
	Placement DocsBodyPlacementFlags `embed:""`
}

func (*DocsHeaderCreateCmd) Run ¶

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

type DocsHeaderDeleteCmd ¶

type DocsHeaderDeleteCmd struct {
	DocID     string `arg:"" name:"docId" help:"Doc ID"`
	SegmentID string `arg:"" name:"headerId" help:"Exact header segment ID"`
	Tab       string `name:"tab" help:"Tab title or ID containing the header"`
}

func (*DocsHeaderDeleteCmd) Run ¶

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

type DocsHeaderListCmd ¶

type DocsHeaderListCmd struct {
	DocID string `arg:"" name:"docId" help:"Doc ID"`
	Tab   string `name:"tab" help:"Limit results to a tab title or ID"`
}

func (*DocsHeaderListCmd) Run ¶

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

type DocsHeadingsCmd ¶

type DocsHeadingsCmd struct {
	List DocsHeadingsListCmd `cmd:"" name:"list" aliases:"ls" help:"List heading paragraphs"`
}

type DocsHeadingsListCmd ¶

type DocsHeadingsListCmd struct {
	DocID string `arg:"" name:"docId" help:"Doc ID"`
	Tab   string `name:"tab" help:"Tab title or ID (omit for default)"`
	Level int    `name:"level" help:"Only return this heading level (1-6)"`
}

func (*DocsHeadingsListCmd) Run ¶

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

type DocsHorizontalRuleCmd ¶

type DocsHorizontalRuleCmd struct {
	DocID     string                 `arg:"" name:"docId" help:"Doc ID"`
	Batch     string                 `name:"batch" help:"Append requests to a persisted Docs batch instead of submitting"`
	Placement DocsBodyPlacementFlags `embed:""`
}

func (*DocsHorizontalRuleCmd) Run ¶

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

type DocsImagesCmd ¶

type DocsImagesCmd struct {
	List DocsImagesListCmd `cmd:"" name:"list" aliases:"ls" help:"List inline and positioned images"`
}

type DocsImagesListCmd ¶

type DocsImagesListCmd struct {
	DocID string `arg:"" name:"docId" help:"Doc ID"`
	Tab   string `name:"tab" help:"Tab title or ID (omit for default)"`
}

func (*DocsImagesListCmd) Run ¶

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

type DocsInfoCmd ¶

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

func (*DocsInfoCmd) Run ¶

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

type DocsInsertCmd ¶

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). Defaults to end-of-doc when omitted."`
	At         string `name:"at" help:"Anchor by literal text and insert at the start of the matched range"`
	Occurrence *int   `name:"occurrence" help:"Use the Nth --at match (1-based; required when --at is ambiguous)"`
	MatchCase  bool   `name:"match-case" help:"Use case-sensitive --at matching"`
	File       string `name:"file" short:"f" help:"Read content from file (use - for stdin)"`
	Markdown   bool   `name:"markdown" help:"Convert markdown to Google Docs formatting before inserting"`
	Tab        string `name:"tab" help:"Target a specific tab by title or ID (see docs list-tabs)"`
	Segment    string `name:"segment" help:"Target an exact header, footer, or footnote segment ID"`
	TabID      string `name:"tab-id" hidden:"" help:"(deprecated) Use --tab"`
	Batch      string `name:"batch" help:"Append requests to a persisted Docs batch instead of submitting"`
}

func (*DocsInsertCmd) Run ¶

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

type DocsInsertDateChipCmd ¶

type DocsInsertDateChipCmd struct {
	DocID  string `arg:"" name:"docId" help:"Doc ID"`
	Date   string `name:"date" required:"" help:"Date to insert as YYYY-MM-DD"`
	Format string `name:"format" help:"Date display format: abbreviated|full|iso" default:"abbreviated"`
	Index  *int64 `name:"index" help:"Character index to insert at. Omit or use --at-end for end-of-doc."`
	AtEnd  bool   `name:"at-end" help:"Insert at end-of-doc/tab (mutually exclusive with --index)"`
	Tab    string `name:"tab" help:"Target a specific tab by title or ID (see docs list-tabs)"`
	Batch  string `name:"batch" help:"Append requests to a persisted Docs batch instead of submitting"`
}

func (*DocsInsertDateChipCmd) Run ¶

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

type DocsInsertFileChipCmd ¶

type DocsInsertFileChipCmd struct {
	DocID  string `arg:"" name:"docId" help:"Doc ID"`
	FileID string `name:"file-id" required:"" help:"Drive file ID to insert as a smart chip"`
	Index  *int64 `name:"index" help:"Character index to insert at. Omit or use --at-end for end-of-doc."`
	AtEnd  bool   `name:"at-end" help:"Insert at end-of-doc/tab (mutually exclusive with --index)"`
	Tab    string `name:"tab" help:"Target a specific tab by title or ID (see docs list-tabs)"`
	Batch  string `name:"batch" help:"Append requests to a persisted Docs batch instead of submitting"`
}

func (*DocsInsertFileChipCmd) Run ¶

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

type DocsInsertImageCmd ¶

type DocsInsertImageCmd struct {
	DocID        string  `arg:"" name:"docId" help:"Doc ID"`
	File         string  `name:"file" help:"Local PNG, JPEG, or GIF image to upload and insert" type:"existingfile"`
	URL          string  `name:"url" help:"Public HTTPS image URL to insert directly"`
	At           *string `name:"at" help:"Placeholder text to delete and replace, or 'end' to append"`
	Before       *string `name:"before" help:"Insert before the first literal text match without deleting it"`
	After        *string `name:"after" help:"Insert after the first literal text match without deleting it"`
	Width        float64 `name:"width" help:"Image width in points; default 468pt" default:"468"`
	Height       float64 `name:"height" help:"Image height in points (optional; width-only preserves aspect ratio)"`
	Parent       string  `name:"parent" help:"Drive folder ID for the uploaded image"`
	Name         string  `name:"name" help:"Override uploaded Drive filename"`
	OnRestricted string  `name:"on-restricted" help:"If public sharing is blocked: error|link" default:"error" enum:"error,link"`
	Tab          string  `name:"tab" help:"Target a specific tab by title or ID (see docs list-tabs)"`
}

func (*DocsInsertImageCmd) Run ¶

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

type DocsInsertPageBreakCmd ¶

type DocsInsertPageBreakCmd struct {
	DocID      string `arg:"" name:"docId" help:"Doc ID"`
	Index      *int64 `name:"index" help:"Character index to insert at (1 = beginning). Omit or use --at-end for end-of-doc."`
	At         string `name:"at" help:"Anchor by literal text and insert at the start of the matched range"`
	Occurrence *int   `name:"occurrence" help:"Use the Nth --at match (1-based; required when --at is ambiguous)"`
	MatchCase  bool   `name:"match-case" help:"Use case-sensitive --at matching"`
	AtEnd      bool   `name:"at-end" help:"Insert at end-of-doc/tab (mutually exclusive with --index)"`
	Tab        string `name:"tab" help:"Target a specific tab by title or ID (see docs list-tabs)"`
	TabID      string `name:"tab-id" hidden:"" help:"(deprecated) Use --tab"`
	Batch      string `name:"batch" help:"Append requests to a persisted Docs batch instead of submitting"`
}

DocsInsertPageBreakCmd inserts a page break at a specific character index in a Google Doc (or at the end of the body/tab when --at-end is supplied, or --index is omitted). Surfaces the Docs API InsertPageBreakRequest directly, since markdown has no native page-break construct that the markdown writer could translate.

func (*DocsInsertPageBreakCmd) Run ¶

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

type DocsInsertPersonCmd ¶

type DocsInsertPersonCmd struct {
	DocID      string `arg:"" name:"docId" help:"Doc ID"`
	Email      string `name:"email" required:"" help:"Email address for the person chip"`
	Index      *int64 `name:"index" help:"Character index to insert at. Omit or use --at-end for end-of-doc."`
	At         string `name:"at" help:"Anchor by literal text, delete the match, and insert the person chip there"`
	Occurrence *int   `name:"occurrence" help:"Use the Nth --at match (1-based; required when --at is ambiguous)"`
	MatchCase  bool   `name:"match-case" help:"Use case-sensitive --at matching"`
	AtEnd      bool   `name:"at-end" help:"Insert at end-of-doc/tab (mutually exclusive with --index)"`
	Tab        string `name:"tab" help:"Target a specific tab by title or ID (see docs list-tabs)"`
	Batch      string `name:"batch" help:"Append requests to a persisted Docs batch instead of submitting"`
}

func (*DocsInsertPersonCmd) Run ¶

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

type DocsInsertTableCmd ¶

type DocsInsertTableCmd struct {
	DocID      string `arg:"" name:"docId" help:"Doc ID"`
	Rows       int    `name:"rows" required:"" help:"Number of rows (>=1)"`
	Cols       int    `name:"cols" required:"" help:"Number of columns (>=1)"`
	Index      *int64 `name:"index" help:"Character index to insert at (1 = beginning). Omit or use --at-end for end-of-doc."`
	AtEnd      bool   `name:"at-end" help:"Insert at end-of-doc/tab (mutually exclusive with --index)"`
	ValuesJSON string `name:"values-json" help:"Cell values as a JSON 2D string array; dimensions must match --rows x --cols when supplied"`
	Tab        string `name:"tab" help:"Target a specific tab by title or ID (see docs list-tabs)"`
	TabID      string `name:"tab-id" hidden:"" help:"(deprecated) Use --tab"`
}

DocsInsertTableCmd inserts a native Google Docs table at a specific character index (or at end-of-doc) and optionally populates it from a JSON 2D string array. The markdown writer can already render tables, but it drops them mid-insert in some scenarios — see #592/#607/#608/#609 — and agents needed a path that bypasses the markdown converter entirely (#602).

func (*DocsInsertTableCmd) Run ¶

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

type DocsLayoutFlags ¶

type DocsLayoutFlags struct {
	PageSize     string `name:"page-size" help:"Named page size: A4, A5, Letter, Legal, Tabloid"`
	PageWidth    string `name:"page-width" help:"Set page width (points by default; supports pt, in, cm, mm)"`
	PageHeight   string `name:"page-height" help:"Set page height (points by default; supports pt, in, cm, mm)"`
	MarginLeft   string `name:"margin-left" help:"Set left page margin (points by default; supports pt, in, cm, mm)"`
	MarginRight  string `name:"margin-right" help:"Set right page margin (points by default; supports pt, in, cm, mm)"`
	MarginTop    string `name:"margin-top" help:"Set top page margin (points by default; supports pt, in, cm, mm)"`
	MarginBottom string `name:"margin-bottom" help:"Set bottom page margin (points by default; supports pt, in, cm, mm)"`
}

type DocsListTabsCmd ¶

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

func (*DocsListTabsCmd) Run ¶

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

type DocsNamedRangesCmd ¶

type DocsNamedRangesCmd struct {
	List    DocsNamedRangesListCmd    `cmd:"" default:"withargs" help:"List named ranges"`
	Create  DocsNamedRangesCreateCmd  `cmd:"" aliases:"add,new" help:"Create a named range"`
	Delete  DocsNamedRangesDeleteCmd  `cmd:"" aliases:"rm,remove,del" help:"Delete a named range"`
	Replace DocsNamedRangesReplaceCmd `cmd:"" aliases:"set,update" help:"Replace a named range with plain text"`
}

type DocsNamedRangesCreateCmd ¶

type DocsNamedRangesCreateCmd struct {
	DocID      string `arg:"" name:"docId" help:"Google Doc ID or URL"`
	Name       string `name:"name" help:"Unique named range name"`
	At         string `name:"at" help:"Create the range around literal matched text"`
	Occurrence *int   `name:"occurrence" help:"Use the Nth --at match (1-based; required when --at is ambiguous)"`
	MatchCase  bool   `name:"match-case" help:"Use case-sensitive --at matching"`
	Start      *int64 `name:"start" help:"Range start UTF-16 index (inclusive)"`
	End        *int64 `name:"end" help:"Range end UTF-16 index (exclusive)"`
	Tab        string `name:"tab" help:"Target a specific tab by title or ID (see docs list-tabs)"`
	TabID      string `name:"tab-id" hidden:"" help:"(deprecated) Use --tab"`
}

func (*DocsNamedRangesCreateCmd) Run ¶

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

type DocsNamedRangesDeleteCmd ¶

type DocsNamedRangesDeleteCmd struct {
	DocID    string `arg:"" name:"docId" help:"Google Doc ID or URL"`
	NameOrID string `arg:"" name:"nameOrId" help:"Exact named range name or ID"`
	Tab      string `name:"tab" help:"Target a specific tab by title or ID (see docs list-tabs)"`
	TabID    string `name:"tab-id" hidden:"" help:"(deprecated) Use --tab"`
}

func (*DocsNamedRangesDeleteCmd) Run ¶

type DocsNamedRangesListCmd ¶

type DocsNamedRangesListCmd struct {
	DocID string `arg:"" name:"docId" help:"Google Doc ID or URL"`
	Name  string `name:"name" help:"Filter by exact named range name"`
	Tab   string `name:"tab" help:"Target a specific tab by title or ID (see docs list-tabs)"`
	TabID string `name:"tab-id" hidden:"" help:"(deprecated) Use --tab"`
}

func (*DocsNamedRangesListCmd) Run ¶

type DocsNamedRangesReplaceCmd ¶

type DocsNamedRangesReplaceCmd struct {
	DocID    string `arg:"" name:"docId" help:"Google Doc ID or URL"`
	NameOrID string `arg:"" name:"nameOrId" help:"Exact named range name or ID"`
	Text     string `name:"text" aliases:"content" help:"Plain replacement text (empty text clears the range)"`
	File     string `name:"file" help:"Plain text file path ('-' for stdin)"`
	Tab      string `name:"tab" help:"Target a specific tab by title or ID (see docs list-tabs)"`
	TabID    string `name:"tab-id" hidden:"" help:"(deprecated) Use --tab"`
}

func (*DocsNamedRangesReplaceCmd) Run ¶

type DocsPageLayoutCmd ¶

type DocsPageLayoutCmd struct {
	DocID       string          `arg:"" name:"docId" help:"Doc ID"`
	Layout      string          `name:"layout" enum:"pageless,pages,paged" default:"pageless" help:"Page layout: pageless or pages"`
	LayoutFlags DocsLayoutFlags `embed:""`
	Tab         string          `` /* 126-byte string literal not displayed */
	TabID       string          `name:"tab-id" hidden:"" help:"(deprecated) Use --tab"`
}

DocsPageLayoutCmd toggles the page layout on an existing Google Doc. The Docs UI exposes this via File → Page setup → Pageless/Pages. The Docs API exposes it via documents.batchUpdate with updateDocumentStyle.

Sibling to the --pageless flag on `docs create` / `docs write` for the case where the doc already exists (e.g. created by Drive markdown conversion in an upstream step that didn't set the layout).

func (*DocsPageLayoutCmd) Run ¶

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

type DocsParagraphsCmd ¶

type DocsParagraphsCmd struct {
	List DocsParagraphsListCmd `cmd:"" name:"list" aliases:"ls" help:"List paragraphs"`
}

type DocsParagraphsListCmd ¶

type DocsParagraphsListCmd struct {
	DocID string `arg:"" name:"docId" help:"Doc ID"`
	Tab   string `name:"tab" help:"Tab title or ID (omit for default)"`
	Style string `name:"style" help:"Only return this named style (for example NORMAL_TEXT or HEADING_2)"`
}

func (*DocsParagraphsListCmd) Run ¶

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

type DocsRawCmd ¶

type DocsRawCmd struct {
	DocID   string `arg:"" name:"docId" help:"Doc ID"`
	Pretty  bool   `name:"pretty" help:"Pretty-print JSON (default: compact single-line)"`
	Tab     string `name:"tab" help:"Return one tab by title or ID in the legacy top-level Document shape"`
	AllTabs bool   `name:"all-tabs" help:"Return the canonical Document response with all tab content populated"`
}

DocsRawCmd dumps the full Documents.Get response as JSON, with no Fields restriction. Intended for programmatic / LLM consumption where the caller wants the canonical Google Docs API tree (tables, suggestions, per-run styling, list nesting, named ranges, inline objects) that `info` drops.

REST reference: https://developers.google.com/docs/api/reference/rest/v1/documents/get Go type: https://pkg.go.dev/google.golang.org/api/docs/v1#Document

func (*DocsRawCmd) Run ¶

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

type DocsRenameTabCmd ¶

type DocsRenameTabCmd struct {
	DocID string `arg:"" name:"docId" help:"Google Doc ID or URL"`
	Tab   string `name:"tab" help:"Existing tab title or ID"`
	Title string `name:"title" help:"New user-visible tab title"`
}

func (*DocsRenameTabCmd) Run ¶

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

type DocsReplaceImageCmd ¶

type DocsReplaceImageCmd struct {
	DocID    string `arg:"" name:"docId" help:"Doc ID"`
	File     string `name:"file" help:"Local PNG, JPEG, or GIF image to upload and use" type:"existingfile"`
	URL      string `name:"url" help:"Public HTTPS image URL to use directly"`
	ObjectID string `name:"object-id" help:"Exact image object ID from docs images list"`
	MatchAlt string `name:"match-alt" help:"Select the image whose alt text contains this value (case-insensitive)"`
	Parent   string `name:"parent" help:"Drive folder ID for an uploaded local image"`
	Name     string `name:"name" help:"Override the uploaded Drive filename"`
	Tab      string `name:"tab" help:"Target a specific tab by title or ID (see docs list-tabs)"`
}

func (*DocsReplaceImageCmd) Run ¶

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

type DocsSectionBreakCmd ¶

type DocsSectionBreakCmd struct {
	DocID     string                 `arg:"" name:"docId" help:"Doc ID"`
	Type      string                 `name:"type" help:"Section type: next-page or continuous" default:"next-page"`
	Batch     string                 `name:"batch" help:"Append requests to a persisted Docs batch instead of submitting"`
	Placement DocsBodyPlacementFlags `embed:""`
}

func (*DocsSectionBreakCmd) Run ¶

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

type DocsSectionColumnsCmd ¶

type DocsSectionColumnsCmd struct {
	DocID     string                 `arg:"" name:"docId" help:"Doc ID"`
	Count     int                    `name:"count" required:"" help:"Number of columns (1-3; 1 resets to one column)"`
	Separator string                 `name:"separator" help:"Column separator: none or between" default:"none"`
	Batch     string                 `name:"batch" help:"Append requests to a persisted Docs batch instead of submitting"`
	Placement DocsBodyPlacementFlags `embed:""`
}

func (*DocsSectionColumnsCmd) Run ¶

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

type DocsSedCmd ¶

type DocsSedCmd struct {
	DocID       string   `arg:"" name:"docId" help:"Doc ID"`
	Expression  string   `arg:"" optional:"" name:"expression" help:"sed expression: s/pattern/replacement/flags"`
	Expressions []string `short:"e" help:"Additional sed expressions (repeatable)"`
	File        string   `short:"f" help:"Read sed expressions from file (one per line, # comments)"`
	Tab         string   `name:"tab" help:"Tab title or ID for paragraph addressing"`
}

DocsSedCmd implements sed-like find-and-replace operations on Google Docs. It supports text replacement, regex, table operations, image insertion, and formatting.

func (*DocsSedCmd) Run ¶

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

type DocsStructureCmd ¶

type DocsStructureCmd struct {
	DocID string `arg:"" name:"docId" help:"Doc ID"`
	Tab   string `name:"tab" help:"Tab title or ID (omit for default)"`
}

func (*DocsStructureCmd) Run ¶

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

type DocsSuggestionsCmd ¶

type DocsSuggestionsCmd struct {
	List DocsSuggestionsListCmd `cmd:"" name:"list" aliases:"ls" help:"List pending text insertions and deletions"`
}

type DocsSuggestionsListCmd ¶

type DocsSuggestionsListCmd struct {
	DocID string `arg:"" name:"docId" help:"Doc ID"`
	Tab   string `name:"tab" help:"Tab title or ID (omit for the first tab)"`
}

func (*DocsSuggestionsListCmd) Run ¶

type DocsTableColumnCmd ¶

type DocsTableColumnCmd struct {
	Insert DocsTableColumnInsertCmd `cmd:"" name:"insert" aliases:"add,append" help:"Insert a native table column"`
	Delete DocsTableColumnDeleteCmd `cmd:"" name:"delete" aliases:"rm,remove,del" help:"Delete a native table column"`
}

type DocsTableColumnDeleteCmd ¶

type DocsTableColumnDeleteCmd struct {
	DocID string `arg:"" name:"docId" help:"Doc ID"`
	Table string `` /* 126-byte string literal not displayed */
	Col   int    `name:"col" required:"" help:"1-based column number; negative indexes count from the end"`
	Tab   string `name:"tab" help:"Target a specific tab by title or ID (see docs list-tabs)"`
}

func (*DocsTableColumnDeleteCmd) Run ¶

type DocsTableColumnInsertCmd ¶

type DocsTableColumnInsertCmd struct {
	DocID string `arg:"" name:"docId" help:"Doc ID"`
	Table string `` /* 126-byte string literal not displayed */
	At    string `name:"at" help:"Insert before this 1-based column, use a negative index from the end, or end" default:"end"`
	Tab   string `name:"tab" help:"Target a specific tab by title or ID (see docs list-tabs)"`
}

func (*DocsTableColumnInsertCmd) Run ¶

type DocsTableColumnWidthCmd ¶

type DocsTableColumnWidthCmd struct {
	DocID             string  `arg:"" name:"docId" help:"Doc ID"`
	TableIndex        int     `name:"table-index" help:"1-based table index in document order; negative indexes count from the end" default:"1"`
	Col               int     `name:"col" help:"1-based column number. Omit with --evenly-distributed to reset all columns."`
	Width             float64 `name:"width" help:"Fixed column width in points (minimum 5pt)"`
	EvenlyDistributed bool    `` /* 136-byte string literal not displayed */
	Tab               string  `name:"tab" help:"Target a specific tab by title or ID (see docs list-tabs)"`
	Batch             string  `name:"batch" help:"Append requests to a persisted Docs batch instead of submitting"`
}

func (*DocsTableColumnWidthCmd) Run ¶

type DocsTableMergeCmd ¶

type DocsTableMergeCmd struct {
	DocID string `arg:"" name:"docId" help:"Doc ID"`
	Table string `` /* 126-byte string literal not displayed */
	Range string `name:"range" required:"" help:"1-based cell range r1,c1:r2,c2"`
	Tab   string `name:"tab" help:"Target a specific tab by title or ID (see docs list-tabs)"`
}

func (*DocsTableMergeCmd) Run ¶

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

type DocsTablePinHeaderCmd ¶

type DocsTablePinHeaderCmd struct {
	DocID string `arg:"" name:"docId" help:"Doc ID"`
	Table string `` /* 126-byte string literal not displayed */
	Rows  int64  `name:"rows" required:"" help:"Number of leading rows to pin; 0 unpins all header rows"`
	Tab   string `name:"tab" help:"Target a specific tab by title or ID (see docs list-tabs)"`
}

func (*DocsTablePinHeaderCmd) Run ¶

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

type DocsTableRowCmd ¶

type DocsTableRowCmd struct {
	Insert    DocsTableRowInsertCmd `cmd:"" name:"insert" aliases:"add,append" help:"Insert a native table row"`
	Delete    DocsTableRowDeleteCmd `cmd:"" name:"delete" aliases:"rm,remove,del" help:"Delete a native table row"`
	Style     DocsTableRowStyleCmd  `cmd:"" name:"style" help:"Set native table row height and overflow styles"`
	PinHeader DocsTablePinHeaderCmd `cmd:"" name:"pin-header" help:"Pin or unpin leading table header rows"`
}

type DocsTableRowDeleteCmd ¶

type DocsTableRowDeleteCmd struct {
	DocID string `arg:"" name:"docId" help:"Doc ID"`
	Table string `` /* 126-byte string literal not displayed */
	Row   int    `name:"row" required:"" help:"1-based row number; negative indexes count from the end"`
	Tab   string `name:"tab" help:"Target a specific tab by title or ID (see docs list-tabs)"`
}

func (*DocsTableRowDeleteCmd) Run ¶

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

type DocsTableRowInsertCmd ¶

type DocsTableRowInsertCmd struct {
	DocID      string `arg:"" name:"docId" help:"Doc ID"`
	Table      string `` /* 126-byte string literal not displayed */
	At         string `name:"at" help:"Insert before this 1-based row, use a negative index from the end, or end" default:"end"`
	ValuesJSON string `name:"values-json" help:"Optional JSON string array containing the new row values"`
	Tab        string `name:"tab" help:"Target a specific tab by title or ID (see docs list-tabs)"`
}

func (*DocsTableRowInsertCmd) Run ¶

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

type DocsTableRowStyleCmd ¶

type DocsTableRowStyleCmd struct {
	DocID           string `arg:"" name:"docId" help:"Doc ID"`
	Table           string `` /* 126-byte string literal not displayed */
	Row             *int   `name:"row" help:"1-based row number; negative indexes count from the end; omit to style all rows"`
	MinHeight       string `name:"min-height" help:"Minimum row height (points by default; supports pt, in, cm, mm)"`
	PreventOverflow *bool  `name:"prevent-overflow" negatable:"" help:"Keep the row within one page or column; use --no-prevent-overflow to clear"`
	Tab             string `name:"tab" help:"Target a specific tab by title or ID (see docs list-tabs)"`
}

func (*DocsTableRowStyleCmd) Run ¶

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

type DocsTableUnmergeCmd ¶

type DocsTableUnmergeCmd struct {
	DocID string `arg:"" name:"docId" help:"Doc ID"`
	Table string `` /* 126-byte string literal not displayed */
	Cell  string `name:"cell" required:"" help:"1-based cell r,c inside the merged region"`
	Tab   string `name:"tab" help:"Target a specific tab by title or ID (see docs list-tabs)"`
}

func (*DocsTableUnmergeCmd) Run ¶

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

type DocsTablesCmd ¶

type DocsTablesCmd struct {
	List DocsTablesListCmd `cmd:"" name:"list" aliases:"ls" help:"List native tables in document order"`
}

type DocsTablesListCmd ¶

type DocsTablesListCmd struct {
	DocID string `arg:"" name:"docId" help:"Doc ID"`
	Tab   string `name:"tab" help:"Tab title or ID (omit for default)"`
}

func (*DocsTablesListCmd) Run ¶

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

type DocsTabsCmd ¶

type DocsTabsCmd struct {
	List   DocsListTabsCmd  `cmd:"" name:"list" aliases:"ls" help:"List all tabs in a Google Doc"`
	Add    DocsAddTabCmd    `cmd:"" name:"add" aliases:"create,new" help:"Add a tab to a Google Doc"`
	Rename DocsRenameTabCmd `cmd:"" name:"rename" aliases:"move" help:"Rename a tab in a Google Doc"`
	Delete DocsDeleteTabCmd `cmd:"" name:"delete" aliases:"rm,remove,del" help:"Delete a tab from a Google Doc"`
}

type DocsUpdateCmd ¶

type DocsUpdateCmd struct {
	DocID        string `arg:"" name:"docId" help:"Doc ID"`
	Text         string `name:"text" help:"Text to insert"`
	File         string `name:"file" help:"Text file path ('-' for stdin)"`
	Index        int64  `name:"index" help:"Insert index (default: end of document)"`
	ReplaceRange string `name:"replace-range" help:"Replace UTF-16 Docs API range START:END instead of inserting"`
	At           string `name:"at" help:"Anchor by literal text and replace that matched range"`
	Occurrence   *int   `name:"occurrence" help:"Use the Nth --at match (1-based; required when --at is ambiguous)"`
	MatchCase    bool   `name:"match-case" help:"Use case-sensitive --at matching"`
	Markdown     bool   `name:"markdown" help:"Convert markdown to Google Docs formatting"`
	Pageless     bool   `name:"pageless" help:"Set document to pageless mode"`
	Tab          string `name:"tab" help:"Target a specific tab by title or ID (see docs list-tabs)"`
	Segment      string `name:"segment" help:"Target an exact header, footer, or footnote segment ID"`
	TabID        string `name:"tab-id" hidden:"" help:"(deprecated) Use --tab"`
	Batch        string `name:"batch" help:"Append requests to a persisted Docs batch instead of submitting"`
}

func (*DocsUpdateCmd) Run ¶

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

type DocsWriteCmd ¶

type DocsWriteCmd struct {
	DocID        string          `arg:"" name:"docId" help:"Doc ID"`
	Text         string          `name:"text" help:"Text to write"`
	File         string          `name:"file" help:"Text file path ('-' for stdin)"`
	Replace      bool            `name:"replace" help:"Replace all content explicitly (required with --markdown unless --append is set)"`
	Markdown     bool            `name:"markdown" help:"Convert markdown to Google Docs formatting (requires --replace or --append)"`
	Append       bool            `name:"append" help:"Append instead of replacing the document body"`
	CheckOrphans bool            `name:"check-orphans" help:"Block markdown replacement when open comment quotes would disappear"`
	Pageless     bool            `name:"pageless" help:"Set document to pageless mode"`
	Layout       DocsLayoutFlags `embed:""`
	Tab          string          `name:"tab" help:"Target a specific tab by title or ID (see docs list-tabs)"`
	TabID        string          `name:"tab-id" hidden:"" help:"(deprecated) Use --tab"`
	Batch        string          `name:"batch" help:"Append requests to a persisted Docs batch instead of submitting"`
	Format       DocsFormatFlags `embed:""`
}

func (*DocsWriteCmd) Run ¶

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

type DriveActivityCmd ¶

type DriveActivityCmd struct {
	Query DriveActivityQueryCmd `cmd:"" name:"query" aliases:"list,ls" help:"Query Drive Activity API v2"`
}

type DriveActivityQueryCmd ¶

type DriveActivityQueryCmd struct {
	File        string `name:"file" aliases:"file-id" help:"Drive file ID to query"`
	Folder      string `name:"folder" aliases:"folder-id" help:"Drive folder ID; includes descendants"`
	Actions     string `` /* 136-byte string literal not displayed */
	From        string `name:"from" help:"Lower activity time bound (RFC3339)"`
	To          string `name:"to" help:"Upper activity time bound (RFC3339)"`
	Filter      string `name:"filter" help:"Raw Drive Activity filter expression appended with AND"`
	Max         int64  `name:"max" aliases:"limit" help:"Page size" default:"10"`
	Page        string `name:"page" aliases:"cursor" help:"Page token"`
	All         bool   `name:"all" aliases:"all-pages,allpages" help:"Fetch all pages"`
	Consolidate bool   `name:"consolidate" help:"Use Drive Activity legacy consolidation strategy"`
	FailEmpty   bool   `name:"fail-empty" aliases:"non-empty,require-results" help:"Exit with code 3 if no activities"`
}

func (*DriveActivityQueryCmd) Run ¶

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

type DriveAuditCmd ¶

type DriveAuditCmd struct {
	Sharing DriveAuditSharingCmd `cmd:"" name:"sharing" aliases:"permissions,perms,public,external" help:"Find public or external Drive permissions"`
	User    DriveAuditUserCmd    `cmd:"" name:"user" help:"Find Drive permissions granted to a user"`
}

type DriveAuditSharingCmd ¶

type DriveAuditSharingCmd struct {
	FileID         string   `name:"file" aliases:"file-id" help:"Audit one file ID instead of a folder tree"`
	Parent         string   `name:"parent" help:"Folder ID to scan (default: root)"`
	Depth          int      `name:"depth" help:"Max folder depth (0 = unlimited)" default:"2"`
	Max            int      `name:"max" help:"Max files/folders to scan (0 = unlimited)" default:"500"`
	InternalDomain []string `name:"internal-domain" help:"Domain treated as internal (can be repeated; defaults to account email domain)"`
	PublicOnly     bool     `name:"public-only" help:"Only report anyone-with-link/public permissions"`
	ExternalOnly   bool     `name:"external-only" help:"Only report external user/group/domain permissions"`
	AllDrives      bool     `` /* 130-byte string literal not displayed */
	FailFound      bool     `name:"fail-found" help:"Exit with code 3 when findings are present"`
}

func (*DriveAuditSharingCmd) Run ¶

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

type DriveAuditUserCmd ¶

type DriveAuditUserCmd struct {
	User      string `arg:"" name:"user" help:"User email to audit"`
	FileID    string `name:"file" aliases:"file-id" help:"Audit one file ID instead of a folder tree"`
	Parent    string `name:"parent" help:"Folder ID to scan (default: root)"`
	Depth     int    `name:"depth" help:"Max folder depth (0 = unlimited)" default:"2"`
	Max       int    `name:"max" help:"Max files/folders to scan (0 = unlimited)" default:"500"`
	AllDrives bool   `` /* 130-byte string literal not displayed */
	FailFound bool   `name:"fail-found" help:"Exit with code 3 when findings are present"`
}

func (*DriveAuditUserCmd) Run ¶

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

type DriveBulkCmd ¶

type DriveBulkCmd struct {
	RemovePublic DriveBulkRemovePublicCmd `cmd:"" name:"remove-public" help:"Remove anyone/public permissions across files"`
	UpdateRole   DriveBulkUpdateRoleCmd   `cmd:"" name:"update-role" help:"Change matching Drive permission roles across files"`
}

type DriveBulkRemovePublicCmd ¶

type DriveBulkRemovePublicCmd struct {
	FileID    string `name:"file" aliases:"file-id" help:"Update one file ID instead of a folder tree"`
	Parent    string `name:"parent" help:"Folder ID to scan (default: root)"`
	Depth     int    `name:"depth" help:"Max folder depth (0 = unlimited)" default:"2"`
	Max       int    `name:"max" help:"Max files/folders to scan (0 = unlimited)" default:"500"`
	AllDrives bool   `` /* 130-byte string literal not displayed */
}

func (*DriveBulkRemovePublicCmd) Run ¶

type DriveBulkUpdateRoleCmd ¶

type DriveBulkUpdateRoleCmd struct {
	FileID    string `name:"file" aliases:"file-id" help:"Update one file ID instead of a folder tree"`
	Parent    string `name:"parent" help:"Folder ID to scan (default: root)"`
	Depth     int    `name:"depth" help:"Max folder depth (0 = unlimited)" default:"2"`
	Max       int    `name:"max" help:"Max files/folders to scan (0 = unlimited)" default:"500"`
	AllDrives bool   `` /* 130-byte string literal not displayed */
	From      string `name:"from" help:"Current role to match (reader|commenter|writer)"`
	To        string `name:"to" help:"New role (reader|commenter|writer)"`
	Type      string `name:"type" help:"Optional permission type filter (user|group|domain|anyone)"`
	Target    string `name:"target" help:"Optional target email/domain filter"`
}

func (*DriveBulkUpdateRoleCmd) Run ¶

type DriveChangesCmd ¶

type DriveChangesCmd struct {
	StartToken DriveChangesStartTokenCmd `cmd:"" name:"start-token" aliases:"token" help:"Get a Drive changes start page token"`
	List       DriveChangesListCmd       `cmd:"" name:"list" aliases:"ls" help:"List Drive changes since a page token"`
	Poll       DriveChangesPollCmd       `cmd:"" name:"poll" help:"Poll Drive changes with a persisted page token"`
	Serve      DriveChangesServeCmd      `cmd:"" name:"serve" help:"Receive Drive change notifications and run a local hook"`
	Watch      DriveChangesWatchCmd      `cmd:"" name:"watch" help:"Watch Drive changes with a webhook channel"`
	Stop       DriveChangesStopCmd       `cmd:"" name:"stop" help:"Stop a Drive changes webhook channel"`
}

type DriveChangesListCmd ¶

type DriveChangesListCmd struct {
	Token          string `name:"token" required:"" help:"Start page token or next page token"`
	Max            int64  `name:"max" aliases:"limit" help:"Max results" default:"100"`
	Page           string `name:"page" aliases:"cursor" help:"Alias for --token when continuing a page"`
	All            bool   `name:"all" aliases:"all-pages,allpages" help:"Fetch all pages"`
	IncludeRemoved bool   `name:"include-removed" help:"Include removed changes" default:"true" negatable:"_"`
	DriveID        string `name:"drive" aliases:"drive-id" help:"Shared drive ID for a shared-drive change log"`
	FailEmpty      bool   `name:"fail-empty" aliases:"non-empty,require-results" help:"Exit with code 3 if no changes"`
}

func (*DriveChangesListCmd) Run ¶

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

type DriveChangesPollCmd ¶

type DriveChangesPollCmd struct {
	StateFile      string        `name:"state-file" required:"" help:"JSON file that stores the current Drive page token"`
	Interval       time.Duration `name:"interval" help:"Delay between polls" default:"60s"`
	OnChange       string        `name:"on-change" help:"Trusted local shell command run for each non-empty batch; batch JSON is provided on stdin"`
	FilterFile     string        `name:"filter-file" help:"Only emit and invoke the hook for changes to this file ID"`
	DriveID        string        `name:"drive" aliases:"drive-id" help:"Shared drive ID for a shared-drive change log"`
	MaxIterations  int           `name:"max-iterations" help:"Stop after N polls; 0 runs until interrupted" default:"0"`
	Max            int64         `name:"max" aliases:"limit" help:"Max changes per API page" default:"100"`
	IncludeRemoved bool          `name:"include-removed" help:"Include removed changes" default:"true" negatable:"_"`
}

func (*DriveChangesPollCmd) Run ¶

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

type DriveChangesServeCmd ¶

type DriveChangesServeCmd struct {
	Listen              string        `name:"listen" help:"Listen address" default:"127.0.0.1:8443"`
	Path                string        `name:"path" help:"Notification handler path" default:"/drive-changes"`
	Cert                string        `name:"cert" help:"TLS certificate path; pair with --key (omit behind an HTTPS reverse proxy)"`
	Key                 string        `name:"key" help:"TLS private key path; pair with --cert"`
	ChannelToken        string        `name:"channel-token" help:"Expected X-Goog-Channel-Token value"`
	ChannelTokenFile    string        `name:"channel-token-file" type:"path" help:"Read the expected channel token from a file"`
	StateFile           string        `name:"state-file" required:"" help:"JSON file that stores the current Drive page token and channel state"`
	Token               string        `name:"token" help:"Initial Drive page token when creating a new state file"`
	OnChange            string        `name:"on-change" help:"Trusted local shell command run for each non-empty change batch; event JSON is provided on stdin"`
	FilterFile          string        `name:"filter-file" help:"Only invoke the hook for changes to this file ID"`
	DriveID             string        `name:"drive" aliases:"drive-id" help:"Shared drive ID for a shared-drive change log"`
	Max                 int64         `name:"max" aliases:"limit" help:"Max changes per API page" default:"100"`
	IncludeRemoved      bool          `name:"include-removed" help:"Include removed changes" default:"true" negatable:"_"`
	AutoRenew           bool          `name:"auto-renew" help:"Create and renew the Drive notification channel"`
	WebhookURL          string        `name:"webhook-url" help:"Public HTTPS callback URL used by --auto-renew"`
	ChannelTTL          time.Duration `name:"channel-ttl" help:"Requested channel lifetime" default:"24h"`
	RenewBefore         time.Duration `name:"renew-before" help:"Renew this long before channel expiration" default:"10m"`
	NotificationTimeout time.Duration `name:"notification-timeout" help:"Maximum time for one callback, including Drive reads and the hook" default:"5m"`
}

func (*DriveChangesServeCmd) Run ¶

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

type DriveChangesStartTokenCmd ¶

type DriveChangesStartTokenCmd struct {
	DriveID string `name:"drive" aliases:"drive-id" help:"Shared drive ID for a shared-drive change log"`
}

func (*DriveChangesStartTokenCmd) Run ¶

type DriveChangesStopCmd ¶

type DriveChangesStopCmd struct {
	ChannelID  string `arg:"" name:"channelId" help:"Webhook channel ID"`
	ResourceID string `arg:"" name:"resourceId" help:"Webhook resource ID returned by watch"`
}

func (*DriveChangesStopCmd) Run ¶

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

type DriveChangesWatchCmd ¶

type DriveChangesWatchCmd struct {
	Token        string `name:"token" required:"" help:"Start page token or next page token to watch from"`
	WebhookURL   string `name:"webhook-url" required:"" help:"HTTPS webhook URL for Drive change notifications"`
	ChannelID    string `name:"channel-id" help:"Webhook channel ID (default: generated)"`
	ChannelToken string `name:"channel-token" help:"Opaque token echoed by Google in webhook notifications"`
	ExpirationMS int64  `name:"expiration-ms" help:"Unix epoch milliseconds when the channel should expire"`
	DriveID      string `name:"drive" aliases:"drive-id" help:"Shared drive ID for a shared-drive change log"`
}

func (*DriveChangesWatchCmd) Run ¶

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

type DriveCmd ¶

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"`
	Tree        DriveTreeCmd        `cmd:"" name:"tree" help:"Print a read-only folder tree"`
	Du          DriveDuCmd          `cmd:"" name:"du" help:"Summarize Drive folder sizes"`
	Inventory   DriveInventoryCmd   `cmd:"" name:"inventory" help:"Export a read-only Drive inventory"`
	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"`
	Sync        DriveSyncCmd        `cmd:"" name:"sync" help:"Reconcile local files with Drive"`
	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"`
	Shortcut    DriveShortcutCmd    `cmd:"" name:"shortcut" aliases:"shortcuts" help:"Manage shortcuts to Drive files and folders"`
	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"`
	Audit       DriveAuditCmd       `cmd:"" name:"audit" help:"Audit Drive sharing without mutation"`
	Bulk        DriveBulkCmd        `cmd:"" name:"bulk" help:"Bulk Drive permission operations"`
	Labels      DriveLabelsCmd      `cmd:"" name:"labels" aliases:"label" help:"Read and modify Drive labels"`
	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)"`
	Revisions   DriveRevisionsCmd   `cmd:"" name:"revisions" aliases:"revision" help:"List and inspect file revisions"`
	Changes     DriveChangesCmd     `cmd:"" name:"changes" help:"Track Drive changes for sync and automation"`
	Activity    DriveActivityCmd    `cmd:"" name:"activity" help:"Query Drive Activity audit events"`
	Raw         DriveRawCmd         `cmd:"" name:"raw" help:"Dump raw Google Drive API response as JSON (Files.Get; lossless; for scripting and LLM consumption)"`
}

type DriveCommentReplyCmd ¶

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"`
	Action    string `` /* 136-byte string literal not displayed */
}

func (*DriveCommentReplyCmd) Run ¶

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

type DriveCommentsCmd ¶

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"`
	Resolve DriveCommentsResolveCmd `cmd:"" name:"resolve" help:"Resolve a comment (mark as done)"`
	Reopen  DriveCommentsReopenCmd  `cmd:"" name:"reopen" help:"Reopen a previously resolved comment"`
}

DriveCommentsCmd is the parent command for comments subcommands

type DriveCommentsCreateCmd ¶

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 ¶

type DriveCommentsDeleteCmd ¶

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

func (*DriveCommentsDeleteCmd) Run ¶

type DriveCommentsGetCmd ¶

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

func (*DriveCommentsGetCmd) Run ¶

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

type DriveCommentsListCmd ¶

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"`
	Since         string `name:"since" help:"Only return comments modified at or after this RFC3339 timestamp"`
}

func (*DriveCommentsListCmd) Run ¶

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

type DriveCommentsReopenCmd ¶

type DriveCommentsReopenCmd struct {
	FileID    string `arg:"" name:"fileId" help:"File ID"`
	CommentID string `arg:"" name:"commentId" help:"Comment ID"`
	Message   string `name:"message" short:"m" help:"Optional message to include when reopening"`
}

DriveCommentsReopenCmd reopens a previously resolved comment by posting an action="reopen" reply.

func (*DriveCommentsReopenCmd) Run ¶

type DriveCommentsResolveCmd ¶

type DriveCommentsResolveCmd struct {
	FileID    string `arg:"" name:"fileId" help:"File ID"`
	CommentID string `arg:"" name:"commentId" help:"Comment ID"`
	Message   string `name:"message" short:"m" help:"Optional message to include when resolving"`
}

DriveCommentsResolveCmd resolves a comment by posting an action="resolve" reply.

func (*DriveCommentsResolveCmd) Run ¶

type DriveCommentsUpdateCmd ¶

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 ¶

type DriveCopyCmd ¶

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 ¶

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

type DriveDeleteCmd ¶

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 ¶

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

type DriveDownloadCmd ¶

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|md (default: inferred)"`
	Tab       string         `name:"tab" help:"(experimental) Export a specific tab by title or ID (Google Docs only; see 'gog docs list-tabs')"`
	Overwrite bool           `name:"overwrite" help:"Overwrite an existing output file"`
}

func (*DriveDownloadCmd) Run ¶

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

type DriveDrivesCmd ¶

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 ¶

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

type DriveDuCmd ¶

type DriveDuCmd struct {
	Parent    string `name:"parent" help:"Folder ID to start from (default: root)"`
	Depth     int    `name:"depth" help:"Depth for folder totals" default:"1"`
	Max       int    `name:"max" help:"Max folders to return (0 = unlimited)" default:"50"`
	Sort      string `name:"sort" help:"Sort by size|path|files" enum:"size,path,files" default:"size"`
	Order     string `name:"order" help:"Sort order" enum:"asc,desc" default:"desc"`
	AllDrives bool   `` /* 130-byte string literal not displayed */
}

func (*DriveDuCmd) Run ¶

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

type DriveGetCmd ¶

type DriveGetCmd struct {
	FileID string `arg:"" name:"fileId" help:"File ID"`
	Fields string `name:"fields" help:"Drive API field mask (overrides the default set; e.g. 'id,name,thumbnailLink')"`
}

func (*DriveGetCmd) Run ¶

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

type DriveInventoryCmd ¶

type DriveInventoryCmd struct {
	Parent    string `name:"parent" help:"Folder ID to start from (default: root)"`
	Depth     int    `name:"depth" help:"Max depth (0 = unlimited)" default:"0"`
	Max       int    `name:"max" help:"Max items to return (0 = unlimited)" default:"500"`
	Sort      string `name:"sort" help:"Sort by path|size|modified" enum:"path,size,modified" default:"path"`
	Order     string `name:"order" help:"Sort order" enum:"asc,desc" default:"asc"`
	AllDrives bool   `` /* 130-byte string literal not displayed */
}

func (*DriveInventoryCmd) Run ¶

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

type DriveLabelsCmd ¶

type DriveLabelsCmd struct {
	List DriveLabelsListCmd `cmd:"" name:"list" aliases:"ls" help:"List Drive label schemas"`
	Get  DriveLabelsGetCmd  `cmd:"" name:"get" aliases:"info,show" help:"Get a Drive label schema"`
	File DriveLabelsFileCmd `cmd:"" name:"file" help:"List, apply, or remove labels on Drive files"`
}

type DriveLabelsFileApplyCmd ¶

type DriveLabelsFileApplyCmd struct {
	FileID     string   `arg:"" name:"fileId" help:"Drive file ID"`
	LabelID    string   `arg:"" name:"labelId" help:"Label ID or labels/{id}"`
	Text       []string `name:"text" help:"Set text field as field=value (repeatable)"`
	Selection  []string `name:"selection" help:"Set selection field as field=choiceId[,choiceId] (repeatable)"`
	Integer    []string `name:"integer" help:"Set integer field as field=123[,456] (repeatable)"`
	Date       []string `name:"date" help:"Set date field as field=YYYY-MM-DD[,YYYY-MM-DD] (repeatable)"`
	User       []string `name:"user" help:"Set user field as field=email[,email] (repeatable)"`
	Unset      []string `name:"unset" help:"Unset field ID (repeatable)"`
	FieldsJSON string   `` /* 126-byte string literal not displayed */
}

func (*DriveLabelsFileApplyCmd) Run ¶

type DriveLabelsFileCmd ¶

type DriveLabelsFileCmd struct {
	List   DriveLabelsFileListCmd   `cmd:"" name:"list" aliases:"ls" help:"List labels applied to a Drive file"`
	Apply  DriveLabelsFileApplyCmd  `cmd:"" name:"apply" help:"Apply or update a label on a Drive file"`
	Remove DriveLabelsFileRemoveCmd `cmd:"" name:"remove" aliases:"rm" help:"Remove a label from a Drive file"`
}

type DriveLabelsFileListCmd ¶

type DriveLabelsFileListCmd struct {
	FileID string `arg:"" name:"fileId" help:"Drive file ID"`
	Max    int64  `name:"max" aliases:"limit" help:"Max results" default:"100"`
	Page   string `name:"page" aliases:"cursor" help:"Page token"`
	Fields string `name:"fields" help:"Drive API field mask override"`
}

func (*DriveLabelsFileListCmd) Run ¶

type DriveLabelsFileRemoveCmd ¶

type DriveLabelsFileRemoveCmd struct {
	FileID  string `arg:"" name:"fileId" help:"Drive file ID"`
	LabelID string `arg:"" name:"labelId" help:"Label ID or labels/{id}"`
}

func (*DriveLabelsFileRemoveCmd) Run ¶

type DriveLabelsGetCmd ¶

type DriveLabelsGetCmd struct {
	Name        string `arg:"" name:"name" help:"Label name or ID (labels/{id} accepted)"`
	Language    string `name:"language" help:"BCP-47 language code"`
	View        string `name:"view" help:"Label view: LABEL_VIEW_BASIC|LABEL_VIEW_FULL" default:"LABEL_VIEW_FULL"`
	AdminAccess bool   `name:"admin-access" help:"Use admin access for Workspace admin accounts"`
	Fields      string `name:"fields" help:"Drive Labels API field mask override"`
}

func (*DriveLabelsGetCmd) Run ¶

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

type DriveLabelsListCmd ¶

type DriveLabelsListCmd struct {
	Max           int64  `name:"max" aliases:"limit" help:"Max results" default:"50"`
	Page          string `name:"page" aliases:"cursor" help:"Page token"`
	Customer      string `name:"customer" help:"Customer resource (for example customers/123abc789); Google Workspace customer required"`
	Language      string `name:"language" help:"BCP-47 language code"`
	View          string `name:"view" help:"Label view: LABEL_VIEW_BASIC|LABEL_VIEW_FULL" default:"LABEL_VIEW_BASIC"`
	MinimumRole   string `name:"minimum-role" help:"Minimum role filter (for example READER, APPLIER, ORGANIZER)"`
	PublishedOnly bool   `name:"published-only" help:"Only list published labels" default:"true" negatable:"_"`
	AdminAccess   bool   `name:"admin-access" help:"Use admin access for Workspace admin accounts"`
	Fields        string `name:"fields" help:"Drive Labels API field mask override"`
}

func (*DriveLabelsListCmd) Run ¶

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

type DriveLsCmd ¶

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)"`
	All       bool   `name:"all" aliases:"global" help:"List all accessible files (mutually exclusive with --parent)"`
	AllDrives bool   `` /* 130-byte string literal not displayed */
	Fields    string `name:"fields" help:"Drive API field mask (overrides the default set; e.g. 'files(id,name,thumbnailLink),nextPageToken')"`
}

func (*DriveLsCmd) Run ¶

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

type DriveMkdirCmd ¶

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

func (*DriveMkdirCmd) Run ¶

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

type DriveMoveCmd ¶

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

func (*DriveMoveCmd) Run ¶

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

type DrivePermissionsCmd ¶

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 ¶

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

type DriveRawCmd ¶

type DriveRawCmd struct {
	FileID string `arg:"" name:"fileId" help:"File ID"`
	Fields string `` /* 135-byte string literal not displayed */
	Pretty bool   `name:"pretty" help:"Pretty-print JSON (default: compact single-line)"`
}

DriveRawCmd dumps the full Files.Get response as JSON. Uses fields=* by default to expose the entire File resource. When --fields is absent the command redacts a small set of capability/token-shaped fields (see driveRawSensitiveFields); when --fields is explicitly set the response is returned verbatim, honoring exactly what the user asked for. This means passing `--fields "id,name,thumbnailLink"` returns thumbnailLink as requested.

REST reference: https://developers.google.com/drive/api/reference/rest/v3/files/get Go type: https://pkg.go.dev/google.golang.org/api/drive/v3#File

func (*DriveRawCmd) Run ¶

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

type DriveRenameCmd ¶

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

func (*DriveRenameCmd) Run ¶

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

type DriveRevisionsCmd ¶

type DriveRevisionsCmd struct {
	List DriveRevisionsListCmd `cmd:"" name:"list" aliases:"ls" help:"List revisions for a file"`
	Get  DriveRevisionsGetCmd  `cmd:"" name:"get" help:"Get revision metadata"`
}

type DriveRevisionsGetCmd ¶

type DriveRevisionsGetCmd struct {
	FileID     string `arg:"" name:"fileId" help:"File ID"`
	RevisionID string `arg:"" name:"revisionId" help:"Revision ID"`
}

func (*DriveRevisionsGetCmd) Run ¶

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

type DriveRevisionsListCmd ¶

type DriveRevisionsListCmd struct {
	FileID    string `arg:"" name:"fileId" help:"File ID"`
	Max       int64  `name:"max" aliases:"limit" help:"Max results" default:"200"`
	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 revisions"`
}

func (*DriveRevisionsListCmd) Run ¶

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

type DriveSearchCmd ¶

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 */
	Drive     string   `` /* 196-byte string literal not displayed */
	Parent    string   `` /* 140-byte string literal not displayed */
}

func (*DriveSearchCmd) Run ¶

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

type DriveShareCmd ¶

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|commenter" default:"reader"`
	Discoverable bool   `name:"discoverable" help:"Allow file discovery in search (anyone/domain only)"`
	Notify       bool   `name:"notify" help:"Send Drive invitation email for user/domain shares"`
}

func (*DriveShareCmd) Run ¶

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

type DriveShortcutCmd ¶

type DriveShortcutCmd struct {
	Create DriveShortcutCreateCmd `cmd:"" name:"create" aliases:"add,new" help:"Create a shortcut to a Drive file or folder"`
}

type DriveShortcutCreateCmd ¶

type DriveShortcutCreateCmd struct {
	TargetID string `arg:"" name:"targetId" help:"Target file or folder ID"`
	Parent   string `name:"parent" help:"Destination folder ID (required)"`
	Name     string `name:"name" help:"Shortcut name (default: target name)"`
}

func (*DriveShortcutCreateCmd) Run ¶

type DriveSyncCmd ¶

type DriveSyncCmd struct {
	Push DriveSyncPushCmd `cmd:"" name:"push" help:"Push a local directory's contents into a Drive folder (no remote deletes)"`
}

type DriveSyncPushCmd ¶

type DriveSyncPushCmd struct {
	LocalDir  string `arg:"" name:"localDirectory" help:"Local directory to push" type:"path"`
	Parent    string `name:"parent" help:"Existing destination Drive folder ID" required:""`
	AllDrives bool   `` /* 130-byte string literal not displayed */
}

func (*DriveSyncPushCmd) Run ¶

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

type DriveTreeCmd ¶

type DriveTreeCmd struct {
	Parent    string `name:"parent" help:"Folder ID to start from (default: root)"`
	Depth     int    `name:"depth" help:"Max depth (0 = unlimited)" default:"2"`
	Max       int    `name:"max" help:"Max items to return (0 = unlimited)" default:"0"`
	AllDrives bool   `` /* 130-byte string literal not displayed */
}

func (*DriveTreeCmd) Run ¶

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

type DriveURLCmd ¶

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

func (*DriveURLCmd) Run ¶

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

type DriveUnshareCmd ¶

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

func (*DriveUnshareCmd) Run ¶

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

type DriveUploadCmd ¶

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 `` /* 148-byte string literal not displayed */
	IfVersion           *int64 `` /* 200-byte string literal not displayed */
	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)"`
	KeepFrontmatter     bool   `` /* 150-byte string literal not displayed */
}

func (*DriveUploadCmd) Run ¶

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

type DriveUploader ¶

type DriveUploader struct {
	Svc *drive.Service
}

DriveUploader implements Uploader by writing temporary files to Drive, granting public read access, and reading the WebContentLink. Mirrors the pattern in slides_add_slide.go.

func (*DriveUploader) DeleteAsset ¶

func (d *DriveUploader) DeleteAsset(ctx context.Context, fileID string) error

func (*DriveUploader) UploadAsset ¶

func (d *DriveUploader) UploadAsset(ctx context.Context, name, mime string, body []byte) (ImageRef, error)

type ExitError ¶

type ExitError struct {
	Code int
	Err  error
}

func (*ExitError) Error ¶

func (e *ExitError) Error() string

func (*ExitError) Unwrap ¶

func (e *ExitError) Unwrap() error

type FormsAddQuestionCmd ¶

type FormsAddQuestionCmd struct {
	FormID   string   `arg:"" name:"formId" help:"Form ID"`
	Title    string   `name:"title" help:"Question title/text" required:""`
	Type     string   `name:"type" help:"Question type: text|paragraph|radio|checkbox|dropdown|scale|date|time" default:"text"`
	Required bool     `name:"required" help:"Whether an answer is required"`
	Options  []string `name:"option" help:"Choice options (for radio/checkbox/dropdown, repeat for each)" short:"o"`
	Index    int      `name:"index" help:"Position to insert (0-based, default append)" default:"-1"`
	Correct  []string `name:"correct" help:"Correct answer value for quiz grading (repeat for multiple accepted/checkbox answers)"`
	Points   int      `name:"points" help:"Positive quiz points for the question when --correct is set"`

	// Scale-specific
	ScaleLow       int    `name:"scale-low" help:"Scale minimum value: 0 or 1" default:"1"`
	ScaleHigh      int    `name:"scale-high" help:"Scale maximum value: 2 through 10" default:"5"`
	ScaleLowLabel  string `name:"scale-low-label" help:"Label for low end of scale"`
	ScaleHighLabel string `name:"scale-high-label" help:"Label for high end of scale"`

	// Date/time specific
	IncludeTime bool `name:"include-time" help:"Include time picker (for date type)"`
	IncludeYear bool `name:"include-year" help:"Include year field (for date type)"`
	Duration    bool `name:"duration" help:"Ask for duration instead of time (for time type)"`

	Description string `name:"description" help:"Question description/help text"`
}

FormsAddQuestionCmd adds a question to an existing form via batchUpdate.

func (*FormsAddQuestionCmd) Run ¶

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

type FormsCmd ¶

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"`
	Update         FormsUpdateCmd         `cmd:"" name:"update" aliases:"edit" help:"Update form title, description, or settings"`
	Publish        FormsPublishCmd        `cmd:"" name:"publish" help:"Publish or unpublish a form"`
	Questions      FormsQuestionsCmd      `cmd:"" name:"questions" help:"Form questions"`
	AddQuestion    FormsAddQuestionCmd    `cmd:"" name:"add-question" aliases:"add-q,aq" help:"Add a question to a form"`
	DeleteQuestion FormsDeleteQuestionCmd `cmd:"" name:"delete-question" aliases:"delete-q,dq,rm-q" help:"Delete a question by index"`
	MoveQuestion   FormsMoveQuestionCmd   `cmd:"" name:"move-question" aliases:"move-q,mq" help:"Move a question to a new position"`
	Responses      FormsResponsesCmd      `cmd:"" name:"responses" help:"Form responses"`
	Watch          FormsWatchCmd          `cmd:"" name:"watch" aliases:"watches" help:"Response watches (push notifications)"`
	Raw            FormsRawCmd            `cmd:"" name:"raw" help:"Dump raw Google Forms API response as JSON (Forms.Get; lossless; for scripting and LLM consumption)"`
}

type FormsCreateCmd ¶

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

func (*FormsCreateCmd) Run ¶

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

type FormsDeleteQuestionCmd ¶

type FormsDeleteQuestionCmd struct {
	FormID string `arg:"" name:"formId" help:"Form ID"`
	Index  int    `arg:"" name:"index" help:"Question index (0-based)"`
}

FormsDeleteQuestionCmd removes a question from a form by index.

func (*FormsDeleteQuestionCmd) Run ¶

type FormsGetCmd ¶

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

func (*FormsGetCmd) Run ¶

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

type FormsMoveQuestionCmd ¶

type FormsMoveQuestionCmd struct {
	FormID   string `arg:"" name:"formId" help:"Form ID"`
	OldIndex int    `arg:"" name:"oldIndex" help:"Current question index (0-based)"`
	NewIndex int    `arg:"" name:"newIndex" help:"Target question index (0-based)"`
}

FormsMoveQuestionCmd moves a question to a new position.

func (*FormsMoveQuestionCmd) Run ¶

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

type FormsPublishCmd ¶

type FormsPublishCmd struct {
	FormID             string `arg:"" name:"formId" help:"Form ID"`
	Unpublish          bool   `name:"unpublish" help:"Unpublish the form instead of publishing it"`
	AcceptingResponses bool   `name:"accepting-responses" help:"Whether a published form accepts responses" default:"true"`
}

FormsPublishCmd publishes a form via forms.setPublishSettings.

func (*FormsPublishCmd) Run ¶

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

type FormsQuestionsCmd ¶

type FormsQuestionsCmd struct {
	Add    FormsAddQuestionCmd    `cmd:"" name:"add" aliases:"create,new" help:"Add a question to a form"`
	Delete FormsDeleteQuestionCmd `cmd:"" name:"delete" aliases:"rm,remove,del" help:"Delete a question by index"`
	Move   FormsMoveQuestionCmd   `cmd:"" name:"move" help:"Move a question to a new position"`
}

type FormsRawCmd ¶

type FormsRawCmd struct {
	FormID string `arg:"" name:"formId" help:"Form ID"`
	Pretty bool   `name:"pretty" help:"Pretty-print JSON (default: compact single-line)"`
}

FormsRawCmd dumps the full Forms.Get response as JSON.

REST reference: https://developers.google.com/forms/api/reference/rest/v1/forms/get Go type: https://pkg.go.dev/google.golang.org/api/forms/v1#Form

func (*FormsRawCmd) Run ¶

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

type FormsResponseGetCmd ¶

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

func (*FormsResponseGetCmd) Run ¶

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

type FormsResponsesCmd ¶

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 ¶

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 ¶

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

type FormsUpdateCmd ¶

type FormsUpdateCmd struct {
	FormID      string `arg:"" name:"formId" help:"Form ID"`
	Title       string `name:"title" help:"New form title"`
	Description string `name:"description" help:"New form description"`
	IsQuiz      string `name:"quiz" help:"Enable quiz mode (true/false)"`
}

FormsUpdateCmd modifies form title, description, or settings.

func (*FormsUpdateCmd) Run ¶

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

type FormsWatchCmd ¶

type FormsWatchCmd struct {
	Create FormsWatchCreateCmd `cmd:"" name:"create" aliases:"new,add" help:"Create a watch for new responses"`
	List   FormsWatchListCmd   `cmd:"" name:"list" aliases:"ls" help:"List active watches"`
	Delete FormsWatchDeleteCmd `cmd:"" name:"delete" aliases:"rm,remove" help:"Delete a watch"`
	Renew  FormsWatchRenewCmd  `cmd:"" name:"renew" aliases:"refresh" help:"Renew a watch (extends 7 days)"`
}

FormsWatchCmd groups watch subcommands.

type FormsWatchCreateCmd ¶

type FormsWatchCreateCmd struct {
	FormID    string `arg:"" name:"formId" help:"Form ID"`
	TopicID   string `name:"topic" help:"Cloud Pub/Sub topic name (projects/{project}/topics/{topic})" required:""`
	EventType string `name:"event-type" help:"Event type to watch" default:"RESPONSES" enum:"RESPONSES,SCHEMA"`
}

FormsWatchCreateCmd creates a push notification watch on form responses.

func (*FormsWatchCreateCmd) Run ¶

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

type FormsWatchDeleteCmd ¶

type FormsWatchDeleteCmd struct {
	FormID  string `arg:"" name:"formId" help:"Form ID"`
	WatchID string `arg:"" name:"watchId" help:"Watch ID"`
}

FormsWatchDeleteCmd removes a watch.

func (*FormsWatchDeleteCmd) Run ¶

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

type FormsWatchListCmd ¶

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

FormsWatchListCmd lists active watches for a form.

func (*FormsWatchListCmd) Run ¶

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

type FormsWatchRenewCmd ¶

type FormsWatchRenewCmd struct {
	FormID  string `arg:"" name:"formId" help:"Form ID"`
	WatchID string `arg:"" name:"watchId" help:"Watch ID"`
}

FormsWatchRenewCmd renews an existing watch for another 7 days.

func (*FormsWatchRenewCmd) Run ¶

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

type GmailArchiveCmd ¶

type GmailArchiveCmd struct {
	MessageIDs []string `arg:"" optional:"" name:"messageId" help:"Message IDs to archive, or thread IDs with --thread"`
	Query      string   `name:"query" short:"q" help:"Archive all messages matching this Gmail search query"`
	Max        int64    `name:"max" aliases:"limit" help:"Max messages to archive (with --query)" default:"100"`
	Thread     bool     `name:"thread" help:"Treat positional IDs as thread IDs and archive every message in each thread"`
}

GmailArchiveCmd archives messages (removes INBOX label).

func (*GmailArchiveCmd) Run ¶

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

type GmailAttachmentCmd ¶

type GmailAttachmentCmd struct {
	MessageID               string         `arg:"" name:"messageId" help:"Message ID"`
	AttachmentID            string         `arg:"" name:"attachmentId" help:"Attachment ID, or a 0-based index with --use-indexed-attachment-ids"`
	UseIndexedAttachmentIDs bool           `` /* 185-byte string literal not displayed */
	Output                  OutputPathFlag `embed:""`
	Name                    string         `name:"name" help:"Filename (used when --out is empty or points to a directory)"`
	Inline                  bool           `` /* 196-byte string literal not displayed */
	InlineMaxBytes          int            `` /* 129-byte string literal not displayed */
}

func (*GmailAttachmentCmd) Run ¶

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

type GmailAutoForwardCmd ¶

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 ¶

type GmailAutoForwardGetCmd struct{}

func (*GmailAutoForwardGetCmd) Run ¶

type GmailAutoForwardUpdateCmd ¶

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 ¶

type GmailAutoReplyCmd ¶

type GmailAutoReplyCmd struct {
	Query     []string `arg:"" name:"query" help:"Search query"`
	Max       int64    `name:"max" aliases:"limit" help:"Max matching messages to inspect" default:"20"`
	Subject   string   `name:"subject" help:"Override reply subject (default: reply to original subject)"`
	Body      string   `name:"body" help:"Reply body (plain text; required unless --body-html is set)"`
	BodyFile  string   `name:"body-file" help:"Reply body file path (plain text; '-' for stdin)"`
	BodyHTML  string   `name:"body-html" help:"Reply body HTML"`
	From      string   `name:"from" help:"Send from this email address (must be a verified send-as alias)"`
	ReplyTo   string   `name:"reply-to" help:"Reply-To header address"`
	Label     string   `name:"label" help:"Label to add after replying (used for dedupe)" default:"AutoReplied"`
	Archive   bool     `name:"archive" help:"Archive threads after auto-replying"`
	MarkRead  bool     `name:"mark-read" help:"Mark threads as read after auto-replying"`
	SkipBulk  bool     `name:"skip-bulk" help:"Skip auto-generated/list mail" default:"true"`
	AllowSelf bool     `name:"allow-self" help:"Allow replying to messages sent by your own account/alias"`
}

func (*GmailAutoReplyCmd) Run ¶

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

type GmailBatchCmd ¶

type GmailBatchCmd struct {
	Delete GmailBatchDeleteCmd `` /* 169-byte string literal not displayed */
	Modify GmailBatchModifyCmd `cmd:"" name:"modify" aliases:"update,edit,set" help:"Modify labels on multiple messages"`
}

type GmailBatchDeleteCmd ¶

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

func (*GmailBatchDeleteCmd) Run ¶

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

type GmailBatchModifyCmd ¶

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 ¶

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

type GmailCmd ¶

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)"`
	Raw        GmailRawCmd        `` /* 139-byte string literal not displayed */
	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    `` /* 145-byte string literal not displayed */
	Archive GmailArchiveCmd  `cmd:"" name:"archive" group:"Organize" help:"Archive messages or explicit threads (remove from inbox)"`
	Read    GmailReadCmd     `cmd:"" name:"mark-read" aliases:"read-messages" group:"Organize" help:"Mark messages as read"`
	Unread  GmailUnreadCmd   `cmd:"" name:"unread" aliases:"mark-unread" group:"Organize" help:"Mark messages as unread"`
	Trash   GmailTrashMsgCmd `cmd:"" name:"trash" group:"Organize" help:"Move messages to trash"`

	Send      GmailSendCmd      `cmd:"" name:"send" group:"Write" help:"Send an email"`
	Import    GmailImportCmd    `cmd:"" name:"import" group:"Write" help:"Import an RFC822/EML message into Gmail"`
	Reply     GmailReplyCmd     `cmd:"" name:"reply" group:"Write" help:"Reply to a message"`
	ReplyAll  GmailReplyAllCmd  `cmd:"" name:"reply-all" aliases:"replyall" group:"Write" help:"Reply to all message participants"`
	Forward   GmailForwardCmd   `cmd:"" name:"forward" aliases:"fwd" group:"Write" help:"Forward a message to new recipients"`
	AutoReply GmailAutoReplyCmd `cmd:"" name:"autoreply" group:"Write" help:"Reply once to matching messages"`
	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"`

	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 ¶

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

func (*GmailDelegatesAddCmd) Run ¶

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

type GmailDelegatesCmd ¶

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 ¶

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

func (*GmailDelegatesGetCmd) Run ¶

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

type GmailDelegatesListCmd ¶

type GmailDelegatesListCmd struct{}

func (*GmailDelegatesListCmd) Run ¶

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

type GmailDelegatesRemoveCmd ¶

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

func (*GmailDelegatesRemoveCmd) Run ¶

type GmailDraftsCmd ¶

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   `` /* 127-byte string literal not displayed */
	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"`
	Reply    GmailDraftsReplyCmd    `cmd:"" name:"reply" help:"Save a reply as a draft"`
	ReplyAll GmailDraftsReplyAllCmd `cmd:"" name:"reply-all" aliases:"replyall" help:"Save a reply-all as a draft"`
	Forward  GmailDraftsForwardCmd  `cmd:"" name:"forward" aliases:"fwd" help:"Save a forward as a draft"`
}

type GmailDraftsCreateCmd ¶

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)"`
	BodyHTMLFile           string   `name:"body-html-file" help:"HTML body file path ('-' for stdin)"`
	ReplyToMessageID       string   `name:"reply-to-message-id" 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"`
	Quote                  bool     `name:"quote" help:"Include quoted original message in reply (requires --reply-to-message-id or --thread-id)"`
	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)"`
	AutoFromAddressedAlias bool     `` /* 177-byte string literal not displayed */
}

func (*GmailDraftsCreateCmd) Run ¶

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

type GmailDraftsDeleteCmd ¶

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

GmailDraftsDeleteCmd permanently deletes a draft. The Gmail API's users.drafts.delete is irreversible — drafts are not moved to Trash and have no untrash path — so this cannot be undone.

func (*GmailDraftsDeleteCmd) Run ¶

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

type GmailDraftsForwardCmd ¶ added in v0.36.0

type GmailDraftsForwardCmd struct {
	MessageID string              `arg:"" name:"messageId" help:"Gmail message ID to forward"`
	Options   GmailForwardOptions `embed:""`
}

GmailDraftsForwardCmd saves a forward as a draft. Mirrors GmailForwardCmd.

func (*GmailDraftsForwardCmd) Run ¶ added in v0.36.0

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

type GmailDraftsGetCmd ¶

type GmailDraftsGetCmd struct {
	DraftID                 string `arg:"" name:"draftId" help:"Draft ID"`
	UseIndexedAttachmentIDs bool   `` /* 185-byte string literal not displayed */
	Download                bool   `name:"download" help:"Download draft attachments"`
}

func (*GmailDraftsGetCmd) Run ¶

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

type GmailDraftsListCmd ¶

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 ¶

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

type GmailDraftsReplyAllCmd ¶ added in v0.36.0

type GmailDraftsReplyAllCmd struct {
	MessageID string            `arg:"" name:"messageId" help:"Gmail message ID to reply to"`
	Options   GmailReplyOptions `embed:""`
}

GmailDraftsReplyAllCmd saves a reply-all as a draft. Mirrors GmailReplyAllCmd.

func (*GmailDraftsReplyAllCmd) Run ¶ added in v0.36.0

type GmailDraftsReplyCmd ¶ added in v0.36.0

type GmailDraftsReplyCmd struct {
	MessageID string            `arg:"" name:"messageId" help:"Gmail message ID to reply to"`
	Options   GmailReplyOptions `embed:""`
}

GmailDraftsReplyCmd saves a reply as a draft. It mirrors GmailReplyCmd exactly (same positional arg + embedded GmailReplyOptions) so it inherits every flag and ergonomic of the send-side reply; the only difference is that it creates a draft instead of sending.

func (*GmailDraftsReplyCmd) Run ¶ added in v0.36.0

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

type GmailDraftsSendCmd ¶

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

func (*GmailDraftsSendCmd) Run ¶

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

type GmailDraftsUpdateCmd ¶

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)"`
	BodyHTMLFile     string   `name:"body-html-file" help:"HTML body file path ('-' for stdin)"`
	ReplyToMessageID string   `name:"reply-to-message-id" 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); overrides the draft's existing thread"`
	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"`
	Quote            bool     `name:"quote" help:"Include quoted original message in reply"`
	Attach           []string `` /* 151-byte string literal not displayed */
	ClearAttachments bool     `` /* 144-byte string literal not displayed */
	//nolint:lll // flag help text
	ClearReplyContext      bool   `` /* 177-byte string literal not displayed */
	From                   string `name:"from" help:"Send from this email address (must be a verified send-as alias)"`
	AutoFromAddressedAlias bool   `` /* 177-byte string literal not displayed */
}

func (*GmailDraftsUpdateCmd) Run ¶

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

type GmailFiltersCmd ¶

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"`
	Export GmailFiltersExportCmd `cmd:"" name:"export" help:"Export filters as Gmail WebUI-compatible XML"`
}

type GmailFiltersCreateCmd ¶

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 ¶

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

type GmailFiltersDeleteCmd ¶

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

func (*GmailFiltersDeleteCmd) Run ¶

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

type GmailFiltersExportCmd ¶

type GmailFiltersExportCmd struct {
	Out    string `name:"out" short:"o" help:"Write export to this file (defaults to stdout)"`
	Format string `name:"format" help:"Export format: xml or json (default: xml; --json without --out uses json for compatibility)"`
}

func (*GmailFiltersExportCmd) Run ¶

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

type GmailFiltersGetCmd ¶

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

func (*GmailFiltersGetCmd) Run ¶

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

type GmailFiltersListCmd ¶

type GmailFiltersListCmd struct{}

func (*GmailFiltersListCmd) Run ¶

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

type GmailForwardCmd ¶

type GmailForwardCmd struct {
	MessageID string              `arg:"" name:"messageId" help:"Gmail message ID to forward"`
	Options   GmailForwardOptions `embed:""`
}

func (*GmailForwardCmd) Run ¶

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

type GmailForwardOptions ¶ added in v0.36.0

type GmailForwardOptions struct {
	To              string `name:"to" help:"Recipients (comma-separated; required when sending, optional when saving a draft)"`
	Cc              string `name:"cc" help:"CC recipients (comma-separated)"`
	Bcc             string `name:"bcc" help:"BCC recipients (comma-separated)"`
	Note            string `name:"note" aliases:"intro" help:"Introductory text above the forwarded message"`
	NoteFile        string `name:"note-file" help:"Note file path (plain text; '-' for stdin)"`
	From            string `name:"from" help:"Send from this email address (must be a verified send-as alias)"`
	SkipAttachments bool   `name:"skip-attachments" help:"Do not include original attachments"`
}

type GmailForwardingCmd ¶

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 ¶

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

func (*GmailForwardingCreateCmd) Run ¶

type GmailForwardingDeleteCmd ¶

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

func (*GmailForwardingDeleteCmd) Run ¶

type GmailForwardingGetCmd ¶

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

func (*GmailForwardingGetCmd) Run ¶

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

type GmailForwardingListCmd ¶

type GmailForwardingListCmd struct{}

func (*GmailForwardingListCmd) Run ¶

type GmailGetCmd ¶

type GmailGetCmd struct {
	MessageID               string `arg:"" name:"messageId" help:"Message ID"`
	UseIndexedAttachmentIDs bool   `` /* 185-byte string literal not displayed */
	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)"`
	SanitizeContent         bool   `` /* 164-byte string literal not displayed */
}

func (*GmailGetCmd) Run ¶

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

type GmailHistoryCmd ¶

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 ¶

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

type GmailImportCmd ¶

type GmailImportCmd struct {
	File               string   `arg:"" name:"file" help:"RFC822/EML file path, or '-' for stdin"`
	Labels             []string `name:"label" help:"Label ID or name to apply (repeatable)"`
	InternalDateSource string   `` /* 141-byte string literal not displayed */
	NeverMarkSpam      bool     `name:"never-mark-spam" help:"Never classify the imported message as spam"`
	ProcessForCalendar bool     `name:"process-for-calendar" help:"Process calendar invitations in the imported message"`
}

func (*GmailImportCmd) Run ¶

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

type GmailLabelsCmd ¶

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"`
	Rename GmailLabelsRenameCmd `cmd:"" name:"rename" aliases:"mv" help:"Rename a label"`
	Style  GmailLabelsStyleCmd  `cmd:"" name:"style" aliases:"color,colour" help:"Change a user label color or visibility"`
	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 ¶

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

func (*GmailLabelsCreateCmd) Run ¶

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

type GmailLabelsDeleteCmd ¶

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

func (*GmailLabelsDeleteCmd) Run ¶

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

type GmailLabelsGetCmd ¶

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

func (*GmailLabelsGetCmd) Run ¶

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

type GmailLabelsListCmd ¶

type GmailLabelsListCmd struct{}

func (*GmailLabelsListCmd) Run ¶

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

type GmailLabelsModifyCmd ¶

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 ¶

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

type GmailLabelsRenameCmd ¶

type GmailLabelsRenameCmd struct {
	Label   string `arg:"" name:"labelIdOrName" help:"Current label ID or name"`
	NewName string `arg:"" name:"newName" help:"New label name"`
}

func (*GmailLabelsRenameCmd) Run ¶

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

type GmailLabelsStyleCmd ¶

type GmailLabelsStyleCmd struct {
	Label                 string `arg:"" name:"labelIdOrName" help:"User label ID or name"`
	TextColor             string `name:"text-color" help:"Text color from Gmail's label palette as #RRGGBB"`
	BackgroundColor       string `name:"background-color" help:"Background color from Gmail's label palette as #RRGGBB"`
	LabelListVisibility   string `name:"label-list-visibility" help:"Label-list visibility: labelShow|labelShowIfUnread|labelHide"`
	MessageListVisibility string `name:"message-list-visibility" help:"Message-list visibility: show|hide"`
}

func (*GmailLabelsStyleCmd) Run ¶

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

type GmailMessagesCmd ¶

type GmailMessagesCmd struct {
	Search GmailMessagesSearchCmd `cmd:"" name:"search" aliases:"find,query,ls,list" group:"Read" help:"Search messages using Gmail query syntax"`
	Modify GmailMessagesModifyCmd `cmd:"" name:"modify" aliases:"update,edit,set" group:"Organize" help:"Modify labels on a single message"`
}

type GmailMessagesModifyCmd ¶

type GmailMessagesModifyCmd struct {
	MessageID string `arg:"" name:"messageId" help:"Message 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 (*GmailMessagesModifyCmd) Run ¶

type GmailMessagesSearchCmd ¶

type GmailMessagesSearchCmd struct {
	Query                   []string `arg:"" name:"query" help:"Search query"`
	UseIndexedAttachmentIDs bool     `` /* 185-byte string literal not displayed */
	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"`
	Count                   bool     `` /* 180-byte string literal not displayed */
	Timezone                string   `` /* 131-byte string literal not displayed */
	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 truncates only unusually large bodies)"`
	BodyFormat              string   `name:"body-format" help:"Body format preference when --include-body is set: text or html" default:"text" enum:"text,html"`
	Full                    bool     `name:"full" help:"Show full message bodies without truncation (implies --include-body)"`
	IncludeAttachments      bool     `name:"include-attachments" env:"GOG_GMAIL_INCLUDE_ATTACHMENTS" help:"Include each message's attachment metadata"`
}

func (*GmailMessagesSearchCmd) Run ¶

type GmailRawCmd ¶

type GmailRawCmd struct {
	MessageID string `arg:"" name:"messageId" help:"Message ID"`
	Format    string `` /* 179-byte string literal not displayed */
	Pretty    bool   `name:"pretty" help:"Pretty-print JSON (default: compact single-line)"`
}

GmailRawCmd dumps the full Users.Messages.Get response as JSON. Note the naming collision: "raw" is both the gog-side subcommand name (meaning "dump the full API response") and a Gmail API `format=raw` value meaning "base64url-encoded RFC822 source". This command defaults to `format=full` (the structured parsed message). Pass `--format raw` to get Gmail's native RAW — the base64url blob will still appear as the `raw` field inside the JSON response.

REST reference: https://developers.google.com/gmail/api/reference/rest/v1/users.messages/get Go type: https://pkg.go.dev/google.golang.org/api/gmail/v1#Message

func (*GmailRawCmd) Run ¶

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

type GmailReadCmd ¶

type GmailReadCmd struct {
	MessageIDs []string `arg:"" optional:"" name:"messageId" help:"Message IDs to mark as read"`
	Query      string   `name:"query" short:"q" help:"Mark all messages matching this query as read"`
	Max        int64    `name:"max" aliases:"limit" help:"Max messages (with --query)" default:"100"`
}

GmailReadCmd marks messages as read.

func (*GmailReadCmd) Run ¶

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

type GmailReplyAllCmd ¶

type GmailReplyAllCmd struct {
	MessageID string            `arg:"" name:"messageId" help:"Gmail message ID to reply to"`
	Options   GmailReplyOptions `embed:""`
}

func (*GmailReplyAllCmd) Run ¶

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

type GmailReplyCmd ¶

type GmailReplyCmd struct {
	MessageID string            `arg:"" name:"messageId" help:"Gmail message ID to reply to"`
	Options   GmailReplyOptions `embed:""`
}

func (*GmailReplyCmd) Run ¶

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

type GmailReplyOptions ¶

type GmailReplyOptions struct {
	To                     []string `name:"to" sep:"none" help:"Add or move recipients to To (repeatable)"`
	Cc                     []string `name:"cc" sep:"none" help:"Add or move recipients to Cc (repeatable)"`
	Bcc                    []string `name:"bcc" sep:"none" help:"Add or move recipients to Bcc (repeatable)"`
	Remove                 []string `name:"remove" sep:"none" help:"Remove recipients from all fields (repeatable)"`
	Subject                string   `name:"subject" help:"Override reply subject (a changed subject starts a new Gmail thread)"`
	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)"`
	BodyHTMLFile           string   `name:"body-html-file" help:"HTML body file path ('-' for stdin)"`
	NoQuote                bool     `name:"no-quote" help:"Do not include the original message below the reply"`
	Attach                 []string `name:"attach" sep:"none" help:"Attachment file path (repeatable)"`
	From                   string   `name:"from" help:"Send from this email address (must be a verified send-as alias)"`
	AutoFromAddressedAlias bool     `` /* 177-byte string literal not displayed */
	// contains filtered or unexported fields
}

type GmailSearchCmd ¶

type GmailSearchCmd struct {
	Query       []string `arg:"" name:"query" help:"Search query"`
	FromContact string   `name:"from-contact" help:"Resolve a Google Contact and add from:(email OR email) to the Gmail 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"`
	Count       bool     `` /* 180-byte string literal not displayed */
	Oldest      bool     `name:"oldest" help:"Show first message date instead of last"`
	Timezone    string   `` /* 131-byte string literal not displayed */
	Local       bool     `name:"local" help:"Use local timezone (default behavior, useful to override --timezone)"`
}

func (*GmailSearchCmd) Run ¶

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

type GmailSendAsCmd ¶

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 ¶

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 ¶

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

type GmailSendAsDeleteCmd ¶

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

func (*GmailSendAsDeleteCmd) Run ¶

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

type GmailSendAsGetCmd ¶

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

func (*GmailSendAsGetCmd) Run ¶

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

type GmailSendAsListCmd ¶

type GmailSendAsListCmd struct{}

func (*GmailSendAsListCmd) Run ¶

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

type GmailSendAsUpdateCmd ¶

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 ¶

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

type GmailSendAsVerifyCmd ¶

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

func (*GmailSendAsVerifyCmd) Run ¶

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

type GmailSendCmd ¶

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 unless replying; inherited with Re: for replies)"`
	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)"`
	BodyHTMLFile     string   `name:"body-html-file" help:"HTML body file path ('-' for stdin)"`
	RawFile          string   `name:"raw-file" help:"Send an exact RFC822 message from a file, or '-' for stdin (cannot be combined with compose flags)"`
	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)"`
	// contains filtered or unexported fields
}

func (*GmailSendCmd) Run ¶

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

type GmailSettingsCmd ¶

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 ¶

type GmailThreadAttachmentsCmd struct {
	ThreadID                string        `arg:"" name:"threadId" help:"Thread ID"`
	UseIndexedAttachmentIDs bool          `` /* 185-byte string literal not displayed */
	Download                bool          `name:"download" help:"Download all attachments"`
	OutputDir               OutputDirFlag `embed:""`
}

GmailThreadAttachmentsCmd lists all attachments in a thread.

func (*GmailThreadAttachmentsCmd) Run ¶

type GmailThreadCmd ¶

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 ¶

type GmailThreadGetCmd struct {
	ThreadID                string        `arg:"" name:"threadId" help:"Thread ID"`
	UseIndexedAttachmentIDs bool          `` /* 185-byte string literal not displayed */
	Download                bool          `name:"download" help:"Download attachments"`
	Full                    bool          `name:"full" help:"Show full message bodies without truncation"`
	SanitizeContent         bool          `` /* 164-byte string literal not displayed */
	OutputDir               OutputDirFlag `embed:""`
}

func (*GmailThreadGetCmd) Run ¶

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

type GmailThreadModifyCmd ¶

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 ¶

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

type GmailTrackCmd ¶

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"`
	Key    GmailTrackKeyCmd    `cmd:"" help:"Manage tracking encryption keys"`
}

GmailTrackCmd groups tracking-related subcommands

type GmailTrackKeyCmd ¶

type GmailTrackKeyCmd struct {
	Rotate GmailTrackKeyRotateCmd `cmd:"" help:"Rotate tracking encryption key"`
}

type GmailTrackKeyRotateCmd ¶

type GmailTrackKeyRotateCmd struct {
	NoDeploy  bool   `name:"no-deploy" help:"Update local tracking keys without deploying the Worker"`
	WorkerDir string `name:"worker-dir" help:"Worker directory (default: internal/tracking/worker)"`
}

func (*GmailTrackKeyRotateCmd) Run ¶

type GmailTrackOpensCmd ¶

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 ¶

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

type GmailTrackSetupCmd ¶

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 ¶

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

type GmailTrackStatusCmd ¶

type GmailTrackStatusCmd struct{}

func (*GmailTrackStatusCmd) Run ¶

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

type GmailTrashMsgCmd ¶

type GmailTrashMsgCmd struct {
	MessageIDs []string `arg:"" optional:"" name:"messageId" help:"Message IDs to trash"`
	Query      string   `name:"query" short:"q" help:"Trash all messages matching this Gmail search query"`
	Max        int64    `name:"max" aliases:"limit" help:"Max messages to trash (with --query)" default:"100"`
}

GmailTrashMsgCmd moves messages to trash.

func (*GmailTrashMsgCmd) Run ¶

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

type GmailURLCmd ¶

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

func (*GmailURLCmd) Run ¶

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

type GmailUnreadCmd ¶

type GmailUnreadCmd struct {
	MessageIDs []string `arg:"" optional:"" name:"messageId" help:"Message IDs to mark as unread"`
	Query      string   `name:"query" short:"q" help:"Mark all messages matching this query as unread"`
	Max        int64    `name:"max" aliases:"limit" help:"Max messages (with --query)" default:"100"`
}

GmailUnreadCmd marks messages as unread.

func (*GmailUnreadCmd) Run ¶

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

type GmailVacationCmd ¶

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 ¶

type GmailVacationGetCmd struct{}

func (*GmailVacationGetCmd) Run ¶

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

type GmailVacationUpdateCmd ¶

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 ¶

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

type GmailWatchCmd ¶

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"`
	Pull   GmailWatchPullCmd   `cmd:"" name:"pull" help:"Run Pub/Sub pull consumer"`
}

type GmailWatchPullCmd ¶

type GmailWatchPullCmd struct {
	Subscription  string   `name:"subscription" help:"Pub/Sub pull subscription (projects/.../subscriptions/...)"`
	FetchDelay    string   `name:"fetch-delay" help:"Delay before fetching Gmail history (seconds or duration)" default:"3s"`
	Timezone      string   `` /* 131-byte string literal not displayed */
	Local         bool     `name:"local" help:"Use local timezone (default behavior, useful to override --timezone)"`
	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"`
	HistoryTypes  []string `` /* 158-byte string literal not displayed */
	ExcludeLabels string   `` /* 163-byte string literal not displayed */
	SaveHook      bool     `name:"save-hook" help:"Persist hook settings to watch state"`
}

func (*GmailWatchPullCmd) Run ¶

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

type GmailWatchRenewCmd ¶

type GmailWatchRenewCmd struct {
	TTL string `name:"ttl" help:"Renew after duration (seconds or Go duration)"`
}

func (*GmailWatchRenewCmd) Run ¶

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

type GmailWatchServeCmd ¶

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"`
	FetchDelay    string   `name:"fetch-delay" help:"Delay before fetching Gmail history (seconds or duration)" default:"3s"`
	Timezone      string   `` /* 131-byte string literal not displayed */
	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"`
	HistoryTypes  []string `` /* 158-byte string literal not displayed */
	ExcludeLabels string   `` /* 163-byte string literal not displayed */
	SaveHook      bool     `name:"save-hook" help:"Persist hook settings to watch state"`
}

func (*GmailWatchServeCmd) Run ¶

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

type GmailWatchStartCmd ¶

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 ¶

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

type GmailWatchStatusCmd ¶

type GmailWatchStatusCmd struct {
	ShowSecrets bool `help:"Show secret values (e.g. hook token) in plaintext"`
}

func (*GmailWatchStatusCmd) Run ¶

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

type GmailWatchStopCmd ¶

type GmailWatchStopCmd struct{}

func (*GmailWatchStopCmd) Run ¶

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

type GroupsCmd ¶

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 ¶

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 ¶

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

type GroupsMembersCmd ¶

type GroupsMembersCmd struct {
	GroupEmail string `arg:"" name:"groupEmail" help:"Group email (e.g., engineering@company.com)"`
	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 ¶

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

type ImageRef ¶

type ImageRef struct {
	DriveFileID string
	PublicURL   string
}

ImageRef is the result of uploading an asset to Drive.

type ImageRefPattern ¶

type ImageRefPattern = docssed.ImageReference

ImageRefPattern is the parser-owned image reference used by the command executor.

type KeepAttachmentCmd ¶

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 ¶

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

type KeepCmd ¶

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)"`
	Create     KeepCreateCmd     `cmd:"" name:"create" help:"Create a new note"`
	Delete     KeepDeleteCmd     `cmd:"" name:"delete" help:"Delete a note"`
	Attachment KeepAttachmentCmd `cmd:"" name:"attachment" help:"Download an attachment"`
}

type KeepCreateCmd ¶

type KeepCreateCmd struct {
	Title string   `name:"title" help:"Note title"`
	Text  string   `name:"text" help:"Note body text"`
	Item  []string `name:"item" help:"List item text (repeatable; creates a checklist note)"`
}

func (*KeepCreateCmd) Run ¶

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

type KeepDeleteCmd ¶

type KeepDeleteCmd struct {
	NoteID string `arg:"" name:"noteId" help:"Note ID or name (e.g. notes/abc123)"`
}

func (*KeepDeleteCmd) Run ¶

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

type KeepGetCmd ¶

type KeepGetCmd struct {
	NoteID string `arg:"" name:"noteId" help:"Note ID or name (e.g. notes/abc123)"`
}

func (*KeepGetCmd) Run ¶

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

type KeepListCmd ¶

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 ¶

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

type KeepSearchCmd ¶

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 ¶

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

type LayoutGeometry ¶

type LayoutGeometry struct {
	PageWidthPT  float64
	PageHeightPT float64
	MarginPT     float64
	GutterPT     float64
	BodyTopPT    float64 // top edge of the body area (below the title)
}

LayoutGeometry holds the per-presentation geometry constants used to position text and image boxes. Sizes are in points (PT).

type LayoutKind ¶

type LayoutKind int

LayoutKind enumerates the renderer's internal layout categories.

const (
	LayoutKindDefault LayoutKind = iota
	LayoutKindCenter
	LayoutKindSectionHeader // title / hero / statement
	LayoutKindTwoCols
	LayoutKindThreeCols
)

func MapSlideyLayout ¶

func MapSlideyLayout(name string) LayoutKind

MapSlideyLayout maps a slidey frontmatter layout name to a LayoutKind. Unknown values fall back to LayoutKindDefault.

type MapsCmd ¶

type MapsCmd struct {
	Places         MapsPlacesCmd         `cmd:"" name:"places" aliases:"place" help:"Google Maps Places API"`
	Directions     MapsDirectionsCmd     `cmd:"" name:"directions" aliases:"route" help:"Get directions between two locations"`
	Distance       MapsDistanceCmd       `cmd:"" name:"distance" aliases:"distance-matrix,matrix" help:"Get travel distance and duration matrix"`
	Geocode        MapsGeocodeCmd        `cmd:"" name:"geocode" help:"Convert an address to coordinates"`
	ReverseGeocode MapsReverseGeocodeCmd `cmd:"" name:"reverse-geocode" aliases:"reverse" help:"Convert coordinates to an address"`
}

type MapsDirectionsCmd ¶

type MapsDirectionsCmd struct {
	Origin      string `name:"origin" help:"Origin address, place ID, or lat,lng" required:""`
	Destination string `name:"destination" help:"Destination address, place ID, or lat,lng" required:""`
	Mode        string `name:"mode" help:"Travel mode: driving|walking|bicycling|transit"`
	Language    string `name:"language" help:"BCP-47 language code"`
	Region      string `name:"region" help:"Region bias"`
}

func (*MapsDirectionsCmd) Run ¶

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

type MapsDistanceCmd ¶

type MapsDistanceCmd struct {
	Origins      string `name:"origins" help:"Comma-separated origins" required:""`
	Destinations string `name:"destinations" help:"Comma-separated destinations" required:""`
	Mode         string `name:"mode" help:"Travel mode: driving|walking|bicycling|transit"`
	Units        string `name:"units" help:"Units: metric|imperial"`
	Language     string `name:"language" help:"BCP-47 language code"`
	Region       string `name:"region" help:"Region bias"`
}

func (*MapsDistanceCmd) Run ¶

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

type MapsGeocodeCmd ¶

type MapsGeocodeCmd struct {
	Address  []string `arg:"" name:"address" help:"Address to geocode"`
	Language string   `name:"language" help:"BCP-47 language code"`
	Region   string   `name:"region" help:"Region bias"`
}

func (*MapsGeocodeCmd) Run ¶

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

type MapsPlacesCmd ¶

type MapsPlacesCmd struct {
	Search  MapsPlacesSearchCmd  `cmd:"" name:"search" aliases:"find" help:"Search Places by text"`
	Details MapsPlacesDetailsCmd `cmd:"" name:"details" aliases:"get,info,show" help:"Get Place details"`
}

type MapsPlacesDetailsCmd ¶

type MapsPlacesDetailsCmd struct {
	PlaceID  string `arg:"" name:"placeId" help:"Place ID (places/{id} accepted)"`
	Language string `name:"language" help:"BCP-47 language code"`
	Region   string `name:"region" help:"CLDR region code"`
}

func (*MapsPlacesDetailsCmd) Run ¶

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

type MapsPlacesSearchCmd ¶

type MapsPlacesSearchCmd struct {
	Query    []string `arg:"" name:"query" help:"Text search query"`
	Language string   `name:"language" help:"BCP-47 language code"`
	Region   string   `name:"region" help:"CLDR region code"`
}

func (*MapsPlacesSearchCmd) Run ¶

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

type MapsReverseGeocodeCmd ¶

type MapsReverseGeocodeCmd struct {
	Lat      string `name:"lat" help:"Latitude" required:""`
	Lng      string `name:"lng" help:"Longitude" required:""`
	Language string `name:"language" help:"BCP-47 language code"`
	Region   string `name:"region" help:"Region bias"`
}

func (*MapsReverseGeocodeCmd) Run ¶

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

type McpCmd ¶

type McpCmd struct {
	AllowTool      []string `` /* 139-byte string literal not displayed */
	AllowWrite     bool     `name:"allow-write" help:"Expose write tools. Write tools must also match --allow-tool when that flag is set."`
	ListTools      bool     `name:"list-tools" help:"Print enabled MCP tools as JSON and exit"`
	TimeoutSeconds int      `name:"timeout-seconds" help:"Per-tool subprocess timeout" default:"60"`
	MaxOutputBytes int      `name:"max-output-bytes" help:"Max stdout/stderr bytes captured per tool call" default:"102400"`
}

func (*McpCmd) Run ¶

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

type MeetCmd ¶

type MeetCmd struct {
	Create       MeetCreateCmd       `cmd:"" name:"create" aliases:"new" help:"Create a meeting space"`
	Get          MeetGetCmd          `cmd:"" name:"get" aliases:"info,show" help:"Get a meeting space"`
	Update       MeetUpdateCmd       `cmd:"" name:"update" aliases:"edit,set" help:"Update space config"`
	End          MeetEndCmd          `cmd:"" name:"end" aliases:"stop" help:"End active conference"`
	History      MeetHistoryCmd      `cmd:"" name:"history" aliases:"calls,past" help:"List past calls in a meeting"`
	Participants MeetParticipantsCmd `cmd:"" name:"participants" aliases:"people,attendees,who" help:"List participants from the latest call"`
}

type MeetCreateCmd ¶

type MeetCreateCmd struct {
	Access     string `name:"access" aliases:"access-type" help:"Access type: open, trusted, or restricted" default:"trusted"`
	EntryPoint string `name:"entry-point" aliases:"entry-point-access" help:"Entry point access: all or creator-only" default:"all" hidden:""`
	Open       bool   `name:"open" aliases:"browser" help:"Open the meeting in a browser after creation"`
}

MeetCreateCmd creates a new meeting space.

func (*MeetCreateCmd) Run ¶

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

type MeetEndCmd ¶

type MeetEndCmd struct {
	MeetingCode string `arg:"" name:"meeting-code" help:"Meeting code (e.g. abc-defg-hij)"`
}

MeetEndCmd ends an active conference in a meeting space.

func (*MeetEndCmd) Run ¶

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

type MeetGetCmd ¶

type MeetGetCmd struct {
	MeetingCode string `arg:"" name:"meeting-code" help:"Meeting code (e.g. abc-defg-hij)"`
}

MeetGetCmd gets a meeting space by meeting code.

func (*MeetGetCmd) Run ¶

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

type MeetHistoryCmd ¶

type MeetHistoryCmd struct {
	MeetingCode string `arg:"" name:"meeting-code" help:"Meeting code (e.g. abc-defg-hij)"`
	Max         int    `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"`
}

MeetHistoryCmd lists past conferences (calls) for a meeting.

func (*MeetHistoryCmd) Run ¶

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

type MeetParticipantsCmd ¶

type MeetParticipantsCmd struct {
	MeetingCode string `arg:"" name:"meeting-code" help:"Meeting code (e.g. abc-defg-hij)"`
	Conference  string `name:"conference" help:"Specific conference ID (default: most recent call)"`
	Max         int    `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"`
}

MeetParticipantsCmd lists participants from the most recent call in a meeting, or from a specific conference if --conference is provided.

func (*MeetParticipantsCmd) Run ¶

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

type MeetUpdateCmd ¶

type MeetUpdateCmd struct {
	MeetingCode string `arg:"" name:"meeting-code" help:"Meeting code (e.g. abc-defg-hij)"`
	Access      string `name:"access" aliases:"access-type" help:"Access type: open, trusted, or restricted"`
	EntryPoint  string `name:"entry-point" aliases:"entry-point-access" help:"Entry point access: all or creator-only" hidden:""`
}

MeetUpdateCmd updates the configuration of a meeting space.

func (*MeetUpdateCmd) Run ¶

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

type OpenCmd ¶

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

func (*OpenCmd) Run ¶

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

type OutputDirFlag ¶

type OutputDirFlag struct {
	Dir string `name:"out-dir" aliases:"output-dir" help:"Directory to write attachments to (default: current directory)"`
}

type OutputPathFlag ¶

type OutputPathFlag struct {
	Path string `name:"out" aliases:"output" help:"Output file path (default: gogcli config dir)"`
}

type OutputPathRequiredFlag ¶

type OutputPathRequiredFlag struct {
	Path string `name:"out" aliases:"output" help:"Output file path (required)"`
}

type PeopleCmd ¶

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"`
	Raw       PeopleRawCmd       `cmd:"" name:"raw" help:"Dump raw People API response as JSON (People.Get; lossless; for scripting and LLM consumption)"`
}

type PeopleGetCmd ¶

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

func (*PeopleGetCmd) Run ¶

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

type PeopleMeCmd ¶

type PeopleMeCmd struct{}

func (*PeopleMeCmd) Run ¶

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

type PeopleRawCmd ¶

type PeopleRawCmd struct {
	UserID       string `arg:"" name:"userId" help:"Person resource name (people/...) or email"`
	PersonFields string `name:"person-fields" help:"People API personFields mask (default: broad set; pass a narrower list to reduce output)"`
	Pretty       bool   `name:"pretty" help:"Pretty-print JSON (default: compact single-line)"`
}

PeopleRawCmd dumps the full People.Get response as JSON. Requires the People API field mask (set via --person-fields). Defaults to a broad set covering commonly useful Person resource fields.

REST reference: https://developers.google.com/people/api/rest/v1/people/get Go type: https://pkg.go.dev/google.golang.org/api/people/v1#Person

func (*PeopleRawCmd) Run ¶

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

type PeopleRelationsCmd ¶

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

func (*PeopleRelationsCmd) Run ¶

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

type PeopleSearchCmd ¶

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 ¶

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

type PhotosCmd ¶

type PhotosCmd struct {
	List     PhotosListCmd     `cmd:"" name:"list" aliases:"ls" help:"List app-created media items"`
	Search   PhotosSearchCmd   `cmd:"" name:"search" aliases:"find" help:"Search app-created media items"`
	Get      PhotosGetCmd      `cmd:"" name:"get" aliases:"info,show" help:"Get an app-created media item"`
	Download PhotosDownloadCmd `cmd:"" name:"download" aliases:"dl" help:"Download an app-created media item"`
	Picker   PhotosPickerCmd   `cmd:"" name:"picker" help:"Access user-selected media with the Photos Picker API"`
}

type PhotosDownloadCmd ¶

type PhotosDownloadCmd struct {
	MediaItemID string `arg:"" name:"mediaItemId" help:"Media item ID"`
	Out         string `name:"out" help:"Output path, directory, or '-' for stdout"`
	Video       bool   `name:"video" help:"Download video bytes with =dv (default auto when metadata says video)"`
	Overwrite   bool   `name:"overwrite" help:"Overwrite an existing output file"`
}

func (*PhotosDownloadCmd) Run ¶

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

type PhotosGetCmd ¶

type PhotosGetCmd struct {
	MediaItemID string `arg:"" name:"mediaItemId" help:"Media item ID"`
}

func (*PhotosGetCmd) Run ¶

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

type PhotosListCmd ¶

type PhotosListCmd struct {
	Max  int64  `name:"max" aliases:"limit" help:"Max results (max 100)" default:"25"`
	Page string `name:"page" aliases:"cursor" help:"Page token"`
}

func (*PhotosListCmd) Run ¶

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

type PhotosPickerCmd ¶

type PhotosPickerCmd struct {
	Create   PhotosPickerCreateCmd   `cmd:"" name:"create" aliases:"new,start" help:"Create a photo-picking session"`
	Get      PhotosPickerGetCmd      `cmd:"" name:"get" aliases:"info,show" help:"Get a photo-picking session"`
	Wait     PhotosPickerWaitCmd     `cmd:"" name:"wait" aliases:"poll" help:"Wait until the user finishes picking media"`
	List     PhotosPickerListCmd     `cmd:"" name:"list" aliases:"ls,items" help:"List media selected in a session"`
	Download PhotosPickerDownloadCmd `cmd:"" name:"download" aliases:"dl" help:"Download selected media bytes"`
	Delete   PhotosPickerDeleteCmd   `cmd:"" name:"delete" aliases:"rm,close" help:"Delete a photo-picking session"`
}

type PhotosPickerCreateCmd ¶

type PhotosPickerCreateCmd struct {
	MaxItems int64 `name:"max-items" help:"Maximum items the user may select (max 2000; 0 uses the API default)" default:"0"`
	Open     bool  `name:"open" aliases:"browser" help:"Open the Picker URI in the default browser"`
}

func (*PhotosPickerCreateCmd) Run ¶

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

type PhotosPickerDeleteCmd ¶

type PhotosPickerDeleteCmd struct {
	SessionID string `arg:"" name:"sessionId" help:"Photos Picker session ID"`
}

func (*PhotosPickerDeleteCmd) Run ¶

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

type PhotosPickerDownloadCmd ¶

type PhotosPickerDownloadCmd struct {
	SessionID   string `arg:"" name:"sessionId" help:"Photos Picker session ID"`
	MediaItemID string `arg:"" name:"mediaItemId" help:"Selected media item ID"`
	Out         string `name:"out" help:"Output path, directory, or '-' for stdout"`
	Overwrite   bool   `name:"overwrite" help:"Overwrite an existing output file"`
}

func (*PhotosPickerDownloadCmd) Run ¶

type PhotosPickerGetCmd ¶

type PhotosPickerGetCmd struct {
	SessionID string `arg:"" name:"sessionId" help:"Photos Picker session ID"`
}

func (*PhotosPickerGetCmd) Run ¶

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

type PhotosPickerListCmd ¶

type PhotosPickerListCmd struct {
	SessionID string `arg:"" name:"sessionId" help:"Photos Picker session ID"`
	Max       int64  `name:"max" aliases:"limit" help:"Max results per page (max 100)" default:"50"`
	Page      string `name:"page" aliases:"cursor" help:"Page token"`
	All       bool   `name:"all" help:"Fetch all pages"`
}

func (*PhotosPickerListCmd) Run ¶

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

type PhotosPickerWaitCmd ¶

type PhotosPickerWaitCmd struct {
	SessionID string        `arg:"" name:"sessionId" help:"Photos Picker session ID"`
	Timeout   time.Duration `name:"timeout" help:"Maximum local wait; 0 uses the API-provided timeout" default:"0s"`
}

func (*PhotosPickerWaitCmd) Run ¶

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

type PhotosSearchCmd ¶

type PhotosSearchCmd struct {
	AlbumID         string `name:"album" aliases:"album-id" help:"App-created album ID"`
	MediaType       string `name:"media-type" help:"Media type: PHOTO|VIDEO|ALL_MEDIA" enum:"PHOTO,VIDEO,ALL_MEDIA" default:"ALL_MEDIA"`
	From            string `name:"from" help:"Start date YYYY-MM-DD"`
	To              string `name:"to" help:"End date YYYY-MM-DD"`
	IncludeArchived bool   `name:"include-archived" help:"Include archived media"`
	Order           string `name:"order" help:"Creation time order: desc|asc" enum:"desc,asc" default:"desc"`
	Max             int64  `name:"max" aliases:"limit" help:"Max results (max 100)" default:"25"`
	Page            string `name:"page" aliases:"cursor" help:"Page token"`
}

func (*PhotosSearchCmd) Run ¶

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

type RootFlags ¶

type RootFlags struct {
	Color               string `help:"Color output: auto|always|never" default:"${color}"`
	Home                string `name:"home" help:"Override gogcli config/data/state/cache root (equivalent to GOG_HOME)"`
	Account             string `help:"Account email, alias, or auto for authenticated Google API commands" aliases:"acct" short:"a"`
	Client              string `help:"OAuth client name (selects stored credentials + token bucket)" default:"${client}"`
	AccessToken         string `help:"Use provided access token directly (bypasses stored refresh tokens; token expires in ~1h)" env:"GOG_ACCESS_TOKEN"`
	EnableCommands      string `help:"Comma-separated list of enabled command prefixes; dot paths allowed (restricts CLI)" default:"${enabled_commands}"`
	EnableCommandsExact string `` /* 180-byte string literal not displayed */
	DisableCommands     string `help:"Comma-separated list of disabled commands; dot paths allowed" default:"${disabled_commands}"`
	GmailNoSend         bool   `help:"Block Gmail send operations (agent safety)" default:"${gmail_no_send}"`
	ReadOnly            bool   `` /* 130-byte string literal not displayed */
	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"`
	WrapUntrusted       bool   `` /* 139-byte string literal not displayed */
	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"`
	// contains filtered or unexported fields
}

type SchemaCmd ¶

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 ¶

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

type SearchConsoleCmd ¶

type SearchConsoleCmd struct {
	Sites           SearchConsoleSitesCmd           `cmd:"" name:"sites" aliases:"list,ls" help:"List and inspect Search Console sites"`
	SearchAnalytics SearchConsoleSearchAnalyticsCmd `cmd:"" name:"searchanalytics" aliases:"analytics" help:"Search Analytics queries"`
	Query           SearchConsoleQueryCmd           `cmd:"" name:"query" aliases:"report" help:"Run a Search Analytics query"`
	Sitemaps        SearchConsoleSitemapsCmd        `cmd:"" name:"sitemaps" help:"List/get/submit/delete sitemaps"`
}

type SearchConsoleQueryCmd ¶

type SearchConsoleQueryCmd struct {
	SiteURL string `arg:"" name:"siteUrl" help:"Search Console property URL (e.g. https://example.com/ or sc-domain:example.com)"`

	From        string   `name:"from" aliases:"start" help:"Start date (YYYY-MM-DD)"`
	To          string   `name:"to" aliases:"end" help:"End date (YYYY-MM-DD)"`
	Dimensions  string   `name:"dimensions" help:"Comma-separated dimensions (DATE,QUERY,PAGE,COUNTRY,DEVICE,SEARCH_APPEARANCE,HOUR)" default:"QUERY"`
	Type        string   `name:"type" help:"Search type (WEB,IMAGE,VIDEO,NEWS,DISCOVER,GOOGLE_NEWS)" default:"WEB"`
	Aggregation string   `name:"aggregation" help:"Aggregation type (AUTO,BY_PROPERTY,BY_PAGE,BY_NEWS_SHOWCASE_PANEL)"`
	DataState   string   `name:"data-state" help:"Data state (FINAL,ALL,HOURLY_ALL)"`
	Max         int64    `name:"max" aliases:"limit" help:"Max rows to return (1-25000)" default:"1000"`
	Offset      int64    `name:"offset" aliases:"start-row" help:"Row offset for pagination" default:"0"`
	Filter      []string `name:"filter" help:"Dimension filter, repeatable: dimension:operator:expression"`
	Request     string   `name:"request" help:"SearchAnalyticsQueryRequest JSON spec. Accepts @file, a plain file path, -, or inline JSON."`
	FailEmpty   bool     `name:"fail-empty" aliases:"non-empty,require-results" help:"Exit with code 3 if no rows"`
}

func (*SearchConsoleQueryCmd) Run ¶

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

type SearchConsoleSearchAnalyticsCmd ¶

type SearchConsoleSearchAnalyticsCmd struct {
	Query SearchConsoleQueryCmd `cmd:"" name:"query" default:"withargs" aliases:"run" help:"Run a Search Analytics query"`
}

type SearchConsoleSitemapsCmd ¶

type SearchConsoleSitemapsCmd struct {
	List   SearchConsoleSitemapsListCmd   `cmd:"" default:"withargs" aliases:"ls" help:"List sitemaps for a site"`
	Get    SearchConsoleSitemapsGetCmd    `cmd:"" name:"get" aliases:"info,show" help:"Get a sitemap"`
	Submit SearchConsoleSitemapsSubmitCmd `cmd:"" name:"submit" help:"Submit a sitemap"`
	Delete SearchConsoleSitemapsDeleteCmd `cmd:"" name:"delete" aliases:"rm,remove" help:"Delete a sitemap"`
}

type SearchConsoleSitemapsDeleteCmd ¶

type SearchConsoleSitemapsDeleteCmd struct {
	SiteURL  string `arg:"" name:"siteUrl" help:"Search Console property URL (e.g. https://example.com/ or sc-domain:example.com)"`
	FeedPath string `arg:"" name:"feedpath" help:"Sitemap URL"`
}

func (*SearchConsoleSitemapsDeleteCmd) Run ¶

type SearchConsoleSitemapsGetCmd ¶

type SearchConsoleSitemapsGetCmd struct {
	SiteURL  string `arg:"" name:"siteUrl" help:"Search Console property URL (e.g. https://example.com/ or sc-domain:example.com)"`
	FeedPath string `arg:"" name:"feedpath" help:"Sitemap URL"`
}

func (*SearchConsoleSitemapsGetCmd) Run ¶

type SearchConsoleSitemapsListCmd ¶

type SearchConsoleSitemapsListCmd struct {
	SiteURL      string `arg:"" name:"siteUrl" help:"Search Console property URL (e.g. https://example.com/ or sc-domain:example.com)"`
	SitemapIndex string `name:"sitemap-index" help:"Filter to a sitemap index URL"`
	FailEmpty    bool   `name:"fail-empty" aliases:"non-empty,require-results" help:"Exit with code 3 if no results"`
}

func (*SearchConsoleSitemapsListCmd) Run ¶

type SearchConsoleSitemapsSubmitCmd ¶

type SearchConsoleSitemapsSubmitCmd struct {
	SiteURL  string `arg:"" name:"siteUrl" help:"Search Console property URL (e.g. https://example.com/ or sc-domain:example.com)"`
	FeedPath string `arg:"" name:"feedpath" help:"Sitemap URL"`
}

func (*SearchConsoleSitemapsSubmitCmd) Run ¶

type SearchConsoleSitesCmd ¶

type SearchConsoleSitesCmd struct {
	List SearchConsoleSitesListCmd `cmd:"" default:"withargs" aliases:"ls" help:"List accessible Search Console sites"`
	Get  SearchConsoleSitesGetCmd  `cmd:"" name:"get" aliases:"info,show" help:"Get a specific Search Console site"`
}

type SearchConsoleSitesGetCmd ¶

type SearchConsoleSitesGetCmd struct {
	SiteURL string `arg:"" name:"siteUrl" help:"Search Console property URL (e.g. https://example.com/ or sc-domain:example.com)"`
}

func (*SearchConsoleSitesGetCmd) Run ¶

type SearchConsoleSitesListCmd ¶

type SearchConsoleSitesListCmd struct {
	FailEmpty bool `name:"fail-empty" aliases:"non-empty,require-results" help:"Exit with code 3 if no results"`
}

func (*SearchConsoleSitesListCmd) Run ¶

type SheetsAddTabCmd ¶

type SheetsAddTabCmd struct {
	SpreadsheetID string `arg:"" name:"spreadsheetId" help:"Spreadsheet ID"`
	TabName       string `arg:"" name:"tabName" help:"Name for the new tab/sheet"`
	Index         *int64 `name:"index" help:"Zero-based tab index for the new tab"`
}

func (*SheetsAddTabCmd) Run ¶

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

type SheetsAppendCmd ¶

type SheetsAppendCmd struct {
	SpreadsheetID      string   `arg:"" name:"spreadsheetId" help:"Spreadsheet ID"`
	Range              string   `arg:"" name:"range" help:"Range (A1 notation or named range name; e.g. Sheet1!A:C or MyNamedRange)"`
	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   `` /* 147-byte string literal not displayed */
}

func (*SheetsAppendCmd) Run ¶

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

type SheetsBandingClearCmd ¶

type SheetsBandingClearCmd struct {
	SpreadsheetID string `arg:"" name:"spreadsheetId" help:"Spreadsheet ID"`
	BandedRangeID int64  `name:"id" help:"Banded range ID to remove"`
	Sheet         string `name:"sheet" help:"Sheet name for --all"`
	All           bool   `name:"all" help:"Remove all banding from the sheet"`
}

func (*SheetsBandingClearCmd) Run ¶

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

type SheetsBandingCmd ¶

type SheetsBandingCmd struct {
	List  SheetsBandingListCmd  `cmd:"" default:"withargs" help:"List alternating color banded ranges"`
	Set   SheetsBandingSetCmd   `cmd:"" name:"set" aliases:"add,create" help:"Apply alternating colors to a range"`
	Clear SheetsBandingClearCmd `cmd:"" name:"clear" aliases:"delete,rm,remove" help:"Remove alternating color banding"`
}

type SheetsBandingListCmd ¶

type SheetsBandingListCmd struct {
	SpreadsheetID string `arg:"" name:"spreadsheetId" help:"Spreadsheet ID"`
	Sheet         string `name:"sheet" help:"Only list banding from this sheet"`
}

func (*SheetsBandingListCmd) Run ¶

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

type SheetsBandingSetCmd ¶

type SheetsBandingSetCmd struct {
	SpreadsheetID        string `arg:"" name:"spreadsheetId" help:"Spreadsheet ID"`
	Range                string `arg:"" name:"range" help:"A1 range with sheet name (e.g. Sheet1!A1:H20)"`
	RowPropertiesJSON    string `name:"row-properties-json" help:"Sheets API BandingProperties JSON for row colors"`
	ColumnPropertiesJSON string `name:"column-properties-json" help:"Sheets API BandingProperties JSON for column colors"`
}

func (*SheetsBandingSetCmd) Run ¶

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

type SheetsBatchUpdateCmd ¶

type SheetsBatchUpdateCmd struct {
	SpreadsheetID                string `arg:"" name:"spreadsheetId" help:"Spreadsheet ID"`
	DataJSON                     string `` /* 137-byte string literal not displayed */
	ValueInput                   string `name:"input" help:"Value input option: RAW or USER_ENTERED" default:"USER_ENTERED"`
	IncludeValuesInResponse      bool   `name:"include-values-in-response" help:"Include updated values in the response"`
	ResponseValueRenderOption    string `name:"response-render" help:"Response value render option: FORMATTED_VALUE, UNFORMATTED_VALUE, or FORMULA"`
	ResponseDateTimeRenderOption string `name:"response-date-time-render" help:"Response date/time render option: SERIAL_NUMBER or FORMATTED_STRING"`
}

func (*SheetsBatchUpdateCmd) Run ¶

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

type SheetsChartCmd ¶

type SheetsChartCmd struct {
	List   SheetsChartListCmd   `cmd:"" default:"withargs" help:"List charts in a spreadsheet"`
	Get    SheetsChartGetCmd    `cmd:"" name:"get" aliases:"show,info" help:"Get full chart definition (spec + position)"`
	Create SheetsChartCreateCmd `cmd:"" name:"create" aliases:"add,new" help:"Create a chart from a JSON spec"`
	Update SheetsChartUpdateCmd `cmd:"" name:"update" aliases:"edit,set" help:"Update a chart spec"`
	Delete SheetsChartDeleteCmd `cmd:"" name:"delete" aliases:"rm,remove,del" help:"Delete a chart"`
}

type SheetsChartCreateCmd ¶

type SheetsChartCreateCmd struct {
	SpreadsheetID string `arg:"" name:"spreadsheetId" help:"Spreadsheet ID"`
	SpecJSON      string `name:"spec-json" required:"" help:"ChartSpec or EmbeddedChart JSON (inline or @file)"`
	Sheet         string `name:"sheet" help:"Sheet name for anchor (resolved to sheetId)"`
	Anchor        string `name:"anchor" help:"Anchor cell in A1 notation (e.g. A1, E10)"`
	Width         int64  `name:"width" help:"Chart width in pixels" default:"600"`
	Height        int64  `name:"height" help:"Chart height in pixels" default:"371"`
}

func (*SheetsChartCreateCmd) Run ¶

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

type SheetsChartDeleteCmd ¶

type SheetsChartDeleteCmd struct {
	SpreadsheetID string `arg:"" name:"spreadsheetId" help:"Spreadsheet ID"`
	ChartID       int64  `arg:"" name:"chartId" help:"Chart ID to delete"`
}

func (*SheetsChartDeleteCmd) Run ¶

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

type SheetsChartGetCmd ¶

type SheetsChartGetCmd struct {
	SpreadsheetID string `arg:"" name:"spreadsheetId" help:"Spreadsheet ID"`
	ChartID       int64  `arg:"" name:"chartId" help:"Chart ID"`
}

func (*SheetsChartGetCmd) Run ¶

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

type SheetsChartListCmd ¶

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

func (*SheetsChartListCmd) Run ¶

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

type SheetsChartUpdateCmd ¶

type SheetsChartUpdateCmd struct {
	SpreadsheetID string `arg:"" name:"spreadsheetId" help:"Spreadsheet ID"`
	ChartID       int64  `arg:"" name:"chartId" help:"Chart ID to update"`
	SpecJSON      string `name:"spec-json" required:"" help:"ChartSpec or EmbeddedChart JSON (inline or @file)"`
}

func (*SheetsChartUpdateCmd) Run ¶

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

type SheetsClearCmd ¶

type SheetsClearCmd struct {
	SpreadsheetID string `arg:"" name:"spreadsheetId" help:"Spreadsheet ID"`
	Range         string `arg:"" name:"range" help:"Range (A1 notation or named range name; e.g. Sheet1!A1:B2 or MyNamedRange)"`
}

func (*SheetsClearCmd) Run ¶

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

type SheetsCmd ¶

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"`
	BatchUpdate   SheetsBatchUpdateCmd     `cmd:"" name:"batch-update" aliases:"batch" help:"Update values in multiple ranges with one API request"`
	Append        SheetsAppendCmd          `cmd:"" name:"append" aliases:"add" help:"Append values to a range"`
	Insert        SheetsInsertCmd          `cmd:"" name:"insert" help:"Insert empty rows or columns into a sheet"`
	DeleteDim     SheetsDeleteDimensionCmd `cmd:"" name:"delete-dimension" aliases:"delete-dim" help:"Delete rows or columns while preserving intersecting tables"`
	Clear         SheetsClearCmd           `cmd:"" name:"clear" help:"Clear values in a range"`
	Format        SheetsFormatCmd          `cmd:"" name:"format" help:"Apply cell formatting to a range"`
	Conditional   SheetsConditionalCmd     `cmd:"" name:"conditional-format" aliases:"cf,conditional-formats" help:"Manage conditional formatting rules"`
	Validation    SheetsValidationCmd      `cmd:"" name:"validation" aliases:"data-validation,validations" help:"Manage cell data validation rules"`
	Banding       SheetsBandingCmd         `cmd:"" name:"banding" aliases:"banded-ranges" help:"Manage alternating color banding"`
	Filter        SheetsFilterCmd          `cmd:"" name:"filter" aliases:"filters,basic-filter,basic-filters" help:"Manage basic filters"`
	Merge         SheetsMergeCmd           `cmd:"" name:"merge" help:"Merge cells in a range"`
	Unmerge       SheetsUnmergeCmd         `cmd:"" name:"unmerge" help:"Unmerge cells in a range"`
	CopyPaste     SheetsCopyPasteCmd       `` /* 140-byte string literal not displayed */
	NumberFormat  SheetsNumberFormatCmd    `cmd:"" name:"number-format" help:"Apply number format to a range"`
	Freeze        SheetsFreezeCmd          `cmd:"" name:"freeze" help:"Freeze rows and columns on a sheet"`
	ResizeColumns SheetsResizeColumnsCmd   `cmd:"" name:"resize-columns" help:"Resize sheet columns"`
	ResizeRows    SheetsResizeRowsCmd      `cmd:"" name:"resize-rows" help:"Resize sheet rows"`
	ReadFormat    SheetsReadFormatCmd      `cmd:"" name:"read-format" aliases:"get-format,format-read" help:"Read cell formatting from a range"`
	Notes         SheetsNotesCmd           `cmd:"" name:"notes" help:"Get cell notes from a range"`
	UpdateNote    SheetsUpdateNoteCmd      `cmd:"" name:"update-note" aliases:"set-note" help:"Set or clear a cell note"`
	FindReplace   SheetsFindReplaceCmd     `cmd:"" name:"find-replace" help:"Find and replace text across a spreadsheet"`
	Links         SheetsLinksCmd           `cmd:"" name:"links" aliases:"hyperlinks" help:"Get or set cell hyperlinks"`
	Named         SheetsNamedRangesCmd     `cmd:"" name:"named-ranges" aliases:"namedranges,nr" help:"Manage named ranges"`
	Table         SheetsTableCmd           `cmd:"" name:"table" aliases:"tables" help:"Manage Google Sheets tables"`
	DataSource    SheetsDataSourceCmd      `` /* 133-byte string literal not displayed */
	Metadata      SheetsMetadataCmd        `cmd:"" name:"metadata" aliases:"info" help:"Get spreadsheet metadata"`
	Raw           SheetsRawCmd             `` /* 132-byte string literal not displayed */
	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"`
	Chart         SheetsChartCmd           `cmd:"" name:"chart" aliases:"charts" help:"Manage spreadsheet charts"`
	AddTab        SheetsAddTabCmd          `cmd:"" name:"add-tab" aliases:"add-sheet" help:"Add a new tab/sheet to a spreadsheet"`
	RenameTab     SheetsRenameTabCmd       `cmd:"" name:"rename-tab" aliases:"rename-sheet" help:"Rename a tab/sheet in a spreadsheet"`
	DeleteTab     SheetsDeleteTabCmd       `` /* 127-byte string literal not displayed */
	ReorderTab    SheetsReorderTabCmd      `` /* 143-byte string literal not displayed */
}

type SheetsConditionalAddCmd ¶

type SheetsConditionalAddCmd struct {
	SpreadsheetID    string `arg:"" name:"spreadsheetId" help:"Spreadsheet ID"`
	Range            string `arg:"" name:"range" help:"A1 range with sheet name (e.g. Sheet1!A2:J)"`
	Type             string `` /* 174-byte string literal not displayed */
	Expr             string `name:"expr" help:"Expression value or custom formula for boolean rules (omit for blank/not-blank)"`
	FormatJSON       string `name:"format-json" help:"CellFormat JSON for boolean rules (inline or @file)"`
	FormatFields     string `` /* 144-byte string literal not displayed */
	GradientRuleJSON string `name:"gradient-rule-json" help:"GradientRule JSON for gradient conditional formats (inline or @file)"`
	Index            int64  `name:"index" help:"Insert rule at this priority index" default:"0"`
}

func (*SheetsConditionalAddCmd) Run ¶

type SheetsConditionalClearCmd ¶

type SheetsConditionalClearCmd struct {
	SpreadsheetID string `arg:"" name:"spreadsheetId" help:"Spreadsheet ID"`
	Sheet         string `name:"sheet" required:"" help:"Sheet name"`
	Index         string `name:"index" help:"Rule index to remove"`
	All           bool   `name:"all" help:"Remove all conditional formatting rules from the sheet"`
}

func (*SheetsConditionalClearCmd) Run ¶

type SheetsConditionalCmd ¶

type SheetsConditionalCmd struct {
	List  SheetsConditionalListCmd  `cmd:"" default:"withargs" help:"List conditional formatting rules"`
	Add   SheetsConditionalAddCmd   `cmd:"" name:"add" aliases:"create,new" help:"Add a conditional formatting rule"`
	Clear SheetsConditionalClearCmd `cmd:"" name:"clear" aliases:"delete,rm,remove" help:"Remove conditional formatting rules"`
}

type SheetsConditionalListCmd ¶

type SheetsConditionalListCmd struct {
	SpreadsheetID string `arg:"" name:"spreadsheetId" help:"Spreadsheet ID"`
	Sheet         string `name:"sheet" help:"Only list rules from this sheet"`
}

func (*SheetsConditionalListCmd) Run ¶

type SheetsCopyCmd ¶

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 ¶

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

type SheetsCopyPasteCmd ¶

type SheetsCopyPasteCmd struct {
	SpreadsheetID string `arg:"" name:"spreadsheetId" help:"Spreadsheet ID"`
	Source        string `arg:"" name:"source" help:"Source range (eg. Sheet1!A2:H71)"`
	Dest          string `` /* 210-byte string literal not displayed */
	Type          string `` /* 132-byte string literal not displayed */
	Transpose     bool   `name:"transpose" help:"Paste transposed (swap rows and columns)"`
}

func (*SheetsCopyPasteCmd) Run ¶

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

type SheetsCreateCmd ¶

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

func (*SheetsCreateCmd) Run ¶

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

type SheetsDataSourceAddCmd ¶ added in v0.38.0

type SheetsDataSourceAddCmd struct {
	SpreadsheetID  string `arg:"" name:"spreadsheetId" help:"Spreadsheet ID"`
	BillingProject string `name:"billing-project" help:"Billing-enabled BigQuery project charged for source queries"`
	Query          string `name:"query" help:"BigQuery SQL query; mutually exclusive with table flags"`
	TableProject   string `name:"table-project" help:"BigQuery project owning the table; defaults to the billing project"`
	Dataset        string `name:"dataset" help:"BigQuery dataset ID"`
	Table          string `name:"table" help:"BigQuery table ID"`
}

func (*SheetsDataSourceAddCmd) Run ¶ added in v0.38.0

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

type SheetsDataSourceCmd ¶ added in v0.37.0

type SheetsDataSourceCmd struct {
	Add      SheetsDataSourceAddCmd      `cmd:"" name:"add" help:"Add one BigQuery Connected Sheets data source"`
	Delete   SheetsDataSourceDeleteCmd   `cmd:"" name:"delete" aliases:"rm,remove" help:"Delete one Connected Sheets data source and its linked sheet"`
	List     SheetsDataSourceListCmd     `cmd:"" default:"withargs" help:"List Connected Sheets data sources"`
	Describe SheetsDataSourceDescribeCmd `cmd:"" name:"describe" aliases:"get,show,info" help:"Describe a Connected Sheets data source"`
	Refresh  SheetsDataSourceRefreshCmd  `cmd:"" name:"refresh" help:"Refresh one Connected Sheets data source"`
	Table    SheetsDataSourceTableCmd    `cmd:"" name:"table" aliases:"tables,extract,extracts" help:"Inspect Connected Sheets data-source tables (extracts)"`
	Update   SheetsDataSourceUpdateCmd   `cmd:"" name:"update" help:"Update one BigQuery Connected Sheets data source"`
}

type SheetsDataSourceDeleteCmd ¶ added in v0.38.0

type SheetsDataSourceDeleteCmd struct {
	SpreadsheetID string `arg:"" name:"spreadsheetId" help:"Spreadsheet ID"`
	DataSourceID  string `arg:"" name:"dataSourceId" help:"Data source ID"`
}

func (*SheetsDataSourceDeleteCmd) Run ¶ added in v0.38.0

type SheetsDataSourceDescribeCmd ¶ added in v0.37.0

type SheetsDataSourceDescribeCmd struct {
	SpreadsheetID string `arg:"" name:"spreadsheetId" help:"Spreadsheet ID"`
	DataSourceID  string `arg:"" name:"dataSourceId" help:"Data source ID"`
}

func (*SheetsDataSourceDescribeCmd) Run ¶ added in v0.37.0

type SheetsDataSourceListCmd ¶ added in v0.37.0

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

func (*SheetsDataSourceListCmd) Run ¶ added in v0.37.0

type SheetsDataSourceRefreshCmd ¶ added in v0.38.0

type SheetsDataSourceRefreshCmd struct {
	SpreadsheetID string `arg:"" name:"spreadsheetId" help:"Spreadsheet ID"`
	DataSourceID  string `arg:"" name:"dataSourceId" help:"Data source ID"`
	ForceRefresh  bool   `name:"force-refresh" help:"Refresh even when the previous execution failed"`
}

func (*SheetsDataSourceRefreshCmd) Run ¶ added in v0.38.0

type SheetsDataSourceTableCmd ¶ added in v0.37.0

type SheetsDataSourceTableCmd struct {
	List     SheetsDataSourceTableListCmd     `cmd:"" default:"withargs" help:"List data-source tables (extracts)"`
	Describe SheetsDataSourceTableDescribeCmd `cmd:"" name:"describe" aliases:"get,show,info" help:"Describe a data-source table at an anchor cell"`
	Read     SheetsDataSourceTableReadCmd     `cmd:"" name:"read" aliases:"values" help:"Read values from a data-source table"`
}

type SheetsDataSourceTableDescribeCmd ¶ added in v0.37.0

type SheetsDataSourceTableDescribeCmd struct {
	SpreadsheetID string `arg:"" name:"spreadsheetId" help:"Spreadsheet ID"`
	Anchor        string `arg:"" name:"anchor" help:"Table anchor cell including sheet name (for example Extract!A1)"`
}

func (*SheetsDataSourceTableDescribeCmd) Run ¶ added in v0.37.0

type SheetsDataSourceTableListCmd ¶ added in v0.37.0

type SheetsDataSourceTableListCmd struct {
	SpreadsheetID string `arg:"" name:"spreadsheetId" help:"Spreadsheet ID"`
	DataSourceID  string `name:"data-source-id" help:"Only tables belonging to this data source ID"`
}

func (*SheetsDataSourceTableListCmd) Run ¶ added in v0.37.0

type SheetsDataSourceTableReadCmd ¶ added in v0.37.0

type SheetsDataSourceTableReadCmd struct {
	SpreadsheetID     string `arg:"" name:"spreadsheetId" help:"Spreadsheet ID"`
	Anchor            string `arg:"" name:"anchor" help:"Table anchor cell including sheet name (for example Extract!A1)"`
	MaxRows           int    `name:"max-rows" help:"Maximum data rows to read (header row is returned separately)" default:"1000"`
	ValueRenderOption string `` /* 163-byte string literal not displayed */
}

func (*SheetsDataSourceTableReadCmd) Run ¶ added in v0.37.0

type SheetsDataSourceUpdateCmd ¶ added in v0.38.0

type SheetsDataSourceUpdateCmd struct {
	SpreadsheetID  string `arg:"" name:"spreadsheetId" help:"Spreadsheet ID"`
	DataSourceID   string `arg:"" name:"dataSourceId" help:"Data source ID"`
	BillingProject string `name:"billing-project" help:"New billing-enabled BigQuery execution project"`
	Query          string `name:"query" help:"Replacement SQL for an existing query source"`
	TableProject   string `name:"table-project" help:"Replacement project owning an existing native table"`
	Dataset        string `name:"dataset" help:"Replacement dataset for an existing native table"`
	Table          string `name:"table" help:"Replacement native table ID"`
}

func (*SheetsDataSourceUpdateCmd) Run ¶ added in v0.38.0

type SheetsDeleteDimensionCmd ¶

type SheetsDeleteDimensionCmd struct {
	SpreadsheetID string `arg:"" name:"spreadsheetId" help:"Spreadsheet ID"`
	Target        string `arg:"" name:"rangeOrSheet" help:"Sheet name, or row/column range such as Sheet1!2:4 or Sheet1!B:C"`
	Dimension     string `name:"dimension" help:"Dimension to delete: ROWS or COLUMNS" required:""`
	Start         int64  `name:"start" help:"First row/column to delete (1-based, inclusive; required with a sheet target)"`
	End           int64  `name:"end" help:"Last row/column to delete (1-based, inclusive; required with a sheet target)"`
}

func (*SheetsDeleteDimensionCmd) Run ¶

type SheetsDeleteTabCmd ¶

type SheetsDeleteTabCmd struct {
	SpreadsheetID string `arg:"" name:"spreadsheetId" help:"Spreadsheet ID"`
	TabName       string `arg:"" name:"tabName" help:"Tab name to delete"`
}

func (*SheetsDeleteTabCmd) Run ¶

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

type SheetsExportCmd ¶

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"`
	Overwrite     bool           `name:"overwrite" help:"Overwrite an existing output file"`
}

func (*SheetsExportCmd) Run ¶

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

type SheetsFilterCmd ¶

type SheetsFilterCmd struct {
	Set SheetsFilterSetCmd `` /* 140-byte string literal not displayed */
}

type SheetsFilterSetCmd ¶

type SheetsFilterSetCmd struct {
	SpreadsheetID string `arg:"" name:"spreadsheetId" help:"Spreadsheet ID"`
	Range         string `arg:"" name:"range" help:"Range (A1 notation with sheet name or named range name)"`
}

func (*SheetsFilterSetCmd) Run ¶

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

type SheetsFindReplaceCmd ¶

type SheetsFindReplaceCmd struct {
	SpreadsheetID string `arg:"" name:"spreadsheetId" help:"Spreadsheet ID"`
	Find          string `arg:"" name:"find" help:"Text to find"`
	Replace       string `arg:"" name:"replace" help:"Replacement text"`
	Sheet         string `name:"sheet" help:"Sheet name to scope the operation"`
	MatchCase     bool   `name:"match-case" help:"Case-sensitive matching"`
	MatchEntire   bool   `name:"match-entire" aliases:"exact" help:"Match entire cell value"`
	Regex         bool   `name:"regex" help:"Treat find text as a regex"`
	FormulasOnly  bool   `name:"formulas" help:"Include formula cells in search"`
}

func (*SheetsFindReplaceCmd) Run ¶

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

type SheetsFormatCmd ¶

type SheetsFormatCmd struct {
	SpreadsheetID string `arg:"" name:"spreadsheetId" help:"Spreadsheet ID"`
	Range         string `arg:"" name:"range" help:"Range (A1 notation with sheet name, or named range name; e.g. Sheet1!A1:B2 or MyNamedRange)"`
	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 ¶

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

type SheetsFreezeCmd ¶

type SheetsFreezeCmd struct {
	SpreadsheetID string `arg:"" name:"spreadsheetId" help:"Spreadsheet ID"`
	Rows          int64  `name:"rows" help:"Number of rows to freeze (0 to unfreeze)" default:"-1"`
	Cols          int64  `name:"cols" help:"Number of columns to freeze (0 to unfreeze)" default:"-1"`
	Sheet         string `name:"sheet" help:"Sheet name (defaults to the first sheet)"`
}

func (*SheetsFreezeCmd) Run ¶

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

type SheetsGetCmd ¶

type SheetsGetCmd struct {
	SpreadsheetID     string `arg:"" name:"spreadsheetId" help:"Spreadsheet ID"`
	Range             string `arg:"" name:"range" help:"Range (A1 notation or named range name; e.g. Sheet1!A1:B10 or MyNamedRange)"`
	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 ¶

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

type SheetsInsertCmd ¶

type SheetsInsertCmd struct {
	SpreadsheetID string `arg:"" name:"spreadsheetId" help:"Spreadsheet ID"`
	Sheet         string `arg:"" name:"sheet" help:"Sheet name (eg. Sheet1)"`
	Dimension     string `arg:"" name:"dimension" help:"Dimension to insert: rows or cols"`
	Start         int64  `arg:"" name:"start" help:"Position before which to insert (1-based; for cols 1=A, 2=B)"`
	Count         int64  `name:"count" help:"Number of rows/columns to insert" default:"1"`
	After         bool   `name:"after" help:"Insert after the position instead of before"`
	// *bool so an unset flag keeps the historical default (inherit only when
	// --after); passing --inherit-from-before[=false] overrides it explicitly.
	InheritFromBefore *bool `` /* 211-byte string literal not displayed */
}

func (*SheetsInsertCmd) Run ¶

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

type SheetsLinksCmd ¶

type SheetsLinksCmd struct {
	Get SheetsLinksGetCmd `cmd:"" default:"withargs" aliases:"list,show" help:"Get cell hyperlinks from a range"`
	Set SheetsLinksSetCmd `cmd:"" name:"set" aliases:"write" help:"Set cell hyperlinks (rich-text links)"`
}

SheetsLinksCmd groups the hyperlink read (get) and write (set) subcommands. get is the default so the historical `gog sheets links <id> <range>` form keeps working unchanged.

type SheetsLinksGetCmd ¶

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

func (*SheetsLinksGetCmd) Run ¶

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

type SheetsLinksSetCmd ¶

type SheetsLinksSetCmd struct {
	SpreadsheetID string `arg:"" name:"spreadsheetId" help:"Spreadsheet ID"`
	Cell          string `arg:"" optional:"" name:"cell" help:"Target cell (eg. Sheet1!B2). Omit when using --cells-json."`
	URL           string `arg:"" optional:"" name:"url" help:"URL to link to."`
	Text          string `arg:"" optional:"" name:"text" help:"Display text (defaults to the URL)."`

	RunsJSON  string `` /* 211-byte string literal not displayed */
	CellsJSON string `` /* 154-byte string literal not displayed */
}

func (*SheetsLinksSetCmd) Run ¶

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

type SheetsMergeCmd ¶

type SheetsMergeCmd struct {
	SpreadsheetID string `arg:"" name:"spreadsheetId" help:"Spreadsheet ID"`
	Range         string `arg:"" name:"range" help:"Range (eg. Sheet1!A1:B2)"`
	Type          string `name:"type" help:"Merge type: MERGE_ALL, MERGE_COLUMNS, MERGE_ROWS" default:"MERGE_ALL"`
}

func (*SheetsMergeCmd) Run ¶

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

type SheetsMetadataCmd ¶

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

func (*SheetsMetadataCmd) Run ¶

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

type SheetsNamedRangesAddCmd ¶

type SheetsNamedRangesAddCmd struct {
	SpreadsheetID string `arg:"" name:"spreadsheetId" help:"Spreadsheet ID"`
	Name          string `arg:"" name:"name" help:"Named range name"`
	Range         string `arg:"" name:"range" help:"A1 range (must include sheet name; e.g. Sheet1!A1:B2 or Sheet1!A:C)"`
}

func (*SheetsNamedRangesAddCmd) Run ¶

type SheetsNamedRangesCmd ¶

type SheetsNamedRangesCmd struct {
	List   SheetsNamedRangesListCmd   `cmd:"" default:"withargs" help:"List named ranges"`
	Get    SheetsNamedRangesGetCmd    `cmd:"" name:"get" aliases:"show,info" help:"Get a named range"`
	Add    SheetsNamedRangesAddCmd    `cmd:"" name:"add" aliases:"create,new" help:"Add a named range"`
	Update SheetsNamedRangesUpdateCmd `cmd:"" name:"update" aliases:"edit,set" help:"Update a named range"`
	Delete SheetsNamedRangesDeleteCmd `cmd:"" name:"delete" aliases:"rm,remove,del" help:"Delete a named range"`
}

type SheetsNamedRangesDeleteCmd ¶

type SheetsNamedRangesDeleteCmd struct {
	SpreadsheetID string `arg:"" name:"spreadsheetId" help:"Spreadsheet ID"`
	NameOrID      string `arg:"" name:"nameOrId" help:"Named range name or ID"`
}

func (*SheetsNamedRangesDeleteCmd) Run ¶

type SheetsNamedRangesGetCmd ¶

type SheetsNamedRangesGetCmd struct {
	SpreadsheetID string `arg:"" name:"spreadsheetId" help:"Spreadsheet ID"`
	NameOrID      string `arg:"" name:"nameOrId" help:"Named range name or ID"`
}

func (*SheetsNamedRangesGetCmd) Run ¶

type SheetsNamedRangesListCmd ¶

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

func (*SheetsNamedRangesListCmd) Run ¶

type SheetsNamedRangesUpdateCmd ¶

type SheetsNamedRangesUpdateCmd struct {
	SpreadsheetID string `arg:"" name:"spreadsheetId" help:"Spreadsheet ID"`
	NameOrID      string `arg:"" name:"nameOrId" help:"Named range name or ID"`
	NewName       string `name:"name" help:"New name"`
	NewRange      string `name:"range" help:"New A1 range (must include sheet name; e.g. Sheet1!A1:B2 or Sheet1!A:C)"`
}

func (*SheetsNamedRangesUpdateCmd) Run ¶

type SheetsNotesCmd ¶

type SheetsNotesCmd struct {
	SpreadsheetID string `arg:"" name:"spreadsheetId" help:"Spreadsheet ID"`
	Range         string `arg:"" name:"range" help:"Range (A1 notation or named range name; e.g. Sheet1!A1:B10 or MyNamedRange)"`
}

func (*SheetsNotesCmd) Run ¶

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

type SheetsNumberFormatCmd ¶

type SheetsNumberFormatCmd struct {
	SpreadsheetID string `arg:"" name:"spreadsheetId" help:"Spreadsheet ID"`
	Range         string `arg:"" name:"range" help:"Range (eg. Sheet1!A1:B2)"`
	Type          string `name:"type" help:"Number format type: NUMBER, CURRENCY, PERCENT, DATE, TIME, DATE_TIME, SCIENTIFIC, TEXT" default:"NUMBER"`
	Pattern       string `name:"pattern" help:"Custom number format pattern (eg. $#,##0.00 or yyyy-mm-dd)"`
}

func (*SheetsNumberFormatCmd) Run ¶

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

type SheetsRawCmd ¶

type SheetsRawCmd struct {
	SpreadsheetID   string `arg:"" name:"spreadsheetId" help:"Spreadsheet ID"`
	IncludeGridData bool   `` /* 152-byte string literal not displayed */
	Pretty          bool   `name:"pretty" help:"Pretty-print JSON (default: compact single-line)"`
}

SheetsRawCmd dumps the full Spreadsheets.Get response as JSON, with no Fields restriction. `--include-grid-data` opts into returning cell-level data; it is off by default because grid payloads can be multi-MB and are the primary leakage vector (formulas may embed API keys or tokens).

REST reference: https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets/get Go type: https://pkg.go.dev/google.golang.org/api/sheets/v4#Spreadsheet

func (*SheetsRawCmd) Run ¶

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

type SheetsReadFormatCmd ¶

type SheetsReadFormatCmd struct {
	SpreadsheetID string `arg:"" name:"spreadsheetId" help:"Spreadsheet ID"`
	Range         string `arg:"" name:"range" help:"Range (eg. Sheet1!A1:B10)"`
	Effective     bool   `name:"effective" help:"Read effective format instead of user-entered format"`
}

func (*SheetsReadFormatCmd) Run ¶

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

type SheetsRenameTabCmd ¶

type SheetsRenameTabCmd struct {
	SpreadsheetID string `arg:"" name:"spreadsheetId" help:"Spreadsheet ID"`
	OldName       string `arg:"" name:"oldName" help:"Current tab name"`
	NewName       string `arg:"" name:"newName" help:"New tab name"`
}

func (*SheetsRenameTabCmd) Run ¶

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

type SheetsReorderTabCmd ¶

type SheetsReorderTabCmd struct {
	SpreadsheetID string `arg:"" name:"spreadsheetId" help:"Spreadsheet ID"`
	Tab           string `name:"tab" required:"" help:"Target tab by name or numeric sheet ID (see sheets metadata)"`
	To            *int64 `name:"to" required:"" help:"Destination final 0-based tab index"`
}

SheetsReorderTabCmd moves a tab to a specific 0-based position in the spreadsheet via spreadsheets.batchUpdate -> updateSheetProperties with field mask `index`. Existing tab management (add/rename/delete) does not expose this; see #603.

func (*SheetsReorderTabCmd) Run ¶

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

type SheetsResizeColumnsCmd ¶

type SheetsResizeColumnsCmd struct {
	SpreadsheetID string `arg:"" name:"spreadsheetId" help:"Spreadsheet ID"`
	Columns       string `arg:"" name:"columns" help:"Columns range (eg. Sheet1!A:C)"`
	Width         int64  `name:"width" help:"Column width in pixels"`
	Auto          bool   `name:"auto" help:"Auto-fit columns to content"`
}

func (*SheetsResizeColumnsCmd) Run ¶

type SheetsResizeRowsCmd ¶

type SheetsResizeRowsCmd struct {
	SpreadsheetID string `arg:"" name:"spreadsheetId" help:"Spreadsheet ID"`
	Rows          string `arg:"" name:"rows" help:"Rows range (eg. Sheet1!1:10)"`
	Height        int64  `name:"height" help:"Row height in pixels"`
	Auto          bool   `name:"auto" help:"Auto-fit rows to content"`
}

func (*SheetsResizeRowsCmd) Run ¶

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

type SheetsTableAppendCmd ¶

type SheetsTableAppendCmd struct {
	SpreadsheetID string   `arg:"" name:"spreadsheetId" help:"Spreadsheet ID"`
	TableID       string   `arg:"" name:"tableId" help:"Table ID or table name"`
	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"`
}

func (*SheetsTableAppendCmd) Run ¶

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

type SheetsTableClearCmd ¶

type SheetsTableClearCmd struct {
	SpreadsheetID string `arg:"" name:"spreadsheetId" help:"Spreadsheet ID"`
	TableID       string `arg:"" name:"tableId" help:"Table ID or table name"`
}

func (*SheetsTableClearCmd) Run ¶

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

type SheetsTableCmd ¶

type SheetsTableCmd struct {
	List   SheetsTableListCmd   `cmd:"" default:"withargs" help:"List tables in a spreadsheet"`
	Get    SheetsTableGetCmd    `cmd:"" name:"get" aliases:"show,info" help:"Get a table"`
	Create SheetsTableCreateCmd `cmd:"" name:"create" aliases:"add,new" help:"Create a table"`
	Append SheetsTableAppendCmd `cmd:"" name:"append" aliases:"add-row,add-rows" help:"Append rows to a table"`
	Clear  SheetsTableClearCmd  `cmd:"" name:"clear" aliases:"clear-rows" help:"Clear table data rows"`
	Delete SheetsTableDeleteCmd `cmd:"" name:"delete" aliases:"rm,remove,del" help:"Delete a table"`
}

type SheetsTableCreateCmd ¶

type SheetsTableCreateCmd struct {
	SpreadsheetID string `arg:"" name:"spreadsheetId" help:"Spreadsheet ID"`
	Range         string `arg:"" name:"range" help:"Table range (A1 notation with sheet name, or named range name; e.g. Sheet1!A1:C10 or MyNamedRange)"`
	Name          string `name:"name" help:"Table name" required:""`
	ColumnsJSON   string `` /* 174-byte string literal not displayed */
}

func (*SheetsTableCreateCmd) Run ¶

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

type SheetsTableDeleteCmd ¶

type SheetsTableDeleteCmd struct {
	SpreadsheetID string `arg:"" name:"spreadsheetId" help:"Spreadsheet ID"`
	TableID       string `arg:"" name:"tableId" help:"Table ID or table name"`
	DiscardData   bool   `name:"discard-data" help:"Delete the table and every cell in its range (required)"`
}

func (*SheetsTableDeleteCmd) Run ¶

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

type SheetsTableGetCmd ¶

type SheetsTableGetCmd struct {
	SpreadsheetID string `arg:"" name:"spreadsheetId" help:"Spreadsheet ID"`
	TableID       string `arg:"" name:"tableId" help:"Table ID or table name"`
}

func (*SheetsTableGetCmd) Run ¶

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

type SheetsTableListCmd ¶

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

func (*SheetsTableListCmd) Run ¶

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

type SheetsUnmergeCmd ¶

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

func (*SheetsUnmergeCmd) Run ¶

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

type SheetsUpdateCmd ¶

type SheetsUpdateCmd struct {
	SpreadsheetID      string   `arg:"" name:"spreadsheetId" help:"Spreadsheet ID"`
	Range              string   `arg:"" name:"range" help:"Range (A1 notation or named range name; e.g. Sheet1!A1:B2 or MyNamedRange)"`
	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 a JSON 2D array, @file, or @- for stdin"`
	CopyValidationFrom string   `` /* 146-byte string literal not displayed */
	FailOnFormulaError bool     `name:"fail-on-formula-error" help:"Read back the updated range and fail if any cell has a Sheets formula error"`
}

func (*SheetsUpdateCmd) Run ¶

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

type SheetsUpdateNoteCmd ¶

type SheetsUpdateNoteCmd struct {
	SpreadsheetID string  `arg:"" name:"spreadsheetId" help:"Spreadsheet ID"`
	Range         string  `arg:"" name:"range" help:"A1 cell or range (eg. Sheet1!A1 or Sheet1!A1:B2)"`
	Note          *string `name:"note" help:"Note text to set (use --note '' to clear notes)"`
	NoteFile      string  `name:"note-file" help:"Path to file containing note text" type:"existingfile"`
}

func (*SheetsUpdateNoteCmd) Run ¶

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

type SheetsValidationClearCmd ¶

type SheetsValidationClearCmd struct {
	SpreadsheetID        string `arg:"" name:"spreadsheetId" help:"Spreadsheet ID"`
	Range                string `arg:"" name:"range" help:"Range (A1 notation with sheet name or named range name)"`
	FilteredRowsIncluded bool   `` /* 129-byte string literal not displayed */
}

func (*SheetsValidationClearCmd) Run ¶

type SheetsValidationCmd ¶

type SheetsValidationCmd struct {
	Get   SheetsValidationGetCmd   `cmd:"" default:"withargs" aliases:"list,show" help:"Get data validation rules from a range"`
	Set   SheetsValidationSetCmd   `cmd:"" name:"set" aliases:"add,create" help:"Set a data validation rule on a range"`
	Clear SheetsValidationClearCmd `` /* 140-byte string literal not displayed */
}

type SheetsValidationGetCmd ¶

type SheetsValidationGetCmd struct {
	SpreadsheetID string `arg:"" name:"spreadsheetId" help:"Spreadsheet ID"`
	Range         string `arg:"" name:"range" help:"Range (A1 notation or named range name; e.g. Sheet1!A1:B10 or MyNamedRange)"`
}

func (*SheetsValidationGetCmd) Run ¶

type SheetsValidationSetCmd ¶

type SheetsValidationSetCmd struct {
	SpreadsheetID        string   `arg:"" name:"spreadsheetId" help:"Spreadsheet ID"`
	Range                string   `arg:"" name:"range" help:"Range (A1 notation with sheet name or named range name)"`
	Type                 string   `name:"type" required:"" help:"Condition type (e.g. ONE_OF_LIST, ONE_OF_RANGE, NUMBER_BETWEEN, DATE_AFTER, BOOLEAN)"`
	Values               []string `name:"value" help:"Condition value; repeat for list or between conditions"`
	Strict               bool     `name:"strict" help:"Reject invalid input instead of showing a warning" negatable:""`
	ShowCustomUI         bool     `name:"show-custom-ui" help:"Show dropdown or checkbox UI where supported" default:"true" negatable:""`
	InputMessage         string   `name:"input-message" help:"Message shown when the cell is selected"`
	FilteredRowsIncluded bool     `` /* 126-byte string literal not displayed */
}

func (*SheetsValidationSetCmd) Run ¶

type SitesCmd ¶

type SitesCmd struct {
	List   SitesListCmd   `cmd:"" name:"list" aliases:"ls" help:"List Google Sites visible in Drive"`
	Search SitesSearchCmd `cmd:"" name:"search" aliases:"find" help:"Search Google Sites by text or Drive query"`
	Get    SitesGetCmd    `cmd:"" name:"get" aliases:"info,show" help:"Get Google Site metadata"`
	URL    SitesURLCmd    `cmd:"" name:"url" aliases:"open" help:"Print Google Site editor URLs"`
}

type SitesGetCmd ¶

type SitesGetCmd struct {
	SiteID string `arg:"" name:"siteId" help:"Site Drive file ID or sites.google.com editor URL"`
	Fields string `name:"fields" help:"Drive API field mask (overrides the default set; e.g. 'id,name,webViewLink')"`
}

func (*SitesGetCmd) Run ¶

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

type SitesListCmd ¶

type SitesListCmd 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:"Additional Drive query filter"`
	AllDrives bool   `` /* 130-byte string literal not displayed */
	Drive     string `` /* 152-byte string literal not displayed */
}

func (*SitesListCmd) Run ¶

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

type SitesSearchCmd ¶

type SitesSearchCmd struct {
	Query     []string `arg:"" name:"query" help:"Search query"`
	RawQuery  bool     `` /* 131-byte string literal not displayed */
	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 */
	Drive     string   `` /* 154-byte string literal not displayed */
}

func (*SitesSearchCmd) Run ¶

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

type SitesURLCmd ¶

type SitesURLCmd struct {
	SiteIDs []string `arg:"" name:"siteId" help:"Site Drive file IDs or sites.google.com editor URLs"`
}

func (*SitesURLCmd) Run ¶

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

type SlideNotesPlan ¶

type SlideNotesPlan struct {
	SlideIndex int
	SlideID    string
	Text       string
}

SlideNotesPlan tells the second BatchUpdate which slide gets which speaker-notes text. SlideIndex maps to the i-th slide created.

func RenderSlides ¶

func RenderSlides(in []slidesmarkdown.Slide, assets AssetMap, g LayoutGeometry) ([]*slides.Request, []SlideNotesPlan)

RenderSlides converts a parsed Slide AST plus an AssetMap into the initial BatchUpdate requests AND a notes plan to apply after the presentation is created.

type SlidesAddSlideCmd ¶

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 ¶

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

type SlidesBulletsCmd ¶

type SlidesBulletsCmd struct {
	PresentationID string `arg:"" name:"presentationId" help:"Presentation ID"`
	ObjectID       string `arg:"" name:"objectId" help:"Page element object ID containing the text"`
	Range          string `name:"range" required:"" help:"UTF-16 paragraph range as start:end"`
	On             bool   `name:"on" help:"Turn bullets on for the selected paragraphs"`
	Off            bool   `name:"off" help:"Turn bullets off for the selected paragraphs"`
	Preset         string `name:"preset" help:"Slides bullet preset when using --on" default:"BULLET_DISC_CIRCLE_SQUARE"`
}

func (*SlidesBulletsCmd) Run ¶

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

type SlidesCmd ¶

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"`
	CreateFromTemplate SlidesCreateFromTemplateCmd `cmd:"" name:"create-from-template" help:"Create a presentation from template with text replacements"`
	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"`
	NewSlide           SlidesNewSlideCmd           `cmd:"" name:"new-slide" help:"Create a native themed slide"`
	DuplicateSlide     SlidesDuplicateSlideCmd     `cmd:"" name:"duplicate-slide" help:"Duplicate a slide by object ID"`
	MoveSlide          SlidesMoveSlideCmd          `cmd:"" name:"move-slide" help:"Move a slide to a zero-based insertion index"`
	SkipSlide          SlidesSkipSlideCmd          `cmd:"" name:"skip-slide" aliases:"hide-slide" help:"Skip a slide during presentation"`
	UnskipSlide        SlidesUnskipSlideCmd        `cmd:"" name:"unskip-slide" aliases:"unhide-slide" help:"Include a skipped slide during presentation"`
	ListSlides         SlidesListSlidesCmd         `cmd:"" name:"list-slides" help:"List all slides with their object IDs and skipped state"`
	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"`
	Locate             SlidesLocateCmd             `cmd:"" name:"locate" aliases:"find-element" help:"Locate text in shapes and table cells with object IDs and UTF-16 ranges"`
	Thumbnail          SlidesThumbnailCmd          `cmd:"" name:"thumbnail" aliases:"thumb" help:"Get or download a rendered thumbnail for a slide"`
	UpdateNotes        SlidesUpdateNotesCmd        `cmd:"" name:"update-notes" help:"Update speaker notes on an existing slide"`
	ReplaceSlide       SlidesReplaceSlideCmd       `cmd:"" name:"replace-slide" help:"Replace an existing slide image from a local file or public URL"`
	InsertImage        SlidesInsertImageCmd        `cmd:"" name:"insert-image" help:"Insert a local or public image at a position and size"`
	InsertText         SlidesInsertTextCmd         `cmd:"" name:"insert-text" help:"Insert text into an existing page element (shape or table) by objectId"`
	Table              SlidesTableCmd              `cmd:"" name:"table" help:"Create and update native tables"`
	Element            SlidesElementCmd            `cmd:"" name:"element" help:"Create and manipulate native page elements"`
	StyleText          SlidesStyleTextCmd          `cmd:"" name:"style-text" help:"Apply range-scoped text styling to one page element"`
	Link               SlidesLinkCmd               `cmd:"" name:"link" help:"Apply a hyperlink to a text range in one page element"`
	Bullets            SlidesBulletsCmd            `cmd:"" name:"bullets" help:"Turn paragraph bullets on or off in one page element"`
	ReplaceText        SlidesReplaceTextCmd        `cmd:"" name:"replace-text" help:"Find-and-replace text in an explicit object, slide, or presentation scope"`
	Raw                SlidesRawCmd                `` /* 133-byte string literal not displayed */
}

type SlidesCopyCmd ¶

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 ¶

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

type SlidesCreateCmd ¶

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 ¶

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

type SlidesCreateFromMarkdownCmd ¶

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"`
	FAStyle        string `name:"fa-style" help:"Default Font Awesome style when shortcode has no prefix" default:"solid"`
	MMDC           string `name:"mmdc" help:"Path to mermaid CLI (mmdc); empty disables diagram rendering" default:"mmdc"`
	Strict         bool   `name:"strict" help:"Treat skipped FA/diagram assets as fatal"`
	KeepTempImages bool   `name:"keep-temp-images" help:"Don't delete temporary Drive uploads after import"`
	NoNotes        bool   `name:"no-notes" help:"Discard ## Notes sections instead of inserting as speaker notes"`
}

func (*SlidesCreateFromMarkdownCmd) Run ¶

type SlidesCreateFromTemplateCmd ¶

type SlidesCreateFromTemplateCmd struct {
	TemplateID   string   `arg:"" name:"templateId" help:"Template presentation ID"`
	Title        string   `arg:"" name:"title" help:"New presentation title"`
	Replace      []string `name:"replace" help:"Text replacement in format 'key=value' (repeatable)"`
	Replacements string   `name:"replacements" help:"JSON file containing replacements" type:"existingfile"`
	Parent       string   `name:"parent" help:"Destination folder ID"`
	Exact        bool     `name:"exact" help:"Use exact string matching instead of {{key}} placeholders"`
}

func (*SlidesCreateFromTemplateCmd) Run ¶

type SlidesDeleteSlideCmd ¶

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 ¶

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

type SlidesDuplicateSlideCmd ¶

type SlidesDuplicateSlideCmd struct {
	PresentationID string `arg:"" name:"presentationId" help:"Presentation ID"`
	SlideID        string `arg:"" name:"slideId" help:"Slide object ID to duplicate (use 'slides list-slides' to find IDs)"`
	ToIndex        *int64 `name:"to-index" help:"Zero-based insertion index for the duplicated slide"`
}

func (*SlidesDuplicateSlideCmd) Run ¶

type SlidesElementAltTextCmd ¶

type SlidesElementAltTextCmd struct {
	PresentationID string  `arg:"" name:"presentationId" help:"Presentation ID"`
	ObjectID       string  `arg:"" name:"objectId" help:"Page element object ID"`
	Title          *string `name:"title" help:"Accessibility title; pass an empty value to clear"`
	Description    *string `name:"description" help:"Accessibility description; pass an empty value to clear"`
}

func (*SlidesElementAltTextCmd) Run ¶

type SlidesElementCmd ¶

type SlidesElementCmd struct {
	CreateShape SlidesElementCreateShapeCmd `cmd:"" name:"create-shape" help:"Create a native shape on a slide"`
	CreateLine  SlidesElementCreateLineCmd  `cmd:"" name:"create-line" help:"Create a native line on a slide"`
	Transform   SlidesElementTransformCmd   `cmd:"" name:"transform" aliases:"move,resize,rotate" help:"Move, resize, rotate, or replace an element transform"`
	Style       SlidesElementStyleCmd       `cmd:"" name:"style" help:"Style a shape fill/outline or a line"`
	ZOrder      SlidesElementZOrderCmd      `cmd:"" name:"z-order" help:"Change element stacking order"`
	Group       SlidesElementGroupCmd       `cmd:"" name:"group" help:"Group two or more elements"`
	Ungroup     SlidesElementUngroupCmd     `cmd:"" name:"ungroup" help:"Ungroup one or more element groups"`
	AltText     SlidesElementAltTextCmd     `cmd:"" name:"alt-text" help:"Set or clear element accessibility text"`
	Delete      SlidesElementDeleteCmd      `cmd:"" name:"delete" aliases:"rm" help:"Delete one page element"`
}

type SlidesElementCreateLineCmd ¶

type SlidesElementCreateLineCmd struct {
	PresentationID string  `arg:"" name:"presentationId" help:"Presentation ID"`
	SlideID        string  `arg:"" name:"slideId" help:"Slide object ID"`
	Category       string  `name:"category" default:"STRAIGHT" enum:"STRAIGHT,BENT,CURVED" help:"Line category"`
	X              float64 `name:"x" default:"0" help:"Start X position"`
	Y              float64 `name:"y" default:"0" help:"Start Y position"`
	Width          float64 `name:"width" default:"100" help:"Horizontal extent"`
	Height         float64 `name:"height" default:"0" help:"Vertical extent"`
	Unit           string  `name:"unit" default:"PT" enum:"PT,EMU" help:"Geometry unit"`
	ObjectID       string  `name:"object-id" help:"Optional stable object ID (5-50 allowed characters)"`
}

func (*SlidesElementCreateLineCmd) Run ¶

type SlidesElementCreateShapeCmd ¶

type SlidesElementCreateShapeCmd struct {
	PresentationID string  `arg:"" name:"presentationId" help:"Presentation ID"`
	SlideID        string  `arg:"" name:"slideId" help:"Slide object ID"`
	Type           string  `name:"type" default:"RECTANGLE" help:"Slides shape type (for example RECTANGLE, TEXT_BOX, ELLIPSE)"`
	X              float64 `name:"x" default:"0" help:"Left position"`
	Y              float64 `name:"y" default:"0" help:"Top position"`
	Width          float64 `name:"width" default:"100" help:"Shape width"`
	Height         float64 `name:"height" default:"100" help:"Shape height"`
	Unit           string  `name:"unit" default:"PT" enum:"PT,EMU" help:"Geometry unit"`
	ObjectID       string  `name:"object-id" help:"Optional stable object ID (5-50 allowed characters)"`
}

func (*SlidesElementCreateShapeCmd) Run ¶

type SlidesElementDeleteCmd ¶

type SlidesElementDeleteCmd struct {
	PresentationID string `arg:"" name:"presentationId" help:"Presentation ID"`
	ObjectID       string `arg:"" name:"objectId" help:"Page element object ID"`
}

func (*SlidesElementDeleteCmd) Run ¶

type SlidesElementGroupCmd ¶

type SlidesElementGroupCmd struct {
	PresentationID string   `arg:"" name:"presentationId" help:"Presentation ID"`
	ObjectIDs      []string `arg:"" name:"objectId" help:"Two or more page element object IDs"`
	GroupID        string   `name:"group-id" help:"Optional stable group object ID"`
}

func (*SlidesElementGroupCmd) Run ¶

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

type SlidesElementStyleCmd ¶

type SlidesElementStyleCmd struct {
	PresentationID     string   `arg:"" name:"presentationId" help:"Presentation ID"`
	ObjectID           string   `arg:"" name:"objectId" help:"Shape or line object ID"`
	Kind               string   `name:"kind" default:"shape" enum:"shape,line" help:"Element kind"`
	FillColor          string   `name:"fill-color" help:"Shape fill as #RGB or #RRGGBB"`
	FillTransparent    bool     `name:"fill-transparent" help:"Remove the shape fill"`
	OutlineColor       string   `name:"outline-color" help:"Shape outline or line color as #RGB or #RRGGBB"`
	OutlineTransparent bool     `name:"outline-transparent" help:"Remove the shape outline or make the line transparent"`
	OutlineWeight      *float64 `name:"outline-weight" help:"Shape outline or line weight in points"`
	OutlineDash        *string  `name:"outline-dash" enum:"SOLID,DOT,DASH,DASH_DOT,LONG_DASH,LONG_DASH_DOT" help:"Shape outline or line dash style"`
}

func (*SlidesElementStyleCmd) Run ¶

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

type SlidesElementTransformCmd ¶

type SlidesElementTransformCmd struct {
	PresentationID string   `arg:"" name:"presentationId" help:"Presentation ID"`
	ObjectID       string   `arg:"" name:"objectId" help:"Page element object ID"`
	ScaleX         *float64 `name:"scale-x" help:"X scale; omitted axis defaults to 1"`
	ScaleY         *float64 `name:"scale-y" help:"Y scale; omitted axis defaults to 1"`
	ShearX         *float64 `name:"shear-x" help:"X shear"`
	ShearY         *float64 `name:"shear-y" help:"Y shear"`
	TranslateX     *float64 `name:"translate-x" help:"X translation"`
	TranslateY     *float64 `name:"translate-y" help:"Y translation"`
	Rotate         *float64 `name:"rotate" help:"Clockwise rotation in degrees around the element origin"`
	Unit           string   `name:"unit" default:"PT" enum:"PT,EMU" help:"Translation unit"`
	ApplyMode      string   `name:"apply-mode" default:"RELATIVE" enum:"RELATIVE,ABSOLUTE" help:"Compose with or replace the existing transform"`
}

func (*SlidesElementTransformCmd) Run ¶

type SlidesElementUngroupCmd ¶

type SlidesElementUngroupCmd struct {
	PresentationID string   `arg:"" name:"presentationId" help:"Presentation ID"`
	GroupIDs       []string `arg:"" name:"groupId" help:"One or more top-level group object IDs"`
}

func (*SlidesElementUngroupCmd) Run ¶

type SlidesElementZOrderCmd ¶

type SlidesElementZOrderCmd struct {
	PresentationID string   `arg:"" name:"presentationId" help:"Presentation ID"`
	ObjectIDs      []string `arg:"" name:"objectId" help:"One or more page element object IDs"`
	Operation      string   `name:"operation" required:"" enum:"BRING_TO_FRONT,BRING_FORWARD,SEND_BACKWARD,SEND_TO_BACK" help:"Stacking operation"`
}

func (*SlidesElementZOrderCmd) Run ¶

type SlidesExportCmd ¶

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"`
	Overwrite      bool           `name:"overwrite" help:"Overwrite an existing output file"`
}

func (*SlidesExportCmd) Run ¶

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

type SlidesInfoCmd ¶

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

func (*SlidesInfoCmd) Run ¶

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

type SlidesInsertImageCmd ¶

type SlidesInsertImageCmd struct {
	PresentationID string  `arg:"" name:"presentationId" help:"Presentation ID"`
	SlideID        string  `arg:"" name:"slideId" help:"Slide object ID to place the image on"`
	Image          string  `arg:"" optional:"" name:"image" help:"Local image file (PNG/JPG/GIF)" type:"existingfile"`
	URL            string  `name:"url" help:"Public HTTPS image URL to insert directly"`
	X              float64 `name:"x" default:"0" help:"Left position of the image, in --unit"`
	Y              float64 `name:"y" default:"0" help:"Top position of the image, in --unit"`
	Width          float64 `name:"width" required:"" help:"Image width, in --unit"`
	Height         float64 `name:"height" default:"0" help:"Image height, in --unit; required with --url, local files preserve aspect ratio when omitted"`
	Unit           string  `name:"unit" enum:"PT,EMU" default:"PT" help:"Measurement unit for x/y/width/height (PT or EMU)"`
}

SlidesInsertImageCmd inserts an image at an explicit position and size on an existing slide. Unlike add-slide (which lays a full-bleed image on a new slide), this places a sized element on a slide you already have, so callers can build native decks via the Slides API and still drop in a logo, chart, or badge at a precise location. Local files use the same temporary Drive upload flow as add-slide; public HTTPS URLs are passed directly to Slides.

func (*SlidesInsertImageCmd) Run ¶

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

type SlidesInsertTextCmd ¶

type SlidesInsertTextCmd struct {
	PresentationID string `arg:"" name:"presentationId" help:"Presentation ID"`
	ObjectID       string `arg:"" name:"objectId" help:"Page element object ID (shape or table) to insert text into"`
	Text           string `arg:"" name:"text" help:"Text to insert (use '-' to read from stdin)"`
	InsertionIndex int64  `name:"insertion-index" help:"Zero-based index where text is inserted within the element's existing text" default:"0"`
	Replace        bool   `name:"replace" help:"Clear existing text in the element before inserting (emits DeleteText + InsertText in the same batch)"`
	Row            *int64 `name:"row" help:"0-based table row index for cell-targeted text; requires --col"`
	Col            *int64 `name:"col" help:"0-based table column index for cell-targeted text; requires --row"`
}

SlidesInsertTextCmd inserts text into an existing text-capable page element. It is a thin wrapper around presentations.batchUpdate with an InsertTextRequest (optionally preceded by a DeleteText request when --replace is set).

func (*SlidesInsertTextCmd) Run ¶

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

Run executes the insert-text command.

type SlidesLinkCmd ¶

type SlidesLinkCmd struct {
	PresentationID string `arg:"" name:"presentationId" help:"Presentation ID"`
	ObjectID       string `arg:"" name:"objectId" help:"Page element object ID containing the text"`
	Range          string `name:"range" required:"" help:"UTF-16 text range as start:end"`
	URL            string `name:"url" help:"External URL to apply as the hyperlink"`
	Clear          bool   `name:"clear" help:"Remove the hyperlink from the selected range"`
}

func (*SlidesLinkCmd) Run ¶

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

type SlidesListSlidesCmd ¶

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

func (*SlidesListSlidesCmd) Run ¶

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

type SlidesLocateCmd ¶

type SlidesLocateCmd struct {
	PresentationID string `arg:"" name:"presentationId" help:"Presentation ID"`
	Text           string `arg:"" name:"text" help:"Literal text to locate"`
	Page           string `name:"page" help:"Limit matches to one slide object ID"`
	MatchCase      bool   `name:"match-case" help:"Use case-sensitive matching"`
	All            bool   `name:"all" help:"Return all matches"`
	Occurrence     *int   `name:"occurrence" help:"Return the Nth occurrence (1-based; default first)"`
	FailEmpty      bool   `name:"fail-empty" aliases:"non-empty,require-results" help:"Exit with code 3 if no matches"`
}

func (*SlidesLocateCmd) Run ¶

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

type SlidesMoveSlideCmd ¶

type SlidesMoveSlideCmd struct {
	PresentationID string `arg:"" name:"presentationId" help:"Presentation ID"`
	SlideID        string `arg:"" name:"slideId" help:"Slide object ID to move (use 'slides list-slides' to find IDs)"`
	ToIndex        *int64 `name:"to-index" required:"" help:"Zero-based insertion index where the slide should be moved"`
}

func (*SlidesMoveSlideCmd) Run ¶

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

type SlidesNewSlideCmd ¶

type SlidesNewSlideCmd struct {
	PresentationID string  `arg:"" name:"presentationId" help:"Presentation ID"`
	Layout         *string `` /* 226-byte string literal not displayed */
	LayoutID       string  `name:"layout-id" help:"Exact presentation layout object ID from 'slides info --json'; mutually exclusive with --layout"`
	Index          *int64  `name:"index" help:"Zero-based insertion index for the new slide"`
}

func (*SlidesNewSlideCmd) Run ¶

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

type SlidesRawCmd ¶

type SlidesRawCmd struct {
	PresentationID string `arg:"" name:"presentationId" help:"Presentation ID"`
	Pretty         bool   `name:"pretty" help:"Pretty-print JSON (default: compact single-line)"`
}

SlidesRawCmd dumps the full Presentations.Get response as JSON. The Slides API has no field mask, so output is unconditionally lossless. Note: response may contain short-lived authenticated image/video URLs (see docs/raw-audit.md for the risk assessment).

REST reference: https://developers.google.com/slides/api/reference/rest/v1/presentations/get Go type: https://pkg.go.dev/google.golang.org/api/slides/v1#Presentation

func (*SlidesRawCmd) Run ¶

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

type SlidesReadSlideCmd ¶

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)"`
	Detail         bool   `name:"detail" help:"Include normalized element geometry, text runs/styles, paragraphs, and table cells"`
}

func (*SlidesReadSlideCmd) Run ¶

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

type SlidesReplaceSlideCmd ¶

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:"" optional:"" name:"image" help:"Local image file (PNG/JPG/GIF)" type:"existingfile"`
	URL            string  `name:"url" help:"Public HTTPS image URL to use directly"`
	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 ¶

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

type SlidesReplaceTextCmd ¶

type SlidesReplaceTextCmd struct {
	PresentationID string   `arg:"" name:"presentationId" help:"Presentation ID"`
	Find           string   `arg:"" name:"find" help:"Substring to find"`
	Replacement    string   `arg:"" name:"replacement" help:"Replacement text"`
	MatchCase      bool     `name:"match-case" help:"Case-sensitive match (default: false)"`
	Pages          []string `name:"page" help:"Restrict replacement to specific slide object IDs (repeatable)"`
	ObjectID       string   `name:"object" help:"Restrict replacement to a single shape text object ID"`
	All            bool     `name:"all" help:"Replace matching text across the entire presentation"`
}

SlidesReplaceTextCmd performs a find-and-replace across a presentation. It is a thin wrapper around presentations.batchUpdate with a single ReplaceAllTextRequest.

func (*SlidesReplaceTextCmd) Run ¶

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

Run executes the replace-text command.

type SlidesSkipSlideCmd ¶ added in v0.38.0

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

func (*SlidesSkipSlideCmd) Run ¶ added in v0.38.0

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

type SlidesStyleTextCmd ¶

type SlidesStyleTextCmd struct {
	PresentationID string  `arg:"" name:"presentationId" help:"Presentation ID"`
	ObjectID       string  `arg:"" name:"objectId" help:"Page element object ID containing the text"`
	Range          string  `name:"range" required:"" help:"UTF-16 text range as start:end"`
	Bold           bool    `name:"bold" help:"Set bold"`
	NoBold         bool    `name:"no-bold" help:"Clear bold"`
	Italic         bool    `name:"italic" help:"Set italic"`
	NoItalic       bool    `name:"no-italic" help:"Clear italic"`
	Underline      bool    `name:"underline" help:"Set underline"`
	NoUnderline    bool    `name:"no-underline" help:"Clear underline"`
	TextColor      string  `name:"text-color" help:"Text color as #RRGGBB or #RGB"`
	Size           float64 `name:"size" help:"Font size in points"`
	Font           string  `name:"font" help:"Font family, for example Arial or Georgia"`
}

func (*SlidesStyleTextCmd) Run ¶

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

type SlidesTableBorderCmd ¶

type SlidesTableBorderCmd struct {
	Style SlidesTableBorderStyleCmd `cmd:"" name:"style" help:"Style borders around or within a table cell range"`
}

type SlidesTableBorderStyleCmd ¶

type SlidesTableBorderStyleCmd struct {
	PresentationID string   `arg:"" name:"presentationId" help:"Presentation ID"`
	TableObjectID  string   `arg:"" name:"tableObjectId" help:"Table object ID"`
	Row            int64    `name:"row" required:"" help:"Zero-based starting row"`
	Col            int64    `name:"col" required:"" help:"Zero-based starting column"`
	RowSpan        int64    `name:"row-span" default:"1" help:"Number of rows in the range"`
	ColSpan        int64    `name:"col-span" default:"1" help:"Number of columns in the range"`
	Position       string   `` /* 157-byte string literal not displayed */
	BorderColor    string   `name:"border-color" help:"Border color as #RGB or #RRGGBB"`
	Transparent    bool     `name:"transparent" help:"Make selected borders transparent"`
	Weight         *float64 `name:"weight" help:"Border weight in points"`
	Dash           *string  `name:"dash" enum:"SOLID,DOT,DASH,DASH_DOT,LONG_DASH,LONG_DASH_DOT" help:"Border dash style"`
}

func (*SlidesTableBorderStyleCmd) Run ¶

type SlidesTableCellCmd ¶

type SlidesTableCellCmd struct {
	Style SlidesTableCellStyleCmd `cmd:"" name:"style" help:"Style one zero-based table cell"`
}

type SlidesTableCellStyleCmd ¶

type SlidesTableCellStyleCmd struct {
	PresentationID  string  `arg:"" name:"presentationId" help:"Presentation ID"`
	TableObjectID   string  `arg:"" name:"tableObjectId" help:"Table object ID"`
	Row             int64   `name:"row" required:"" help:"Zero-based row"`
	Col             int64   `name:"col" required:"" help:"Zero-based column"`
	FillColor       string  `name:"fill-color" help:"Cell fill as #RGB or #RRGGBB"`
	FillTransparent bool    `name:"fill-transparent" help:"Remove the cell fill"`
	ContentAlign    *string `name:"content-align" enum:"TOP,MIDDLE,BOTTOM" help:"Vertical content alignment"`
	Range           string  `name:"range" help:"Optional UTF-16 text range as start:end; defaults to all cell text"`
	Bold            bool    `name:"bold" help:"Set cell text bold"`
	NoBold          bool    `name:"no-bold" help:"Clear cell text bold"`
	Italic          bool    `name:"italic" help:"Set cell text italic"`
	NoItalic        bool    `name:"no-italic" help:"Clear cell text italic"`
	Underline       bool    `name:"underline" help:"Set cell text underline"`
	NoUnderline     bool    `name:"no-underline" help:"Clear cell text underline"`
	TextColor       string  `name:"text-color" help:"Cell text color as #RGB or #RRGGBB"`
	Size            float64 `name:"size" help:"Cell text size in points"`
	Font            string  `name:"font" help:"Cell text font family"`
}

func (*SlidesTableCellStyleCmd) Run ¶

type SlidesTableCmd ¶

type SlidesTableCmd struct {
	Create  SlidesTableCreateCmd  `cmd:"" name:"create" aliases:"add" help:"Create an auto-sized native table on a slide"`
	Row     SlidesTableRowCmd     `cmd:"" name:"row" help:"Insert, delete, or size table rows"`
	Column  SlidesTableColumnCmd  `cmd:"" name:"column" aliases:"col" help:"Insert, delete, or size table columns"`
	Cell    SlidesTableCellCmd    `cmd:"" name:"cell" help:"Style table cells"`
	Border  SlidesTableBorderCmd  `cmd:"" name:"border" help:"Style table borders"`
	Merge   SlidesTableMergeCmd   `cmd:"" name:"merge" help:"Merge a rectangular table cell range"`
	Unmerge SlidesTableUnmergeCmd `cmd:"" name:"unmerge" aliases:"split" help:"Unmerge cells in a rectangular table range"`
}

type SlidesTableColumnCmd ¶

type SlidesTableColumnCmd struct {
	Insert SlidesTableColumnInsertCmd `cmd:"" name:"insert" aliases:"add" help:"Insert columns left or right of a zero-based column"`
	Delete SlidesTableColumnDeleteCmd `cmd:"" name:"delete" aliases:"rm,remove,del" help:"Delete the column containing a zero-based table cell"`
	Size   SlidesTableColumnSizeCmd   `cmd:"" name:"size" help:"Set a column's width"`
}

type SlidesTableColumnDeleteCmd ¶

type SlidesTableColumnDeleteCmd struct {
	PresentationID string `arg:"" name:"presentationId" help:"Presentation ID"`
	TableObjectID  string `arg:"" name:"tableObjectId" help:"Table object ID"`
	Col            int64  `name:"col" required:"" help:"Zero-based column to delete"`
}

func (*SlidesTableColumnDeleteCmd) Run ¶

type SlidesTableColumnInsertCmd ¶

type SlidesTableColumnInsertCmd struct {
	PresentationID string `arg:"" name:"presentationId" help:"Presentation ID"`
	TableObjectID  string `arg:"" name:"tableObjectId" help:"Table object ID"`
	Col            int64  `name:"col" required:"" help:"Zero-based reference column"`
	Count          int64  `name:"count" default:"1" help:"Number of columns to insert (1-20)"`
	Right          bool   `name:"right" help:"Insert right of the reference column instead of left"`
}

func (*SlidesTableColumnInsertCmd) Run ¶

type SlidesTableColumnSizeCmd ¶

type SlidesTableColumnSizeCmd struct {
	PresentationID string  `arg:"" name:"presentationId" help:"Presentation ID"`
	TableObjectID  string  `arg:"" name:"tableObjectId" help:"Table object ID"`
	Col            int64   `name:"col" required:"" help:"Zero-based column"`
	Width          float64 `name:"width" required:"" help:"Column width in points (>=32)"`
}

func (*SlidesTableColumnSizeCmd) Run ¶

type SlidesTableCreateCmd ¶

type SlidesTableCreateCmd struct {
	PresentationID string `arg:"" name:"presentationId" help:"Presentation ID"`
	SlideID        string `arg:"" name:"slideId" help:"Slide object ID to place the table on"`
	ObjectID       string `name:"object-id" help:"Optional table object ID to assign"`
	Rows           int64  `name:"rows" required:"" help:"Number of table rows (>=1)"`
	Cols           int64  `name:"cols" required:"" help:"Number of table columns (>=1)"`
}

func (*SlidesTableCreateCmd) Run ¶

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

type SlidesTableMergeCmd ¶

type SlidesTableMergeCmd struct {
	PresentationID string `arg:"" name:"presentationId" help:"Presentation ID"`
	TableObjectID  string `arg:"" name:"tableObjectId" help:"Table object ID"`
	Row            int64  `name:"row" required:"" help:"Zero-based starting row"`
	Col            int64  `name:"col" required:"" help:"Zero-based starting column"`
	RowSpan        int64  `name:"row-span" default:"1" help:"Number of rows in the range"`
	ColSpan        int64  `name:"col-span" default:"1" help:"Number of columns in the range"`
}

func (*SlidesTableMergeCmd) Run ¶

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

type SlidesTableRowCmd ¶

type SlidesTableRowCmd struct {
	Insert SlidesTableRowInsertCmd `cmd:"" name:"insert" aliases:"add" help:"Insert rows above or below a zero-based row"`
	Delete SlidesTableRowDeleteCmd `cmd:"" name:"delete" aliases:"rm,remove,del" help:"Delete the row containing a zero-based table cell"`
	Size   SlidesTableRowSizeCmd   `cmd:"" name:"size" help:"Set a row's minimum height"`
}

type SlidesTableRowDeleteCmd ¶

type SlidesTableRowDeleteCmd struct {
	PresentationID string `arg:"" name:"presentationId" help:"Presentation ID"`
	TableObjectID  string `arg:"" name:"tableObjectId" help:"Table object ID"`
	Row            int64  `name:"row" required:"" help:"Zero-based row to delete"`
}

func (*SlidesTableRowDeleteCmd) Run ¶

type SlidesTableRowInsertCmd ¶

type SlidesTableRowInsertCmd struct {
	PresentationID string `arg:"" name:"presentationId" help:"Presentation ID"`
	TableObjectID  string `arg:"" name:"tableObjectId" help:"Table object ID"`
	Row            int64  `name:"row" required:"" help:"Zero-based reference row"`
	Count          int64  `name:"count" default:"1" help:"Number of rows to insert (1-20)"`
	Below          bool   `name:"below" help:"Insert below the reference row instead of above"`
}

func (*SlidesTableRowInsertCmd) Run ¶

type SlidesTableRowSizeCmd ¶

type SlidesTableRowSizeCmd struct {
	PresentationID string  `arg:"" name:"presentationId" help:"Presentation ID"`
	TableObjectID  string  `arg:"" name:"tableObjectId" help:"Table object ID"`
	Row            int64   `name:"row" required:"" help:"Zero-based row"`
	Height         float64 `name:"height" required:"" help:"Minimum row height in points (>=0)"`
}

func (*SlidesTableRowSizeCmd) Run ¶

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

type SlidesTableUnmergeCmd ¶

type SlidesTableUnmergeCmd struct {
	PresentationID string `arg:"" name:"presentationId" help:"Presentation ID"`
	TableObjectID  string `arg:"" name:"tableObjectId" help:"Table object ID"`
	Row            int64  `name:"row" required:"" help:"Zero-based starting row"`
	Col            int64  `name:"col" required:"" help:"Zero-based starting column"`
	RowSpan        int64  `name:"row-span" default:"1" help:"Number of rows in the range"`
	ColSpan        int64  `name:"col-span" default:"1" help:"Number of columns in the range"`
}

func (*SlidesTableUnmergeCmd) Run ¶

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

type SlidesThumbnailCmd ¶

type SlidesThumbnailCmd 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)"`
	Size           string `name:"size" help:"Thumbnail size: small|medium|large" default:"large"`
	Format         string `name:"format" help:"Thumbnail format: png|jpeg" default:"png"`
	Output         string `name:"out" aliases:"output" help:"Write the thumbnail image to a local file"`
	Overwrite      bool   `name:"overwrite" help:"Overwrite an existing output file"`
}

func (*SlidesThumbnailCmd) Run ¶

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

type SlidesUnskipSlideCmd ¶ added in v0.38.0

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

func (*SlidesUnskipSlideCmd) Run ¶ added in v0.38.0

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

type SlidesUpdateNotesCmd ¶

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 ¶

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

type TableInserter ¶

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

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

func NewTableInserter ¶

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

func (*TableInserter) InsertNativeTable ¶

func (ti *TableInserter) InsertNativeTable(ctx context.Context, tableIndex int64, cells [][]string, tabID 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 ¶

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:"Materialize repeated tasks: daily, weekly, monthly, yearly"`
	Recur       string `name:"recur" help:"Alias for --repeat cadence: daily, weekly, monthly, yearly"`
	RecurRRule  string `name:"recur-rrule" help:"Alias for --repeat cadence via RRULE (supports FREQ + optional INTERVAL)"`
	RepeatCount int    `name:"repeat-count" help:"Number of occurrences to create (requires --repeat, --recur, or --recur-rrule)"`
	RepeatUntil string `name:"repeat-until" help:"Repeat until date/time (RFC3339 or YYYY-MM-DD; requires --repeat, --recur, or --recur-rrule)"`
}

func (*TasksAddCmd) Run ¶

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

type TasksClearCmd ¶

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

func (*TasksClearCmd) Run ¶

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

type TasksCmd ¶

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"`
	Raw    TasksRawCmd    `cmd:"" name:"raw" help:"Dump raw Google Tasks API response as JSON (Tasks.Get; lossless; for scripting and LLM consumption)"`
}

type TasksDeleteCmd ¶

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

func (*TasksDeleteCmd) Run ¶

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

type TasksDoneCmd ¶

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

func (*TasksDoneCmd) Run ¶

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

type TasksGetCmd ¶

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

func (*TasksGetCmd) Run ¶

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

type TasksListCmd ¶

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 ¶

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

type TasksListsCmd ¶

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 ¶

type TasksListsCreateCmd struct {
	Title []string `arg:"" name:"title" help:"Task list title"`
}

func (*TasksListsCreateCmd) Run ¶

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

type TasksListsListCmd ¶

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 ¶

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

type TasksRawCmd ¶

type TasksRawCmd struct {
	TasklistID string `arg:"" name:"tasklistId" help:"Task list ID"`
	TaskID     string `arg:"" name:"taskId" help:"Task ID"`
	Pretty     bool   `name:"pretty" help:"Pretty-print JSON (default: compact single-line)"`
}

TasksRawCmd dumps the full Tasks.Get response as JSON.

REST reference: https://developers.google.com/tasks/reference/rest/v1/tasks/get Go type: https://pkg.go.dev/google.golang.org/api/tasks/v1#Task

func (*TasksRawCmd) Run ¶

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

type TasksUndoCmd ¶

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

func (*TasksUndoCmd) Run ¶

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

type TasksUpdateCmd ¶

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 ¶

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

type TimeCmd ¶

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

type TimeNowCmd ¶

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

func (*TimeNowCmd) Run ¶

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

type TimeRange ¶

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

TimeRange represents a resolved time range with timezone.

func ResolveTimeRange ¶

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 ¶

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 ¶

func (tr *TimeRange) FormatHuman() string

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

func (*TimeRange) FormatRFC3339 ¶

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

FormatRFC3339 formats a time as RFC3339 for API calls.

type TimeRangeDefaults ¶

type TimeRangeDefaults struct {
	FromOffset   time.Duration
	ToOffset     time.Duration
	ToFromOffset time.Duration
}

TimeRangeDefaults controls the default window when flags are missing.

type TimeRangeFlags ¶

type TimeRangeFlags struct {
	From      string `name:"from" help:"Start time (RFC3339, date, or relative: now, today, tomorrow, monday)"`
	To        string `name:"to" help:"End time (RFC3339, date, or relative: now, today, tomorrow, monday)"`
	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:"Window length in days, measured from --from when given, otherwise from today" 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 UpdateCmd ¶

type UpdateCmd struct {
	Status UpdateStatusCmd `cmd:"" name:"status" aliases:"check" help:"Show installed and latest gogcli release status"`
}

type UpdateStatusCmd ¶

type UpdateStatusCmd struct {
	Timeout time.Duration `name:"timeout" help:"HTTP timeout for GitHub release metadata" default:"10s"`
}

func (*UpdateStatusCmd) Run ¶

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

type Uploader ¶

type Uploader interface {
	UploadAsset(ctx context.Context, name, mime string, body []byte) (ImageRef, error)
	DeleteAsset(ctx context.Context, fileID string) error
}

Uploader abstracts the Drive operations the pipeline needs. Real impl (Task 14) wraps drive.Service; tests use fakeDriveUploader.

type VersionCmd ¶

type VersionCmd struct{}

func (*VersionCmd) Run ¶

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

type YouTubeActivitiesCmd ¶

type YouTubeActivitiesCmd struct {
	List YouTubeActivitiesListCmd `cmd:"" name:"list" aliases:"ls" help:"List activities for a channel (or authenticated user)"`
}

type YouTubeActivitiesListCmd ¶

type YouTubeActivitiesListCmd struct {
	ChannelID string `name:"channel-id" help:"Channel ID"`
	Mine      bool   `name:"mine" help:"Use authenticated user's channel (requires -a account)"`
	Max       int64  `name:"max" aliases:"limit" help:"Max results" default:"25"`
	Page      string `name:"page" help:"Page token"`
}

func (*YouTubeActivitiesListCmd) Run ¶

type YouTubeChannelsCmd ¶

type YouTubeChannelsCmd struct {
	List YouTubeChannelsListCmd `cmd:"" name:"list" aliases:"ls" help:"List channels by ID or authenticated user"`
}

type YouTubeChannelsListCmd ¶

type YouTubeChannelsListCmd struct {
	ID   string `name:"id" help:"Comma-separated channel IDs"`
	Mine bool   `name:"mine" help:"Use authenticated user (requires -a account)"`
	Max  int64  `name:"max" aliases:"limit" help:"Max results" default:"25"`
	Page string `name:"page" help:"Page token"`
}

func (*YouTubeChannelsListCmd) Run ¶

type YouTubeCmd ¶

type YouTubeCmd struct {
	Activities    YouTubeActivitiesCmd    `cmd:"" name:"activities" aliases:"activity" help:"List channel activities"`
	Videos        YouTubeVideosCmd        `cmd:"" name:"videos" aliases:"video" help:"List or get videos"`
	Playlists     YouTubePlaylistsCmd     `cmd:"" name:"playlists" aliases:"playlist" help:"Manage playlists"`
	Comments      YouTubeCommentsCmd      `cmd:"" name:"comments" aliases:"comment" help:"List comment threads"`
	Channels      YouTubeChannelsCmd      `cmd:"" name:"channels" aliases:"channel" help:"List channels"`
	Search        YouTubeSearchCmd        `cmd:"" name:"search" aliases:"find" help:"Search YouTube for videos, channels, or playlists"`
	Subscriptions YouTubeSubscriptionsCmd `cmd:"" name:"subscriptions" aliases:"subscription" help:"Manage channel subscriptions"`
}

type YouTubeCommentsCmd ¶

type YouTubeCommentsCmd struct {
	List YouTubeCommentsListCmd `cmd:"" name:"list" aliases:"ls" help:"List comment threads for a video or channel"`
}

type YouTubeCommentsListCmd ¶

type YouTubeCommentsListCmd struct {
	VideoID   string `name:"video-id" help:"Video ID (list top-level comments for this video)"`
	ChannelID string `name:"channel-id" help:"Channel ID (list comments that mention the channel)"`
	Max       int64  `name:"max" aliases:"limit" help:"Max results" default:"25"`
	Page      string `name:"page" help:"Page token"`
}

func (*YouTubeCommentsListCmd) Run ¶

type YouTubePlaylistsAddCmd ¶

type YouTubePlaylistsAddCmd struct {
	PlaylistID string `name:"playlist-id" required:"" help:"Playlist ID"`
	VideoID    string `name:"video-id" required:"" help:"Video ID to add"`
	Position   int64  `name:"position" help:"Position in playlist (0-based); appends if not set" default:"-1"`
}

func (*YouTubePlaylistsAddCmd) Run ¶

type YouTubePlaylistsCmd ¶

type YouTubePlaylistsCmd struct {
	List   YouTubePlaylistsListCmd   `cmd:"" name:"list" aliases:"ls" help:"List playlists by channel or authenticated user"`
	Items  YouTubePlaylistsItemsCmd  `cmd:"" name:"items" aliases:"item" help:"List the videos inside a playlist"`
	Create YouTubePlaylistsCreateCmd `cmd:"" name:"create" help:"Create a new playlist"`
	Add    YouTubePlaylistsAddCmd    `cmd:"" name:"add" help:"Add a video to a playlist"`
	Remove YouTubePlaylistsRemoveCmd `cmd:"" name:"remove" aliases:"rm" help:"Remove a video from a playlist"`
	Delete YouTubePlaylistsDeleteCmd `cmd:"" name:"delete" aliases:"del" help:"Delete a playlist"`
}

type YouTubePlaylistsCreateCmd ¶

type YouTubePlaylistsCreateCmd struct {
	Title       string `name:"title" required:"" help:"Playlist title"`
	Description string `name:"description" help:"Playlist description"`
	Privacy     string `name:"privacy" help:"Privacy: public, unlisted, private" default:"private" enum:"public,unlisted,private"`
}

func (*YouTubePlaylistsCreateCmd) Run ¶

type YouTubePlaylistsDeleteCmd ¶

type YouTubePlaylistsDeleteCmd struct {
	PlaylistID string `arg:"" name:"playlist-id" help:"Playlist ID to delete"`
}

func (*YouTubePlaylistsDeleteCmd) Run ¶

type YouTubePlaylistsItemsCmd ¶

type YouTubePlaylistsItemsCmd struct {
	List YouTubePlaylistsItemsListCmd `cmd:"" name:"list" aliases:"ls" help:"List the videos inside a playlist"`
}

type YouTubePlaylistsItemsListCmd ¶

type YouTubePlaylistsItemsListCmd struct {
	PlaylistID string `name:"playlist-id" help:"Playlist ID (use LL for your liked videos; LL/private playlists require -a account)"`
	Max        int64  `name:"max" aliases:"limit" help:"Max results per page" default:"50"`
	Page       string `name:"page" aliases:"cursor" help:"Page token"`
	All        bool   `name:"all" aliases:"all-pages,allpages" help:"Fetch all pages"`
}

func (*YouTubePlaylistsItemsListCmd) Run ¶

type YouTubePlaylistsListCmd ¶

type YouTubePlaylistsListCmd struct {
	ChannelID string `name:"channel-id" help:"Channel ID"`
	Mine      bool   `name:"mine" help:"Use authenticated user (requires -a account)"`
	Max       int64  `name:"max" aliases:"limit" help:"Max results" default:"25"`
	Page      string `name:"page" help:"Page token"`
}

func (*YouTubePlaylistsListCmd) Run ¶

type YouTubePlaylistsRemoveCmd ¶

type YouTubePlaylistsRemoveCmd struct {
	PlaylistID string `name:"playlist-id" help:"Playlist ID (required with --video-id)"`
	VideoID    string `name:"video-id" help:"Video ID to remove"`
	ItemID     string `name:"item-id" help:"Playlist item ID to remove directly"`
}

func (*YouTubePlaylistsRemoveCmd) Run ¶

type YouTubeSearchCmd ¶

type YouTubeSearchCmd struct {
	List YouTubeSearchListCmd `cmd:"" name:"list" aliases:"ls" help:"Search for videos, channels, or playlists"`
}

type YouTubeSearchListCmd ¶

type YouTubeSearchListCmd struct {
	Query     string `arg:"" help:"Search query"`
	Type      string `name:"type" help:"Resource type: video, channel, playlist (comma-separated)" default:"video"`
	Order     string `` /* 161-byte string literal not displayed */
	ChannelID string `name:"channel-id" help:"Restrict results to a specific channel"`
	Max       int64  `name:"max" aliases:"limit" help:"Max results" default:"25"`
	Page      string `name:"page" help:"Page token"`
}

func (*YouTubeSearchListCmd) Run ¶

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

type YouTubeSubscriptionsCmd ¶

type YouTubeSubscriptionsCmd struct {
	List        YouTubeSubscriptionsListCmd        `cmd:"" name:"list" aliases:"ls" help:"List subscriptions for authenticated user"`
	Subscribe   YouTubeSubscriptionsSubscribeCmd   `cmd:"" name:"subscribe" help:"Subscribe to a channel"`
	Unsubscribe YouTubeSubscriptionsUnsubscribeCmd `cmd:"" name:"unsubscribe" help:"Unsubscribe from a channel"`
}

type YouTubeSubscriptionsListCmd ¶

type YouTubeSubscriptionsListCmd struct {
	Max  int64  `name:"max" aliases:"limit" help:"Max results per page" default:"50"`
	Page string `name:"page" aliases:"cursor" help:"Page token"`
	All  bool   `name:"all" aliases:"all-pages,allpages" help:"Fetch all pages"`
}

func (*YouTubeSubscriptionsListCmd) Run ¶

type YouTubeSubscriptionsSubscribeCmd ¶

type YouTubeSubscriptionsSubscribeCmd struct {
	ChannelID string `name:"channel-id" help:"Channel ID to subscribe to"`
}

func (*YouTubeSubscriptionsSubscribeCmd) Run ¶

type YouTubeSubscriptionsUnsubscribeCmd ¶

type YouTubeSubscriptionsUnsubscribeCmd struct {
	ID        string `name:"id" help:"Subscription ID (from subscriptions list)"`
	ChannelID string `name:"channel-id" help:"Channel ID (looked up to find subscription ID)"`
}

func (*YouTubeSubscriptionsUnsubscribeCmd) Run ¶

type YouTubeVideosCmd ¶

type YouTubeVideosCmd struct {
	List YouTubeVideosListCmd `cmd:"" name:"list" aliases:"ls" help:"List videos by ID, chart, or your rating"`
}

type YouTubeVideosListCmd ¶

type YouTubeVideosListCmd struct {
	ID       string `name:"id" help:"Comma-separated video IDs"`
	Chart    string `name:"chart" help:"Chart: mostPopular (regionCode required)"`
	Region   string `name:"region" help:"Region code (e.g. US) for chart"`
	MyRating string `name:"my-rating" help:"Your rated videos: like (liked videos) or dislike (requires -a account)"`
	Parts    string `name:"parts" help:"Comma-separated videos.list parts or 'all' (default: snippet,contentDetails,statistics)"`
	Max      int64  `name:"max" aliases:"limit" help:"Max results" default:"25"`
	Page     string `name:"page" help:"Page token"`
}

func (*YouTubeVideosListCmd) Run ¶

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

type ZoomAuthCmd ¶

type ZoomAuthCmd struct {
	Setup  ZoomAuthSetupCmd  `cmd:"" name:"setup" help:"Store Zoom Server-to-Server OAuth credentials"`
	Doctor ZoomAuthDoctorCmd `cmd:"" name:"doctor" help:"Validate Zoom credentials"`
}

type ZoomAuthDoctorCmd ¶

type ZoomAuthDoctorCmd struct {
	Alias string `name:"alias" help:"Zoom credential alias" default:"default"`
}

func (*ZoomAuthDoctorCmd) Run ¶

type ZoomAuthSetupCmd ¶

type ZoomAuthSetupCmd struct {
	Alias        string `name:"alias" help:"Zoom credential alias" default:"default"`
	AccountID    string `name:"account-id" help:"Zoom Server-to-Server OAuth account ID" env:"GOG_ZOOM_ACCOUNT_ID"`
	ClientID     string `name:"client-id" help:"Zoom Server-to-Server OAuth client ID" env:"GOG_ZOOM_CLIENT_ID"`
	ClientSecret string `name:"client-secret" help:"Zoom Server-to-Server OAuth client secret" env:"GOG_ZOOM_CLIENT_SECRET"`
	SkipValidate bool   `name:"skip-validate" help:"Store credentials without calling Zoom /users/me"`
}

func (*ZoomAuthSetupCmd) Run ¶

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

type ZoomCmd ¶

type ZoomCmd struct {
	Auth ZoomAuthCmd `cmd:"" name:"auth" help:"Manage Zoom Server-to-Server OAuth credentials"`
}

Source Files ¶

Jump to

Keyboard shortcuts

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