Second batch from the 07-28 root-cause analysis, all aimed at the retry that
follows a rejection.
Enum-bearing type mismatches now answer with the allowed values instead of a
whole-payload skeleton. --border-styles with weight:1 used to reply "expected
type string, got number; expected shape: {"bottom": {…}, "left": {…}, …}",
which never mentions thin/medium/thick; the skeleton is for container-shape
confusion, so a field that declares an enum falls through to the hint that
names it. The --border-styles help now inlines both vocabularies (style is the
line type, weight the thickness and a string, not a pixel number), spells the
{all:{…}} shorthand, and states that no --border-all / --border-top /
--border-color exist. --word-wrap additionally accepts the Google Sheets
wrapStrategy words wrap and clip.
The sheet selector states that one of the pair is required rather than only
that they are mutually exclusive, in help across all shortcuts that take it,
and the rejection hints where the name comes from: a fresh workbook has one
sheet named Sheet1, any other needs a +workbook-info lookup. Eval traces
recover on the very next call, so the gap was which name to pass.
A --sheets payload written as a bare array now says the top level must be
{"sheets":[…]} instead of quoting Go's "cannot unmarshal array into Go value
of type struct { Sheets []sheets.tableSheetIn }", which names the internal
type rather than the fix. The skeleton hint is unchanged.
{Name:"number-format",Kind:"own",Type:"string",Required:"optional",Desc:"Number format pattern (e.g. text `@`, number `0.00`, currency `$#,##0.00`, date `mm/dd/yyyy`)"},
{Name:"border-styles",Kind:"own",Type:"string",Required:"optional",Desc:"Border config JSON (same shape as in +cells-set-style)",Input:[]string{"file","stdin"}},
{Name:"border-styles",Kind:"own",Type:"string",Required:"optional",Desc:"Border config JSON (same shape as in +cells-set-style): `{ top|bottom|left|right|all: {style,weight,color} }`; style = solid|dashed|dotted|double|none, weight = thin|medium|thick (string), color = hex like #000000",Input:[]string{"file","stdin"}},
@@ -59,8 +59,8 @@ var flagDefs = map[string]commandDef{
Flags:[]flagDef{
{Name:"url",Kind:"public",Type:"string",Required:"xor",Desc:"Spreadsheet URL (XOR with `--spreadsheet-token`)"},
{Name:"spreadsheet-token",Kind:"public",Type:"string",Required:"xor",Desc:"Spreadsheet token (XOR with `--url`)"},
{Name:"sheet-id",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet reference_id (XOR with `--sheet-name`)"},
{Name:"sheet-name",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet name (XOR with `--sheet-id`)"},
{Name:"sheet-id",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet reference_id — required: pass this or `--sheet-name` (exactly one of the two)"},
{Name:"sheet-name",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet name — required: pass this or `--sheet-id` (exactly one of the two)"},
{Name:"range",Kind:"own",Type:"string",Required:"required",Desc:"Range to clear (A1 notation)"},
{Name:"yes",Kind:"system",Type:"bool",Required:"required",Desc:"Confirm destructive write (exit code 10 without this flag); clear is irreversible"},
@@ -72,8 +72,8 @@ var flagDefs = map[string]commandDef{
Flags:[]flagDef{
{Name:"url",Kind:"public",Type:"string",Required:"xor",Desc:"Spreadsheet URL (XOR with `--spreadsheet-token`)"},
{Name:"spreadsheet-token",Kind:"public",Type:"string",Required:"xor",Desc:"Spreadsheet token (XOR with `--url`)"},
{Name:"sheet-id",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet reference_id (XOR with `--sheet-name`)"},
{Name:"sheet-name",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet name (XOR with `--sheet-id`)"},
{Name:"sheet-id",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet reference_id — required: pass this or `--sheet-name` (exactly one of the two)"},
{Name:"sheet-name",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet name — required: pass this or `--sheet-id` (exactly one of the two)"},
{Name:"range",Kind:"own",Type:"string",Required:"required",Desc:"A1 range, e.g. `A1:F10` (no sheet prefix — use `--sheet-id` / `--sheet-name` to select the sheet)"},
{Name:"include",Kind:"own",Type:"string_slice",Required:"optional",Desc:"Comma-separated info categories to include. `truncation` additionally estimates whether each cell's content is clipped (by row height / col width / font size / wrap) and returns `isRowTruncated` / `isColTruncated` (extra compute; enable only for layout checks or before adjusting row heights / column widths)",Enum:[]string{"value","formula","style","comment","data_validation","truncation"}},
{Name:"max-chars",Kind:"own",Type:"int",Required:"optional",Desc:"Max output chars per call; default 500000 (safety cap). For a full untruncated read, use --output-path to dump to a file (auto-unlimited); only lower it (e.g. 25000) when you want results inline without a file, paging via has_more.",Default:"500000"},
@@ -87,8 +87,8 @@ var flagDefs = map[string]commandDef{
Flags:[]flagDef{
{Name:"url",Kind:"public",Type:"string",Required:"xor",Desc:"Spreadsheet URL (XOR with `--spreadsheet-token`)"},
{Name:"spreadsheet-token",Kind:"public",Type:"string",Required:"xor",Desc:"Spreadsheet token (XOR with `--url`)"},
{Name:"sheet-id",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet reference_id (XOR with `--sheet-name`)"},
{Name:"sheet-name",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet name (XOR with `--sheet-id`)"},
{Name:"sheet-id",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet reference_id — required: pass this or `--sheet-name` (exactly one of the two)"},
{Name:"sheet-name",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet name — required: pass this or `--sheet-id` (exactly one of the two)"},
{Name:"range",Kind:"own",Type:"string",Required:"required",Desc:"Range to merge / unmerge (A1 notation)"},
{Name:"merge-type",Kind:"own",Type:"string",Required:"optional",Desc:"Merge direction (`+cells-merge` only)",Default:"all",Enum:[]string{"all","rows","columns"}},
@@ -99,8 +99,8 @@ var flagDefs = map[string]commandDef{
Flags:[]flagDef{
{Name:"url",Kind:"public",Type:"string",Required:"xor",Desc:"Spreadsheet URL (XOR with `--spreadsheet-token`)"},
{Name:"spreadsheet-token",Kind:"public",Type:"string",Required:"xor",Desc:"Spreadsheet token (XOR with `--url`)"},
{Name:"sheet-id",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet reference_id (XOR with `--sheet-name`)"},
{Name:"sheet-name",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet name (XOR with `--sheet-id`)"},
{Name:"sheet-id",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet reference_id — required: pass this or `--sheet-name` (exactly one of the two)"},
{Name:"sheet-name",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet name — required: pass this or `--sheet-id` (exactly one of the two)"},
{Name:"find",Kind:"own",Type:"string",Required:"required",Desc:"Text to find for replacement"},
{Name:"replacement",Kind:"own",Type:"string",Required:"required",Desc:"Replacement text; pass empty string `\"\"` to delete matched content"},
{Name:"range",Kind:"own",Type:"string",Required:"optional",Desc:"Replace range (A1 notation); whole sheet when omitted"},
@@ -116,8 +116,8 @@ var flagDefs = map[string]commandDef{
Flags:[]flagDef{
{Name:"url",Kind:"public",Type:"string",Required:"xor",Desc:"Spreadsheet URL (XOR with `--spreadsheet-token`)"},
{Name:"spreadsheet-token",Kind:"public",Type:"string",Required:"xor",Desc:"Spreadsheet token (XOR with `--url`)"},
{Name:"sheet-id",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet reference_id (XOR with `--sheet-name`)"},
{Name:"sheet-name",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet name (XOR with `--sheet-id`)"},
{Name:"sheet-id",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet reference_id — required: pass this or `--sheet-name` (exactly one of the two)"},
{Name:"sheet-name",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet name — required: pass this or `--sheet-id` (exactly one of the two)"},
{Name:"find",Kind:"own",Type:"string",Required:"required",Desc:"Text to find (interpreted as regex when `--regex` is set)"},
{Name:"range",Kind:"own",Type:"string",Required:"optional",Desc:"Search range (A1 notation); whole sheet when omitted"},
@@ -134,8 +134,8 @@ var flagDefs = map[string]commandDef{
Flags:[]flagDef{
{Name:"url",Kind:"public",Type:"string",Required:"xor",Desc:"Spreadsheet URL (XOR with `--spreadsheet-token`)"},
{Name:"spreadsheet-token",Kind:"public",Type:"string",Required:"xor",Desc:"Spreadsheet token (XOR with `--url`)"},
{Name:"sheet-id",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet reference_id (XOR with `--sheet-name`); not accepted with `--writes` (each writes item carries its own sheet selector)"},
{Name:"sheet-name",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet name (XOR with `--sheet-id`); not accepted with `--writes` (each writes item carries its own sheet selector)"},
{Name:"sheet-id",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet reference_id — required: pass this or `--sheet-name` (exactly one of the two); not accepted with `--writes` (each writes item carries its own sheet selector)"},
{Name:"sheet-name",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet name — required: pass this or `--sheet-id` (exactly one of the two); not accepted with `--writes` (each writes item carries its own sheet selector)"},
{Name:"range",Kind:"own",Type:"string",Required:"xor",Desc:"Write range (A1 notation). XOR with `--writes` (single region: --range+--cells; multiple regions: --writes)"},
{Name:"cells",Kind:"own",Type:"string",Required:"xor",Desc:"JSON 2D array `[[{cell},...],...]`, dimensions must match `--range`; each cell may carry `value` / `formula` / `cell_styles` / `note` / `rich_text` (incl. `type=\"embed-image\"` in-cell image); run `--print-schema` for full fields",Input:[]string{"file","stdin"}},
{Name:"writes",Kind:"own",Type:"string",Required:"xor",Desc:"Multi-region write as a JSON array (up to 100 items), each `{sheet_name|sheet_id, range, cells}` — the sheet selector LIVES IN EACH ITEM (same convention as +batch-update sub-ops and +styles-put items; the top-level --sheet-name is rejected). cells has the same shape as `--cells` (2D array; per-cell cell_styles/border_styles allowed). The whole array goes out as ONE atomic batched request, cross-sheet supported; typical use: fixing formulas scattered across ranges/sheets — do not assemble a +batch-update operations array for this. XOR with `--range`+`--cells`; range-level uniform styling stays with +styles-put afterwards",Input:[]string{"file","stdin"}},
@@ -150,8 +150,8 @@ var flagDefs = map[string]commandDef{
Flags:[]flagDef{
{Name:"url",Kind:"public",Type:"string",Required:"xor",Desc:"Spreadsheet URL (XOR with `--spreadsheet-token`)"},
{Name:"spreadsheet-token",Kind:"public",Type:"string",Required:"xor",Desc:"Spreadsheet token (XOR with `--url`)"},
{Name:"sheet-id",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet reference_id (XOR with `--sheet-name`)"},
{Name:"sheet-name",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet name (XOR with `--sheet-id`)"},
{Name:"sheet-id",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet reference_id — required: pass this or `--sheet-name` (exactly one of the two)"},
{Name:"sheet-name",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet name — required: pass this or `--sheet-id` (exactly one of the two)"},
{Name:"range",Kind:"own",Type:"string",Required:"required",Desc:"Target cell (A1 notation; must be a single cell, e.g. `A1`; start and end must be identical)"},
{Name:"name",Kind:"own",Type:"string",Required:"optional",Desc:"Image file name (with extension); defaults to the basename of `--image`"},
@@ -163,8 +163,8 @@ var flagDefs = map[string]commandDef{
Flags:[]flagDef{
{Name:"url",Kind:"public",Type:"string",Required:"xor",Desc:"Spreadsheet URL (XOR with `--spreadsheet-token`)"},
{Name:"spreadsheet-token",Kind:"public",Type:"string",Required:"xor",Desc:"Spreadsheet token (XOR with `--url`)"},
{Name:"sheet-id",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet reference_id (XOR with `--sheet-name`)"},
{Name:"sheet-name",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet name (XOR with `--sheet-id`)"},
{Name:"sheet-id",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet reference_id — required: pass this or `--sheet-name` (exactly one of the two)"},
{Name:"sheet-name",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet name — required: pass this or `--sheet-id` (exactly one of the two)"},
{Name:"range",Kind:"own",Type:"string",Required:"required",Desc:"Target range (A1 notation, e.g. `A1:B2`)"},
{Name:"background-color",Kind:"own",Type:"string",Required:"optional",Desc:"Background color (hex, e.g. `#ffffff`)"},
{Name:"font-color",Kind:"own",Type:"string",Required:"optional",Desc:"Font color (hex, e.g. `#000000`)"},
@@ -177,7 +177,7 @@ var flagDefs = map[string]commandDef{
{Name:"number-format",Kind:"own",Type:"string",Required:"optional",Desc:"Number format pattern (e.g. text `@`, number `0.00`, currency `$#,##0.00`, date `mm/dd/yyyy`)"},
{Name:"border-styles",Kind:"own",Type:"string",Required:"optional",Desc:"Border config JSON: `{ top: {style,color,weight}, bottom: ..., left: ..., right: ... }`; same shape for all 4 sides",Input:[]string{"file","stdin"}},
{Name:"border-styles",Kind:"own",Type:"string",Required:"optional",Desc:"Border config JSON: `{ top: {style,weight,color}, bottom: ..., left: ..., right: ... }`; same shape for all 4 sides. style = line type (solid|dashed|dotted|double|none); weight = thickness (thin|medium|thick — a string, not a pixel number); color = hex like #000000. { all: {...} } sets all four sides at once. This is the only border flag: no --border-all / --border-top / --border-color exist",Input:[]string{"file","stdin"}},
@@ -186,8 +186,8 @@ var flagDefs = map[string]commandDef{
Flags:[]flagDef{
{Name:"url",Kind:"public",Type:"string",Required:"xor",Desc:"Spreadsheet URL (XOR with `--spreadsheet-token`)"},
{Name:"spreadsheet-token",Kind:"public",Type:"string",Required:"xor",Desc:"Spreadsheet token (XOR with `--url`)"},
{Name:"sheet-id",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet reference_id (XOR with `--sheet-name`)"},
{Name:"sheet-name",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet name (XOR with `--sheet-id`)"},
{Name:"sheet-id",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet reference_id — required: pass this or `--sheet-name` (exactly one of the two)"},
{Name:"sheet-name",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet name — required: pass this or `--sheet-id` (exactly one of the two)"},
{Name:"range",Kind:"own",Type:"string",Required:"required",Desc:"Range to merge / unmerge (A1 notation)"},
@@ -206,8 +206,8 @@ var flagDefs = map[string]commandDef{
Flags:[]flagDef{
{Name:"url",Kind:"public",Type:"string",Required:"xor",Desc:"Spreadsheet URL (XOR with `--spreadsheet-token`)"},
{Name:"spreadsheet-token",Kind:"public",Type:"string",Required:"xor",Desc:"Spreadsheet token (XOR with `--url`)"},
{Name:"sheet-id",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet reference_id (XOR with `--sheet-name`)"},
{Name:"sheet-name",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet name (XOR with `--sheet-id`)"},
{Name:"sheet-id",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet reference_id — required: pass this or `--sheet-name` (exactly one of the two)"},
{Name:"sheet-name",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet name — required: pass this or `--sheet-id` (exactly one of the two)"},
{Name:"properties",Kind:"own",Type:"string",Required:"required",Desc:"Full chart config JSON. Top-level keys: `position` / `offset` / `size` / `snapshot` (no top-level `data`, no extra nested `properties`); chart data config lives under `snapshot.data` (`refs` / `headerMode` / `dim1` / `dim2`); must include at least one of `snapshot.data.dim1.serie.index` or `dim2.series[].index`, otherwise the server rejects it. Deeply nested — run `--print-schema --flag-name properties` for the full structure.",Input:[]string{"file","stdin"}},
{Name:"dry-run",Kind:"system",Type:"bool",Required:"optional",Desc:"Print the request template; no side effects"},
},
@@ -217,8 +217,8 @@ var flagDefs = map[string]commandDef{
Flags:[]flagDef{
{Name:"url",Kind:"public",Type:"string",Required:"xor",Desc:"Spreadsheet URL (XOR with `--spreadsheet-token`)"},
{Name:"spreadsheet-token",Kind:"public",Type:"string",Required:"xor",Desc:"Spreadsheet token (XOR with `--url`)"},
{Name:"sheet-id",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet reference_id (XOR with `--sheet-name`)"},
{Name:"sheet-name",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet name (XOR with `--sheet-id`)"},
{Name:"sheet-id",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet reference_id — required: pass this or `--sheet-name` (exactly one of the two)"},
{Name:"sheet-name",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet name — required: pass this or `--sheet-id` (exactly one of the two)"},
@@ -229,8 +229,8 @@ var flagDefs = map[string]commandDef{
Flags:[]flagDef{
{Name:"url",Kind:"public",Type:"string",Required:"xor",Desc:"Spreadsheet URL (XOR with `--spreadsheet-token`)"},
{Name:"spreadsheet-token",Kind:"public",Type:"string",Required:"xor",Desc:"Spreadsheet token (XOR with `--url`)"},
{Name:"sheet-id",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet reference_id (XOR with `--sheet-name`)"},
{Name:"sheet-name",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet name (XOR with `--sheet-id`)"},
{Name:"sheet-id",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet reference_id — required: pass this or `--sheet-name` (exactly one of the two)"},
{Name:"sheet-name",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet name — required: pass this or `--sheet-id` (exactly one of the two)"},
{Name:"chart-id",Kind:"own",Type:"string",Required:"optional",Desc:"Filter to a single chart reference_id"},
@@ -240,8 +240,8 @@ var flagDefs = map[string]commandDef{
Flags:[]flagDef{
{Name:"url",Kind:"public",Type:"string",Required:"xor",Desc:"Spreadsheet URL (XOR with `--spreadsheet-token`)"},
{Name:"spreadsheet-token",Kind:"public",Type:"string",Required:"xor",Desc:"Spreadsheet token (XOR with `--url`)"},
{Name:"sheet-id",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet reference_id (XOR with `--sheet-name`)"},
{Name:"sheet-name",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet name (XOR with `--sheet-id`)"},
{Name:"sheet-id",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet reference_id — required: pass this or `--sheet-name` (exactly one of the two)"},
{Name:"sheet-name",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet name — required: pass this or `--sheet-id` (exactly one of the two)"},
{Name:"properties",Kind:"own",Type:"string",Required:"required",Desc:"Full or sufficiently complete chart config JSON (read back with `+chart-list` first, then patch)",Input:[]string{"file","stdin"}},
@@ -252,8 +252,8 @@ var flagDefs = map[string]commandDef{
Flags:[]flagDef{
{Name:"url",Kind:"public",Type:"string",Required:"xor",Desc:"Spreadsheet URL (XOR with `--spreadsheet-token`)"},
{Name:"spreadsheet-token",Kind:"public",Type:"string",Required:"xor",Desc:"Spreadsheet token (XOR with `--url`)"},
{Name:"sheet-id",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet reference_id (XOR with `--sheet-name`)"},
{Name:"sheet-name",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet name (XOR with `--sheet-id`)"},
{Name:"sheet-id",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet reference_id — required: pass this or `--sheet-name` (exactly one of the two)"},
{Name:"sheet-name",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet name — required: pass this or `--sheet-id` (exactly one of the two)"},
{Name:"width",Kind:"own",Type:"int",Required:"xor",Desc:"Uniform column width in pixels (e.g. 80 / 120 / 200; NOT Excel character units), used with `--range`. Passing --width implies pixel mode; --type may be omitted (or set to `pixel` — equivalent). For per-column widths use `--widths`",Default:"0"},
{Name:"widths",Kind:"own",Type:"string",Required:"xor",Desc:"Per-column width map — set different widths for many columns in one atomic call. Keys: single column (`\"A\"`) or closed range (`\"C:E\"`); values: pixel width (e.g. 80 / 120 / 200) or `\"standard\"` (reset to default). Units are pixels, NOT Excel character units (px ≈ chars × 8 + 16). Mutually exclusive with `--range` / `--width` / `--type`",Input:[]string{"file","stdin"}},
{Name:"type",Kind:"own",Type:"string",Required:"xor",Desc:"Sizing mode: `pixel` (requires `--width`) / `standard` (reset to default column width). Passing --width alone is the common form; `--type standard` cannot be combined with `--width`",Enum:[]string{"pixel","standard"}},
@@ -266,8 +266,8 @@ var flagDefs = map[string]commandDef{
Flags:[]flagDef{
{Name:"url",Kind:"public",Type:"string",Required:"xor",Desc:"Spreadsheet URL (XOR with `--spreadsheet-token`)"},
{Name:"spreadsheet-token",Kind:"public",Type:"string",Required:"xor",Desc:"Spreadsheet token (XOR with `--url`)"},
{Name:"sheet-id",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet reference_id (XOR with `--sheet-name`)"},
{Name:"sheet-name",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet name (XOR with `--sheet-id`)"},
{Name:"sheet-id",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet reference_id — required: pass this or `--sheet-name` (exactly one of the two)"},
{Name:"sheet-name",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet name — required: pass this or `--sheet-id` (exactly one of the two)"},
{Name:"properties",Kind:"own",Type:"string",Required:"required",Desc:"Rule config JSON: `style` (required, applied on match), `attrs?` (rule-type-dependent params), `has_ref?`. `rule_type` and `ranges` are separate flags",Input:[]string{"file","stdin"}},
{Name:"rule-type",Kind:"own",Type:"string",Required:"required",Desc:"Conditional format rule type; takes precedence over the same-named field inside `--properties`",Enum:[]string{"duplicateValues","uniqueValues","cellIs","containsText","timePeriod","containsBlanks","notContainsBlanks","dataBar","colorScale","rank","aboveAverage","expression","iconSet"}},
{Name:"ranges",Kind:"own",Type:"string",Required:"required",Desc:"A1 ranges where the conditional format applies, as a JSON array (e.g. `[\"A1:A100\",\"C2:C50\"]`); takes precedence over the same-named field inside `--properties`",Input:[]string{"file","stdin"}},
@@ -279,8 +279,8 @@ var flagDefs = map[string]commandDef{
Flags:[]flagDef{
{Name:"url",Kind:"public",Type:"string",Required:"xor",Desc:"Spreadsheet URL (XOR with `--spreadsheet-token`)"},
{Name:"spreadsheet-token",Kind:"public",Type:"string",Required:"xor",Desc:"Spreadsheet token (XOR with `--url`)"},
{Name:"sheet-id",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet reference_id (XOR with `--sheet-name`)"},
{Name:"sheet-name",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet name (XOR with `--sheet-id`)"},
{Name:"sheet-id",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet reference_id — required: pass this or `--sheet-name` (exactly one of the two)"},
{Name:"sheet-name",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet name — required: pass this or `--sheet-id` (exactly one of the two)"},
@@ -291,8 +291,8 @@ var flagDefs = map[string]commandDef{
Flags:[]flagDef{
{Name:"url",Kind:"public",Type:"string",Required:"xor",Desc:"Spreadsheet URL (XOR with `--spreadsheet-token`)"},
{Name:"spreadsheet-token",Kind:"public",Type:"string",Required:"xor",Desc:"Spreadsheet token (XOR with `--url`)"},
{Name:"sheet-id",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet reference_id (XOR with `--sheet-name`)"},
{Name:"sheet-name",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet name (XOR with `--sheet-id`)"},
{Name:"sheet-id",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet reference_id — required: pass this or `--sheet-name` (exactly one of the two)"},
{Name:"sheet-name",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet name — required: pass this or `--sheet-id` (exactly one of the two)"},
{Name:"rule-id",Kind:"own",Type:"string",Required:"optional",Desc:"Filter by rule id"},
@@ -302,8 +302,8 @@ var flagDefs = map[string]commandDef{
Flags:[]flagDef{
{Name:"url",Kind:"public",Type:"string",Required:"xor",Desc:"Spreadsheet URL (XOR with `--spreadsheet-token`)"},
{Name:"spreadsheet-token",Kind:"public",Type:"string",Required:"xor",Desc:"Spreadsheet token (XOR with `--url`)"},
{Name:"sheet-id",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet reference_id (XOR with `--sheet-name`)"},
{Name:"sheet-name",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet name (XOR with `--sheet-id`)"},
{Name:"sheet-id",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet reference_id — required: pass this or `--sheet-name` (exactly one of the two)"},
{Name:"sheet-name",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet name — required: pass this or `--sheet-id` (exactly one of the two)"},
{Name:"properties",Kind:"own",Type:"string",Required:"required",Desc:"Rule config JSON, same shape as `+cond-format-create --properties`; update overwrites the entire rule",Input:[]string{"file","stdin"}},
{Name:"rule-type",Kind:"own",Type:"string",Required:"required",Desc:"Conditional format rule type; takes precedence over the same-named field inside `--properties`",Enum:[]string{"duplicateValues","uniqueValues","cellIs","containsText","timePeriod","containsBlanks","notContainsBlanks","dataBar","colorScale","rank","aboveAverage","expression","iconSet"}},
@@ -316,8 +316,8 @@ var flagDefs = map[string]commandDef{
Flags:[]flagDef{
{Name:"url",Kind:"public",Type:"string",Required:"xor",Desc:"Spreadsheet URL (XOR with `--spreadsheet-token`)"},
{Name:"spreadsheet-token",Kind:"public",Type:"string",Required:"xor",Desc:"Spreadsheet token (XOR with `--url`)"},
{Name:"sheet-id",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet reference_id (XOR with `--sheet-name`)"},
{Name:"sheet-name",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet name (XOR with `--sheet-id`)"},
{Name:"sheet-id",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet reference_id — required: pass this or `--sheet-name` (exactly one of the two)"},
{Name:"sheet-name",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet name — required: pass this or `--sheet-id` (exactly one of the two)"},
{Name:"range",Kind:"own",Type:"string",Required:"optional",Desc:"A1 range, e.g. `A1:F30` (no sheet prefix — use `--sheet-id` / `--sheet-name` to select the sheet). Optional: when omitted the whole sheet is read (clipped to the actual grid bounds; actual_range in the response names what was read); pair with --max-chars / --output-path on large sheets"},
{Name:"max-chars",Kind:"own",Type:"int",Required:"optional",Desc:"Max output chars per call; default 500000 (safety cap). For a full untruncated read, use --output-path to dump to a file (auto-unlimited); only lower it (e.g. 25000) when you want results inline without a file, paging via has_more.",Default:"500000"},
{Name:"output-path",Kind:"own",Type:"string",Required:"optional",Desc:"Write the full read result to a local path (e.g. `./out.json`); the file holds the data payload as JSON while stdout returns only a small confirmation (output_path, byte count). **When set, the char cap defaults to unlimited** (overriding the --max-chars default), so a large sheet can be dumped in full for later analysis without stdout being truncated by max_chars. Omit it to print to stdout as usual."},
@@ -331,8 +331,8 @@ var flagDefs = map[string]commandDef{
Flags:[]flagDef{
{Name:"url",Kind:"public",Type:"string",Required:"xor",Desc:"Spreadsheet URL (XOR with `--spreadsheet-token`)"},
{Name:"spreadsheet-token",Kind:"public",Type:"string",Required:"xor",Desc:"Spreadsheet token (XOR with `--url`)"},
{Name:"sheet-id",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet reference_id (XOR with `--sheet-name`)"},
{Name:"sheet-name",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet name (XOR with `--sheet-id`)"},
{Name:"sheet-id",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet reference_id — required: pass this or `--sheet-name` (exactly one of the two)"},
{Name:"sheet-name",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet name — required: pass this or `--sheet-id` (exactly one of the two)"},
{Name:"start-cell",Kind:"own",Type:"string",Required:"required",Desc:"Top-left A1 anchor (e.g. `A1`, `B5`; no sheet prefix — use `--sheet-id` / `--sheet-name` to select the sheet); must be a single cell, range notation not accepted; the bottom-right is inferred from CSV row/column counts",Default:"A1"},
{Name:"csv",Kind:"own",Type:"string",Required:"required",Desc:"RFC 4180 CSV text; values or formulas (a leading = is evaluated as a formula); no styles / comments / images (use +cells-set for those).",Input:[]string{"file","stdin"}},
{Name:"allow-overwrite",Kind:"own",Type:"bool",Required:"optional",Desc:"Allow overwriting (default true); set false to error if any target cell is non-empty",Default:"true"},
@@ -345,8 +345,8 @@ var flagDefs = map[string]commandDef{
Flags:[]flagDef{
{Name:"url",Kind:"public",Type:"string",Required:"xor",Desc:"Spreadsheet URL (XOR with `--spreadsheet-token`)"},
{Name:"spreadsheet-token",Kind:"public",Type:"string",Required:"xor",Desc:"Spreadsheet token (XOR with `--url`)"},
{Name:"sheet-id",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet reference_id (XOR with `--sheet-name`)"},
{Name:"sheet-name",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet name (XOR with `--sheet-id`)"},
{Name:"sheet-id",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet reference_id — required: pass this or `--sheet-name` (exactly one of the two)"},
{Name:"sheet-name",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet name — required: pass this or `--sheet-id` (exactly one of the two)"},
{Name:"range",Kind:"own",Type:"string",Required:"xor",Desc:"Row/column closed range to delete; rows use 1-based numbers like `3:7` or `5` (single row), columns use letters like `C:F` or `C`. XOR with `--ranges`"},
{Name:"ranges",Kind:"own",Type:"string",Required:"xor",Desc:"Multiple row/column ranges to delete as a JSON array (up to 100 items, e.g. `[\"5:5\",\"8:8\",\"11:13\"]` or `[\"C:C\",\"F:G\"]`); rows and columns cannot be mixed, ranges must not overlap; XOR with `--range`. CLI sorts positions in DESCENDING order into one atomic batch delete — ascending deletion would shift later indexes as earlier rows/columns disappear; the CLI handles the ordering",Input:[]string{"file","stdin"}},
{Name:"yes",Kind:"system",Type:"bool",Required:"required",Desc:"Confirm destructive write (exit code 10 without this flag); row/column deletion is irreversible"},
@@ -358,8 +358,8 @@ var flagDefs = map[string]commandDef{
Flags:[]flagDef{
{Name:"url",Kind:"public",Type:"string",Required:"xor",Desc:"Spreadsheet URL (XOR with `--spreadsheet-token`)"},
{Name:"spreadsheet-token",Kind:"public",Type:"string",Required:"xor",Desc:"Spreadsheet token (XOR with `--url`)"},
{Name:"sheet-id",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet reference_id (XOR with `--sheet-name`)"},
{Name:"sheet-name",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet name (XOR with `--sheet-id`)"},
{Name:"sheet-id",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet reference_id — required: pass this or `--sheet-name` (exactly one of the two)"},
{Name:"sheet-name",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet name — required: pass this or `--sheet-id` (exactly one of the two)"},
{Name:"dimension",Kind:"own",Type:"string",Required:"required",Desc:"Dimension (row or column)",Enum:[]string{"row","column"}},
{Name:"count",Kind:"own",Type:"int",Required:"required",Desc:"Freeze the first N rows/columns; pass 0 to unfreeze"},
@@ -370,8 +370,8 @@ var flagDefs = map[string]commandDef{
Flags:[]flagDef{
{Name:"url",Kind:"public",Type:"string",Required:"xor",Desc:"Spreadsheet URL (XOR with `--spreadsheet-token`)"},
{Name:"spreadsheet-token",Kind:"public",Type:"string",Required:"xor",Desc:"Spreadsheet token (XOR with `--url`)"},
{Name:"sheet-id",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet reference_id (XOR with `--sheet-name`)"},
{Name:"sheet-name",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet name (XOR with `--sheet-id`)"},
{Name:"sheet-id",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet reference_id — required: pass this or `--sheet-name` (exactly one of the two)"},
{Name:"sheet-name",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet name — required: pass this or `--sheet-id` (exactly one of the two)"},
{Name:"depth",Kind:"own",Type:"int",Required:"optional",Desc:"Nesting level for grouping; default 1",Default:"1"},
{Name:"group-state",Kind:"own",Type:"string",Required:"optional",Desc:"Initial group expand state",Default:"expand",Enum:[]string{"expand","fold"}},
{Name:"range",Kind:"own",Type:"string",Required:"required",Desc:"Row/column closed range to group; rows use 1-based numbers like `3:7`, columns use letters like `C:F`"},
@@ -383,8 +383,8 @@ var flagDefs = map[string]commandDef{
Flags:[]flagDef{
{Name:"url",Kind:"public",Type:"string",Required:"xor",Desc:"Spreadsheet URL (XOR with `--spreadsheet-token`)"},
{Name:"spreadsheet-token",Kind:"public",Type:"string",Required:"xor",Desc:"Spreadsheet token (XOR with `--url`)"},
{Name:"sheet-id",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet reference_id (XOR with `--sheet-name`)"},
{Name:"sheet-name",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet name (XOR with `--sheet-id`)"},
{Name:"sheet-id",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet reference_id — required: pass this or `--sheet-name` (exactly one of the two)"},
{Name:"sheet-name",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet name — required: pass this or `--sheet-id` (exactly one of the two)"},
{Name:"range",Kind:"own",Type:"string",Required:"required",Desc:"Row/column closed range to hide; rows use 1-based numbers like `3:7`, columns use letters like `C:F`"},
@@ -394,8 +394,8 @@ var flagDefs = map[string]commandDef{
Flags:[]flagDef{
{Name:"url",Kind:"public",Type:"string",Required:"xor",Desc:"Spreadsheet URL (XOR with `--spreadsheet-token`)"},
{Name:"spreadsheet-token",Kind:"public",Type:"string",Required:"xor",Desc:"Spreadsheet token (XOR with `--url`)"},
{Name:"sheet-id",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet reference_id (XOR with `--sheet-name`)"},
{Name:"sheet-name",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet name (XOR with `--sheet-id`)"},
{Name:"sheet-id",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet reference_id — required: pass this or `--sheet-name` (exactly one of the two)"},
{Name:"sheet-name",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet name — required: pass this or `--sheet-id` (exactly one of the two)"},
{Name:"inherit-style",Kind:"own",Type:"string",Required:"optional",Desc:"Style inheritance for the new row/column: `before` (from the preceding row/column) / `after` (from the following row/column). Omit the flag to inherit the following row/column (same as `after`) — the backend cannot leave a new row/column unstyled; for a truly blank row/column, clear formats afterwards with +cells-clear --scope formats. Insertion always lands before `--position`; this only selects which side's style is copied.",Enum:[]string{"before","after"}},
{Name:"position",Kind:"own",Type:"string",Required:"required",Desc:"Insert position (1-based row number like `3` or column letter like `C`); new rows/columns are inserted *before* this position"},
{Name:"count",Kind:"own",Type:"int",Required:"required",Desc:"Number of rows/columns to insert (must be > 0)"},
@@ -407,8 +407,8 @@ var flagDefs = map[string]commandDef{
Flags:[]flagDef{
{Name:"url",Kind:"public",Type:"string",Required:"xor",Desc:"Spreadsheet URL (XOR with `--spreadsheet-token`)"},
{Name:"spreadsheet-token",Kind:"public",Type:"string",Required:"xor",Desc:"Spreadsheet token (XOR with `--url`)"},
{Name:"sheet-id",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet reference_id (XOR with `--sheet-name`)"},
{Name:"sheet-name",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet name (XOR with `--sheet-id`)"},
{Name:"sheet-id",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet reference_id — required: pass this or `--sheet-name` (exactly one of the two)"},
{Name:"sheet-name",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet name — required: pass this or `--sheet-id` (exactly one of the two)"},
{Name:"source-range",Kind:"own",Type:"string",Required:"required",Desc:"Source row/column closed range to move; rows use 1-based numbers like `3:7`, columns use letters like `C:F`"},
{Name:"target",Kind:"own",Type:"string",Required:"required",Desc:"Destination position (the moved rows/columns are placed *before* this position); rows use 1-based row number like `12`, columns use column letter like `H`. Must match the dimension of --source-range"},
@@ -419,8 +419,8 @@ var flagDefs = map[string]commandDef{
Flags:[]flagDef{
{Name:"url",Kind:"public",Type:"string",Required:"xor",Desc:"Spreadsheet URL (XOR with `--spreadsheet-token`)"},
{Name:"spreadsheet-token",Kind:"public",Type:"string",Required:"xor",Desc:"Spreadsheet token (XOR with `--url`)"},
{Name:"sheet-id",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet reference_id (XOR with `--sheet-name`)"},
{Name:"sheet-name",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet name (XOR with `--sheet-id`)"},
{Name:"sheet-id",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet reference_id — required: pass this or `--sheet-name` (exactly one of the two)"},
{Name:"sheet-name",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet name — required: pass this or `--sheet-id` (exactly one of the two)"},
{Name:"range",Kind:"own",Type:"string",Required:"required",Desc:"Row/column closed range to ungroup; rows use 1-based numbers like `3:7`, columns use letters like `C:F`"},
@@ -431,8 +431,8 @@ var flagDefs = map[string]commandDef{
Flags:[]flagDef{
{Name:"url",Kind:"public",Type:"string",Required:"xor",Desc:"Spreadsheet URL (XOR with `--spreadsheet-token`)"},
{Name:"spreadsheet-token",Kind:"public",Type:"string",Required:"xor",Desc:"Spreadsheet token (XOR with `--url`)"},
{Name:"sheet-id",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet reference_id (XOR with `--sheet-name`)"},
{Name:"sheet-name",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet name (XOR with `--sheet-id`)"},
{Name:"sheet-id",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet reference_id — required: pass this or `--sheet-name` (exactly one of the two)"},
{Name:"sheet-name",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet name — required: pass this or `--sheet-id` (exactly one of the two)"},
{Name:"range",Kind:"own",Type:"string",Required:"required",Desc:"Row/column closed range to unhide; rows use 1-based numbers like `3:7`, columns use letters like `C:F`"},
@@ -452,8 +452,8 @@ var flagDefs = map[string]commandDef{
Flags:[]flagDef{
{Name:"url",Kind:"public",Type:"string",Required:"xor",Desc:"Spreadsheet URL (XOR with `--spreadsheet-token`)"},
{Name:"spreadsheet-token",Kind:"public",Type:"string",Required:"xor",Desc:"Spreadsheet token (XOR with `--url`)"},
{Name:"sheet-id",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet reference_id (XOR with `--sheet-name`)"},
{Name:"sheet-name",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet name (XOR with `--sheet-id`)"},
{Name:"sheet-id",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet reference_id — required: pass this or `--sheet-name` (exactly one of the two)"},
{Name:"sheet-name",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet name — required: pass this or `--sheet-id` (exactly one of the two)"},
{Name:"range",Kind:"own",Type:"string",Required:"required",Desc:"Target range in A1 notation, e.g. `A2:A100` (no sheet prefix — use `--sheet-id` / `--sheet-name` to select the sheet)"},
@@ -463,8 +463,8 @@ var flagDefs = map[string]commandDef{
Flags:[]flagDef{
{Name:"url",Kind:"public",Type:"string",Required:"xor",Desc:"Spreadsheet URL (XOR with `--spreadsheet-token`)"},
{Name:"spreadsheet-token",Kind:"public",Type:"string",Required:"xor",Desc:"Spreadsheet token (XOR with `--url`)"},
{Name:"sheet-id",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet reference_id (XOR with `--sheet-name`)"},
{Name:"sheet-name",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet name (XOR with `--sheet-id`)"},
{Name:"sheet-id",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet reference_id — required: pass this or `--sheet-name` (exactly one of the two)"},
{Name:"sheet-name",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet name — required: pass this or `--sheet-id` (exactly one of the two)"},
{Name:"range",Kind:"own",Type:"string",Required:"required",Desc:"Target range (A1 notation, e.g. `A2:A100`)"},
{Name:"options",Kind:"own",Type:"string",Required:"xor",Desc:"Options as a JSON array, e.g. `[\"opt1\",\"opt2\"]`. Server enforces no item-count cap and no per-item length cap; values containing commas are accepted (they are escape-encoded on the wire). For very large lists prefer `--source-range`.",Input:[]string{"file","stdin"}},
{Name:"colors",Kind:"own",Type:"string",Required:"optional",Desc:"Per-option pill colors, RGB hex array (e.g. `[\"#1FB6C1\",\"#F006C2\"]`). Length may be shorter than the source (`--options` items / `--source-range` cells) — extras cycle through a 10-color palette — but never longer (CLI Validate rejects: `--colors length (N) must not exceed dropdown source size (M)`). **Applies on its own**; ignored when `--highlight=false`.",Input:[]string{"file","stdin"}},
@@ -493,8 +493,8 @@ var flagDefs = map[string]commandDef{
Flags:[]flagDef{
{Name:"url",Kind:"public",Type:"string",Required:"xor",Desc:"Spreadsheet URL (XOR with `--spreadsheet-token`)"},
{Name:"spreadsheet-token",Kind:"public",Type:"string",Required:"xor",Desc:"Spreadsheet token (XOR with `--url`)"},
{Name:"sheet-id",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet reference_id (XOR with `--sheet-name`)"},
{Name:"sheet-name",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet name (XOR with `--sheet-id`)"},
{Name:"sheet-id",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet reference_id — required: pass this or `--sheet-name` (exactly one of the two)"},
{Name:"sheet-name",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet name — required: pass this or `--sheet-id` (exactly one of the two)"},
{Name:"range",Kind:"own",Type:"string",Required:"required",Desc:"Filter range (A1 notation, including header row, e.g. `A1:F1000`); do not duplicate the range field inside `--properties`"},
{Name:"properties",Kind:"own",Type:"string",Required:"optional",Desc:"Filter rule JSON: `rules` (per-column rule array), `filtered_columns?` (active column index hint). The flag is optional overall — if provided, `rules` must be non-empty; if omitted, an empty filter is created on `--range` (no column conditions). `range` is a separate flag (do not duplicate inside this JSON)",Input:[]string{"file","stdin"}},
@@ -505,8 +505,8 @@ var flagDefs = map[string]commandDef{
Flags:[]flagDef{
{Name:"url",Kind:"public",Type:"string",Required:"xor",Desc:"Spreadsheet URL (XOR with `--spreadsheet-token`)"},
{Name:"spreadsheet-token",Kind:"public",Type:"string",Required:"xor",Desc:"Spreadsheet token (XOR with `--url`)"},
{Name:"sheet-id",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet reference_id (XOR with `--sheet-name`)"},
{Name:"sheet-name",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet name (XOR with `--sheet-id`)"},
{Name:"sheet-id",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet reference_id — required: pass this or `--sheet-name` (exactly one of the two)"},
{Name:"sheet-name",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet name — required: pass this or `--sheet-id` (exactly one of the two)"},
{Name:"yes",Kind:"system",Type:"bool",Required:"required",Desc:"Confirm destructive write (exit code 10 without this flag); delete is irreversible"},
@@ -516,8 +516,8 @@ var flagDefs = map[string]commandDef{
Flags:[]flagDef{
{Name:"url",Kind:"public",Type:"string",Required:"xor",Desc:"Spreadsheet URL (XOR with `--spreadsheet-token`)"},
{Name:"spreadsheet-token",Kind:"public",Type:"string",Required:"xor",Desc:"Spreadsheet token (XOR with `--url`)"},
{Name:"sheet-id",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet reference_id (XOR with `--sheet-name`)"},
{Name:"sheet-name",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet name (XOR with `--sheet-id`)"},
{Name:"sheet-id",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet reference_id — required: pass this or `--sheet-name` (exactly one of the two)"},
{Name:"sheet-name",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet name — required: pass this or `--sheet-id` (exactly one of the two)"},
@@ -526,8 +526,8 @@ var flagDefs = map[string]commandDef{
Flags:[]flagDef{
{Name:"url",Kind:"public",Type:"string",Required:"xor",Desc:"Spreadsheet URL (XOR with `--spreadsheet-token`)"},
{Name:"spreadsheet-token",Kind:"public",Type:"string",Required:"xor",Desc:"Spreadsheet token (XOR with `--url`)"},
{Name:"sheet-id",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet reference_id (XOR with `--sheet-name`)"},
{Name:"sheet-name",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet name (XOR with `--sheet-id`)"},
{Name:"sheet-id",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet reference_id — required: pass this or `--sheet-name` (exactly one of the two)"},
{Name:"sheet-name",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet name — required: pass this or `--sheet-id` (exactly one of the two)"},
{Name:"properties",Kind:"own",Type:"string",Required:"required",Desc:"Filter rule JSON: `rules` and `filtered_columns?`; update overwrites the entire rule set (pass `rules: []` to clear). `range` is a separate flag",Input:[]string{"file","stdin"}},
{Name:"range",Kind:"own",Type:"string",Required:"required",Desc:"Range the filter applies to (A1 notation, e.g. `A1:F1000`); takes precedence over the same-named field inside `--properties`"},
@@ -538,8 +538,8 @@ var flagDefs = map[string]commandDef{
Flags:[]flagDef{
{Name:"url",Kind:"public",Type:"string",Required:"xor",Desc:"Spreadsheet URL (XOR with `--spreadsheet-token`)"},
{Name:"spreadsheet-token",Kind:"public",Type:"string",Required:"xor",Desc:"Spreadsheet token (XOR with `--url`)"},
{Name:"sheet-id",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet reference_id (XOR with `--sheet-name`)"},
{Name:"sheet-name",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet name (XOR with `--sheet-id`)"},
{Name:"sheet-id",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet reference_id — required: pass this or `--sheet-name` (exactly one of the two)"},
{Name:"sheet-name",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet name — required: pass this or `--sheet-id` (exactly one of the two)"},
{Name:"properties",Kind:"own",Type:"string",Required:"required",Desc:"Filter-view rule JSON: `rules?` (per-column rule array), `filtered_columns?`. `range` and `view_name` are separate flags",Input:[]string{"file","stdin"}},
{Name:"range",Kind:"own",Type:"string",Required:"required",Desc:"Range the filter view applies to (A1 notation, e.g. `A1:F1000`); takes precedence over the same-named field inside `--properties`; required on create and must cover the header row"},
{Name:"view-name",Kind:"own",Type:"string",Required:"optional",Desc:"Filter-view name; auto-assigned by the server when omitted; takes precedence over the same-named field inside `--properties`"},
@@ -551,8 +551,8 @@ var flagDefs = map[string]commandDef{
Flags:[]flagDef{
{Name:"url",Kind:"public",Type:"string",Required:"xor",Desc:"Spreadsheet URL (XOR with `--spreadsheet-token`)"},
{Name:"spreadsheet-token",Kind:"public",Type:"string",Required:"xor",Desc:"Spreadsheet token (XOR with `--url`)"},
{Name:"sheet-id",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet reference_id (XOR with `--sheet-name`)"},
{Name:"sheet-name",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet name (XOR with `--sheet-id`)"},
{Name:"sheet-id",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet reference_id — required: pass this or `--sheet-name` (exactly one of the two)"},
{Name:"sheet-name",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet name — required: pass this or `--sheet-id` (exactly one of the two)"},
@@ -563,8 +563,8 @@ var flagDefs = map[string]commandDef{
Flags:[]flagDef{
{Name:"url",Kind:"public",Type:"string",Required:"xor",Desc:"Spreadsheet URL (XOR with `--spreadsheet-token`)"},
{Name:"spreadsheet-token",Kind:"public",Type:"string",Required:"xor",Desc:"Spreadsheet token (XOR with `--url`)"},
{Name:"sheet-id",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet reference_id (XOR with `--sheet-name`)"},
{Name:"sheet-name",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet name (XOR with `--sheet-id`)"},
{Name:"sheet-id",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet reference_id — required: pass this or `--sheet-name` (exactly one of the two)"},
{Name:"sheet-name",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet name — required: pass this or `--sheet-id` (exactly one of the two)"},
{Name:"view-id",Kind:"own",Type:"string",Required:"optional",Desc:"Filter by filter-view reference_id (returns the matching single view)"},
@@ -574,8 +574,8 @@ var flagDefs = map[string]commandDef{
Flags:[]flagDef{
{Name:"url",Kind:"public",Type:"string",Required:"xor",Desc:"Spreadsheet URL (XOR with `--spreadsheet-token`)"},
{Name:"spreadsheet-token",Kind:"public",Type:"string",Required:"xor",Desc:"Spreadsheet token (XOR with `--url`)"},
{Name:"sheet-id",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet reference_id (XOR with `--sheet-name`)"},
{Name:"sheet-name",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet name (XOR with `--sheet-id`)"},
{Name:"sheet-id",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet reference_id — required: pass this or `--sheet-name` (exactly one of the two)"},
{Name:"sheet-name",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet name — required: pass this or `--sheet-id` (exactly one of the two)"},
{Name:"properties",Kind:"own",Type:"string",Required:"required",Desc:"Filter-view rule JSON: `rules?`, `filtered_columns?`; update overwrites the entire rule set (read back with `+filter-view-list` first, then patch; pass `rules: []` to clear). `range` and `view_name` are separate flags",Input:[]string{"file","stdin"}},
{Name:"range",Kind:"own",Type:"string",Required:"optional",Desc:"Range the filter view applies to (A1 notation, e.g. `A1:F1000`); takes precedence over the same-named field inside `--properties`; omit to keep the current range on update"},
@@ -588,8 +588,8 @@ var flagDefs = map[string]commandDef{
Flags:[]flagDef{
{Name:"url",Kind:"public",Type:"string",Required:"xor",Desc:"Spreadsheet URL (XOR with `--spreadsheet-token`)"},
{Name:"spreadsheet-token",Kind:"public",Type:"string",Required:"xor",Desc:"Spreadsheet token (XOR with `--url`)"},
{Name:"sheet-id",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet reference_id (XOR with `--sheet-name`)"},
{Name:"sheet-name",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet name (XOR with `--sheet-id`)"},
{Name:"sheet-id",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet reference_id — required: pass this or `--sheet-name` (exactly one of the two)"},
{Name:"sheet-name",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet name — required: pass this or `--sheet-id` (exactly one of the two)"},
{Name:"image-name",Kind:"own",Type:"string",Required:"required",Desc:"Image name, including extension (e.g. `logo.png`)"},
{Name:"image-token",Kind:"own",Type:"string",Required:"xor",Desc:"Image file_token (XOR with `--image-uri`). Common source: `image_token` returned by `+float-image-list`"},
{Name:"image-uri",Kind:"own",Type:"string",Required:"xor",Desc:"Image URI handle returned by the upload flow (not a sheet object reference_id; XOR with `--image-token`); converted to file_token automatically"},
@@ -609,8 +609,8 @@ var flagDefs = map[string]commandDef{
Flags:[]flagDef{
{Name:"url",Kind:"public",Type:"string",Required:"xor",Desc:"Spreadsheet URL (XOR with `--spreadsheet-token`)"},
{Name:"spreadsheet-token",Kind:"public",Type:"string",Required:"xor",Desc:"Spreadsheet token (XOR with `--url`)"},
{Name:"sheet-id",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet reference_id (XOR with `--sheet-name`)"},
{Name:"sheet-name",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet name (XOR with `--sheet-id`)"},
{Name:"sheet-id",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet reference_id — required: pass this or `--sheet-name` (exactly one of the two)"},
{Name:"sheet-name",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet name — required: pass this or `--sheet-id` (exactly one of the two)"},
@@ -621,8 +621,8 @@ var flagDefs = map[string]commandDef{
Flags:[]flagDef{
{Name:"url",Kind:"public",Type:"string",Required:"xor",Desc:"Spreadsheet URL (XOR with `--spreadsheet-token`)"},
{Name:"spreadsheet-token",Kind:"public",Type:"string",Required:"xor",Desc:"Spreadsheet token (XOR with `--url`)"},
{Name:"sheet-id",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet reference_id (XOR with `--sheet-name`)"},
{Name:"sheet-name",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet name (XOR with `--sheet-id`)"},
{Name:"sheet-id",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet reference_id — required: pass this or `--sheet-name` (exactly one of the two)"},
{Name:"sheet-name",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet name — required: pass this or `--sheet-id` (exactly one of the two)"},
{Name:"float-image-id",Kind:"own",Type:"string",Required:"optional",Desc:"Filter by id; lists all float images on the sheet when omitted"},
@@ -632,8 +632,8 @@ var flagDefs = map[string]commandDef{
Flags:[]flagDef{
{Name:"url",Kind:"public",Type:"string",Required:"xor",Desc:"Spreadsheet URL (XOR with `--spreadsheet-token`)"},
{Name:"spreadsheet-token",Kind:"public",Type:"string",Required:"xor",Desc:"Spreadsheet token (XOR with `--url`)"},
{Name:"sheet-id",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet reference_id (XOR with `--sheet-name`)"},
{Name:"sheet-name",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet name (XOR with `--sheet-id`)"},
{Name:"sheet-id",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet reference_id — required: pass this or `--sheet-name` (exactly one of the two)"},
{Name:"sheet-name",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet name — required: pass this or `--sheet-id` (exactly one of the two)"},
{Name:"image-name",Kind:"own",Type:"string",Required:"required",Desc:"Image name, including extension (e.g. `logo.png`)"},
{Name:"image-token",Kind:"own",Type:"string",Required:"optional",Desc:"Optional image file_token; mutually exclusive with `--image-uri`; omit both to keep the current image. Common source: `image_token` returned by `+float-image-list`"},
@@ -706,8 +706,8 @@ var flagDefs = map[string]commandDef{
Flags:[]flagDef{
{Name:"url",Kind:"public",Type:"string",Required:"xor",Desc:"Spreadsheet URL (XOR with `--spreadsheet-token`)"},
{Name:"spreadsheet-token",Kind:"public",Type:"string",Required:"xor",Desc:"Spreadsheet token (XOR with `--url`)"},
{Name:"sheet-id",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet reference_id (XOR with `--sheet-name`)"},
{Name:"sheet-name",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet name (XOR with `--sheet-id`)"},
{Name:"sheet-id",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet reference_id — required: pass this or `--sheet-name` (exactly one of the two)"},
{Name:"sheet-name",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet name — required: pass this or `--sheet-id` (exactly one of the two)"},
@@ -718,8 +718,8 @@ var flagDefs = map[string]commandDef{
Flags:[]flagDef{
{Name:"url",Kind:"public",Type:"string",Required:"xor",Desc:"Spreadsheet URL (XOR with `--spreadsheet-token`)"},
{Name:"spreadsheet-token",Kind:"public",Type:"string",Required:"xor",Desc:"Spreadsheet token (XOR with `--url`)"},
{Name:"sheet-id",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet reference_id (XOR with `--sheet-name`)"},
{Name:"sheet-name",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet name (XOR with `--sheet-id`)"},
{Name:"sheet-id",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet reference_id — required: pass this or `--sheet-name` (exactly one of the two)"},
{Name:"sheet-name",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet name — required: pass this or `--sheet-id` (exactly one of the two)"},
{Name:"pivot-table-id",Kind:"own",Type:"string",Required:"optional",Desc:"Filter by id"},
@@ -729,8 +729,8 @@ var flagDefs = map[string]commandDef{
Flags:[]flagDef{
{Name:"url",Kind:"public",Type:"string",Required:"xor",Desc:"Spreadsheet URL (XOR with `--spreadsheet-token`)"},
{Name:"spreadsheet-token",Kind:"public",Type:"string",Required:"xor",Desc:"Spreadsheet token (XOR with `--url`)"},
{Name:"sheet-id",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet reference_id (XOR with `--sheet-name`)"},
{Name:"sheet-name",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet name (XOR with `--sheet-id`)"},
{Name:"sheet-id",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet reference_id — required: pass this or `--sheet-name` (exactly one of the two)"},
{Name:"sheet-name",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet name — required: pass this or `--sheet-id` (exactly one of the two)"},
{Name:"properties",Kind:"own",Type:"string",Required:"required",Desc:"Full or sufficiently complete pivot config (read back with `+pivot-list --pivot-table-id <id>` first, then patch)",Input:[]string{"file","stdin"}},
@@ -741,8 +741,8 @@ var flagDefs = map[string]commandDef{
Flags:[]flagDef{
{Name:"url",Kind:"public",Type:"string",Required:"xor",Desc:"Spreadsheet URL (XOR with `--spreadsheet-token`)"},
{Name:"spreadsheet-token",Kind:"public",Type:"string",Required:"xor",Desc:"Spreadsheet token (XOR with `--url`)"},
{Name:"sheet-id",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet reference_id (XOR with `--sheet-name`)"},
{Name:"sheet-name",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet name (XOR with `--sheet-id`)"},
{Name:"sheet-id",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet reference_id — required: pass this or `--sheet-name` (exactly one of the two)"},
{Name:"sheet-name",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet name — required: pass this or `--sheet-id` (exactly one of the two)"},
{Name:"target-sheet-id",Kind:"own",Type:"string",Required:"optional",Desc:"Destination sub-sheet id; defaults to the same sheet as the source"},
{Name:"target-range",Kind:"own",Type:"string",Required:"required",Desc:"Destination A1 range (anchor cell is enough; size inferred from the source)"},
@@ -755,8 +755,8 @@ var flagDefs = map[string]commandDef{
Flags:[]flagDef{
{Name:"url",Kind:"public",Type:"string",Required:"xor",Desc:"Spreadsheet URL (XOR with `--spreadsheet-token`)"},
{Name:"spreadsheet-token",Kind:"public",Type:"string",Required:"xor",Desc:"Spreadsheet token (XOR with `--url`)"},
{Name:"sheet-id",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet reference_id (XOR with `--sheet-name`)"},
{Name:"sheet-name",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet name (XOR with `--sheet-id`)"},
{Name:"sheet-id",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet reference_id — required: pass this or `--sheet-name` (exactly one of the two)"},
{Name:"sheet-name",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet name — required: pass this or `--sheet-id` (exactly one of the two)"},
{Name:"source-range",Kind:"own",Type:"string",Required:"required",Desc:"Fill template range (seed cells for the series)"},
{Name:"target-range",Kind:"own",Type:"string",Required:"required",Desc:"Destination fill range (A1 notation)"},
{Name:"series-type",Kind:"own",Type:"string",Required:"optional",Desc:"Fill series type",Default:"auto",Enum:[]string{"auto","linear","growth","date","copy"}},
@@ -768,8 +768,8 @@ var flagDefs = map[string]commandDef{
Flags:[]flagDef{
{Name:"url",Kind:"public",Type:"string",Required:"xor",Desc:"Spreadsheet URL (XOR with `--spreadsheet-token`)"},
{Name:"spreadsheet-token",Kind:"public",Type:"string",Required:"xor",Desc:"Spreadsheet token (XOR with `--url`)"},
{Name:"sheet-id",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet reference_id (XOR with `--sheet-name`)"},
{Name:"sheet-name",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet name (XOR with `--sheet-id`)"},
{Name:"sheet-id",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet reference_id — required: pass this or `--sheet-name` (exactly one of the two)"},
{Name:"sheet-name",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet name — required: pass this or `--sheet-id` (exactly one of the two)"},
{Name:"target-sheet-id",Kind:"own",Type:"string",Required:"optional",Desc:"Destination sub-sheet id; defaults to the same sheet as the source"},
{Name:"target-range",Kind:"own",Type:"string",Required:"required",Desc:"Destination A1 range (anchor cell is enough; size inferred from the source)"},
@@ -781,8 +781,8 @@ var flagDefs = map[string]commandDef{
Flags:[]flagDef{
{Name:"url",Kind:"public",Type:"string",Required:"xor",Desc:"Spreadsheet URL (XOR with `--spreadsheet-token`)"},
{Name:"spreadsheet-token",Kind:"public",Type:"string",Required:"xor",Desc:"Spreadsheet token (XOR with `--url`)"},
{Name:"sheet-id",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet reference_id (XOR with `--sheet-name`)"},
{Name:"sheet-name",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet name (XOR with `--sheet-id`)"},
{Name:"sheet-id",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet reference_id — required: pass this or `--sheet-name` (exactly one of the two)"},
{Name:"sheet-name",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet name — required: pass this or `--sheet-id` (exactly one of the two)"},
{Name:"range",Kind:"own",Type:"string",Required:"required",Desc:"Sort range (A1 notation; whether the header is included depends on `--has-header`)"},
{Name:"has-header",Kind:"own",Type:"bool",Required:"optional",Desc:"Treat the first row as a header and exclude from sort; default `false`"},
@@ -802,8 +802,8 @@ var flagDefs = map[string]commandDef{
Flags:[]flagDef{
{Name:"url",Kind:"public",Type:"string",Required:"xor",Desc:"Spreadsheet URL (XOR with `--spreadsheet-token`)"},
{Name:"spreadsheet-token",Kind:"public",Type:"string",Required:"xor",Desc:"Spreadsheet token (XOR with `--url`)"},
{Name:"sheet-id",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet reference_id (XOR with `--sheet-name`)"},
{Name:"sheet-name",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet name (XOR with `--sheet-id`)"},
{Name:"sheet-id",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet reference_id — required: pass this or `--sheet-name` (exactly one of the two)"},
{Name:"sheet-name",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet name — required: pass this or `--sheet-id` (exactly one of the two)"},
{Name:"height",Kind:"own",Type:"int",Required:"xor",Desc:"Uniform row height in pixels (e.g. 30 / 40 / 60; NOT points), used with `--range`. Passing --height implies pixel mode; --type may be omitted (or set to `pixel` — equivalent). For per-row heights use `--heights`",Default:"0"},
{Name:"heights",Kind:"own",Type:"string",Required:"xor",Desc:"Per-row height map — set different heights for many rows in one atomic call. Keys: single row (`\"1\"`) or closed range (`\"2:20\"`); values: pixel height (e.g. 30 / 50), `\"auto\"` (fit content) or `\"standard\"` (reset to default). Units are pixels, NOT points. Mutually exclusive with `--range` / `--height` / `--type`",Input:[]string{"file","stdin"}},
{Name:"type",Kind:"own",Type:"string",Required:"xor",Desc:"Sizing mode: `pixel` (requires `--height`) / `standard` (reset to default row height) / `auto` (fit content). Passing --height alone is the common form; `--type standard` / `--type auto` cannot be combined with `--height`",Enum:[]string{"pixel","standard","auto"}},
@@ -816,8 +816,8 @@ var flagDefs = map[string]commandDef{
Flags:[]flagDef{
{Name:"url",Kind:"public",Type:"string",Required:"xor",Desc:"Spreadsheet URL (XOR with `--spreadsheet-token`)"},
{Name:"spreadsheet-token",Kind:"public",Type:"string",Required:"xor",Desc:"Spreadsheet token (XOR with `--url`)"},
{Name:"sheet-id",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet reference_id (XOR with `--sheet-name`)"},
{Name:"sheet-name",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet name (XOR with `--sheet-id`)"},
{Name:"sheet-id",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet reference_id — required: pass this or `--sheet-name` (exactly one of the two)"},
{Name:"sheet-name",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet name — required: pass this or `--sheet-id` (exactly one of the two)"},
{Name:"title",Kind:"own",Type:"string",Required:"optional",Desc:"Copy title; auto-generated by the server when omitted"},
{Name:"index",Kind:"own",Type:"int",Required:"optional",Desc:"Insert position for the copy (0-based); appended to the end when omitted",Default:"-1"},
@@ -841,8 +841,8 @@ var flagDefs = map[string]commandDef{
Flags:[]flagDef{
{Name:"url",Kind:"public",Type:"string",Required:"xor",Desc:"Spreadsheet URL (XOR with `--spreadsheet-token`)"},
{Name:"spreadsheet-token",Kind:"public",Type:"string",Required:"xor",Desc:"Spreadsheet token (XOR with `--url`)"},
{Name:"sheet-id",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet reference_id (XOR with `--sheet-name`)"},
{Name:"sheet-name",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet name (XOR with `--sheet-id`)"},
{Name:"sheet-id",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet reference_id — required: pass this or `--sheet-name` (exactly one of the two)"},
{Name:"sheet-name",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet name — required: pass this or `--sheet-id` (exactly one of the two)"},
{Name:"yes",Kind:"system",Type:"bool",Required:"required",Desc:"Confirm high-risk write (exit code 10 without this flag)"},
@@ -852,8 +852,8 @@ var flagDefs = map[string]commandDef{
Flags:[]flagDef{
{Name:"url",Kind:"public",Type:"string",Required:"xor",Desc:"Spreadsheet URL (XOR with `--spreadsheet-token`)"},
{Name:"spreadsheet-token",Kind:"public",Type:"string",Required:"xor",Desc:"Spreadsheet token (XOR with `--url`)"},
{Name:"sheet-id",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet reference_id (XOR with `--sheet-name`)"},
{Name:"sheet-name",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet name (XOR with `--sheet-id`)"},
{Name:"sheet-id",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet reference_id — required: pass this or `--sheet-name` (exactly one of the two)"},
{Name:"sheet-name",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet name — required: pass this or `--sheet-id` (exactly one of the two)"},
@@ -862,8 +862,8 @@ var flagDefs = map[string]commandDef{
Flags:[]flagDef{
{Name:"url",Kind:"public",Type:"string",Required:"xor",Desc:"Spreadsheet URL (XOR with `--spreadsheet-token`)"},
{Name:"spreadsheet-token",Kind:"public",Type:"string",Required:"xor",Desc:"Spreadsheet token (XOR with `--url`)"},
{Name:"sheet-id",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet reference_id (XOR with `--sheet-name`)"},
{Name:"sheet-name",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet name (XOR with `--sheet-id`)"},
{Name:"sheet-id",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet reference_id — required: pass this or `--sheet-name` (exactly one of the two)"},
{Name:"sheet-name",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet name — required: pass this or `--sheet-id` (exactly one of the two)"},
@@ -872,8 +872,8 @@ var flagDefs = map[string]commandDef{
Flags:[]flagDef{
{Name:"url",Kind:"public",Type:"string",Required:"xor",Desc:"Spreadsheet URL (XOR with `--spreadsheet-token`)"},
{Name:"spreadsheet-token",Kind:"public",Type:"string",Required:"xor",Desc:"Spreadsheet token (XOR with `--url`)"},
{Name:"sheet-id",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet reference_id (XOR with `--sheet-name`)"},
{Name:"sheet-name",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet name (XOR with `--sheet-id`)"},
{Name:"sheet-id",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet reference_id — required: pass this or `--sheet-name` (exactly one of the two)"},
{Name:"sheet-name",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet name — required: pass this or `--sheet-id` (exactly one of the two)"},
{Name:"include",Kind:"own",Type:"string_slice",Required:"optional",Desc:"Comma-separated structure info categories to return",Enum:[]string{"merges","row_heights","col_widths","hidden_rows","hidden_cols","groups","frozen"}},
{Name:"range",Kind:"own",Type:"string",Required:"optional",Desc:"Limit structure info to this A1 range; whole sheet when omitted"},
@@ -884,8 +884,8 @@ var flagDefs = map[string]commandDef{
Flags:[]flagDef{
{Name:"url",Kind:"public",Type:"string",Required:"xor",Desc:"Spreadsheet URL (XOR with `--spreadsheet-token`)"},
{Name:"spreadsheet-token",Kind:"public",Type:"string",Required:"xor",Desc:"Spreadsheet token (XOR with `--url`)"},
{Name:"sheet-id",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet reference_id (XOR with `--sheet-name`)"},
{Name:"sheet-name",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet name (XOR with `--sheet-id`)"},
{Name:"sheet-id",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet reference_id — required: pass this or `--sheet-name` (exactly one of the two)"},
{Name:"sheet-name",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet name — required: pass this or `--sheet-id` (exactly one of the two)"},
{Name:"index",Kind:"own",Type:"int",Required:"required",Desc:"Target position (0-based)"},
{Name:"source-index",Kind:"own",Type:"int",Required:"optional",Desc:"Source position (0-based); optional for standalone calls — if omitted, the CLI runtime derives it from the current workbook index of `--sheet-id` / `--sheet-name`. Inside `+batch-update` it must be passed explicitly, since batch cannot issue a structure query mid-run to derive it",Default:"-1"},
@@ -896,8 +896,8 @@ var flagDefs = map[string]commandDef{
Flags:[]flagDef{
{Name:"url",Kind:"public",Type:"string",Required:"xor",Desc:"Spreadsheet URL (XOR with `--spreadsheet-token`)"},
{Name:"spreadsheet-token",Kind:"public",Type:"string",Required:"xor",Desc:"Spreadsheet token (XOR with `--url`)"},
{Name:"sheet-id",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet reference_id (XOR with `--sheet-name`)"},
{Name:"sheet-name",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet name (XOR with `--sheet-id`)"},
{Name:"sheet-id",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet reference_id — required: pass this or `--sheet-name` (exactly one of the two)"},
{Name:"sheet-name",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet name — required: pass this or `--sheet-id` (exactly one of the two)"},
@@ -907,8 +907,8 @@ var flagDefs = map[string]commandDef{
Flags:[]flagDef{
{Name:"url",Kind:"public",Type:"string",Required:"xor",Desc:"Spreadsheet URL (XOR with `--spreadsheet-token`)"},
{Name:"spreadsheet-token",Kind:"public",Type:"string",Required:"xor",Desc:"Spreadsheet token (XOR with `--url`)"},
{Name:"sheet-id",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet reference_id (XOR with `--sheet-name`)"},
{Name:"sheet-name",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet name (XOR with `--sheet-id`)"},
{Name:"sheet-id",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet reference_id — required: pass this or `--sheet-name` (exactly one of the two)"},
{Name:"sheet-name",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet name — required: pass this or `--sheet-id` (exactly one of the two)"},
{Name:"color",Kind:"own",Type:"string",Required:"required",Desc:"Hex color like `#FF0000`; pass empty string `\"\"` to clear"},
@@ -918,8 +918,8 @@ var flagDefs = map[string]commandDef{
Flags:[]flagDef{
{Name:"url",Kind:"public",Type:"string",Required:"xor",Desc:"Spreadsheet URL (XOR with `--spreadsheet-token`)"},
{Name:"spreadsheet-token",Kind:"public",Type:"string",Required:"xor",Desc:"Spreadsheet token (XOR with `--url`)"},
{Name:"sheet-id",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet reference_id (XOR with `--sheet-name`)"},
{Name:"sheet-name",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet name (XOR with `--sheet-id`)"},
{Name:"sheet-id",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet reference_id — required: pass this or `--sheet-name` (exactly one of the two)"},
{Name:"sheet-name",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet name — required: pass this or `--sheet-id` (exactly one of the two)"},
@@ -928,8 +928,8 @@ var flagDefs = map[string]commandDef{
Flags:[]flagDef{
{Name:"url",Kind:"public",Type:"string",Required:"xor",Desc:"Spreadsheet URL (XOR with `--spreadsheet-token`)"},
{Name:"spreadsheet-token",Kind:"public",Type:"string",Required:"xor",Desc:"Spreadsheet token (XOR with `--url`)"},
{Name:"sheet-id",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet reference_id (XOR with `--sheet-name`)"},
{Name:"sheet-name",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet name (XOR with `--sheet-id`)"},
{Name:"sheet-id",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet reference_id — required: pass this or `--sheet-name` (exactly one of the two)"},
{Name:"sheet-name",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet name — required: pass this or `--sheet-id` (exactly one of the two)"},
@@ -938,8 +938,8 @@ var flagDefs = map[string]commandDef{
Flags:[]flagDef{
{Name:"url",Kind:"public",Type:"string",Required:"xor",Desc:"Spreadsheet URL (XOR with `--spreadsheet-token`)"},
{Name:"spreadsheet-token",Kind:"public",Type:"string",Required:"xor",Desc:"Spreadsheet token (XOR with `--url`)"},
{Name:"sheet-id",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet reference_id (XOR with `--sheet-name`)"},
{Name:"sheet-name",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet name (XOR with `--sheet-id`)"},
{Name:"sheet-id",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet reference_id — required: pass this or `--sheet-name` (exactly one of the two)"},
{Name:"sheet-name",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet name — required: pass this or `--sheet-id` (exactly one of the two)"},
{Name:"properties",Kind:"own",Type:"string",Required:"required",Desc:"JSON: `{config (shared style), sparklines (array of mini-charts)}`; run `--print-schema` for the full structure",Input:[]string{"file","stdin"}},
@@ -949,8 +949,8 @@ var flagDefs = map[string]commandDef{
Flags:[]flagDef{
{Name:"url",Kind:"public",Type:"string",Required:"xor",Desc:"Spreadsheet URL (XOR with `--spreadsheet-token`)"},
{Name:"spreadsheet-token",Kind:"public",Type:"string",Required:"xor",Desc:"Spreadsheet token (XOR with `--url`)"},
{Name:"sheet-id",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet reference_id (XOR with `--sheet-name`)"},
{Name:"sheet-name",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet name (XOR with `--sheet-id`)"},
{Name:"sheet-id",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet reference_id — required: pass this or `--sheet-name` (exactly one of the two)"},
{Name:"sheet-name",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet name — required: pass this or `--sheet-id` (exactly one of the two)"},
{Name:"group-id",Kind:"own",Type:"string",Required:"required",Desc:"Target group id"},
{Name:"yes",Kind:"system",Type:"bool",Required:"required",Desc:"Confirm destructive write (exit code 10 without this flag); delete is irreversible"},
@@ -961,8 +961,8 @@ var flagDefs = map[string]commandDef{
Flags:[]flagDef{
{Name:"url",Kind:"public",Type:"string",Required:"xor",Desc:"Spreadsheet URL (XOR with `--spreadsheet-token`)"},
{Name:"spreadsheet-token",Kind:"public",Type:"string",Required:"xor",Desc:"Spreadsheet token (XOR with `--url`)"},
{Name:"sheet-id",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet reference_id (XOR with `--sheet-name`)"},
{Name:"sheet-name",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet name (XOR with `--sheet-id`)"},
{Name:"sheet-id",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet reference_id — required: pass this or `--sheet-name` (exactly one of the two)"},
{Name:"sheet-name",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet name — required: pass this or `--sheet-id` (exactly one of the two)"},
{Name:"group-id",Kind:"own",Type:"string",Required:"optional",Desc:"Filter by group_id"},
@@ -972,8 +972,8 @@ var flagDefs = map[string]commandDef{
Flags:[]flagDef{
{Name:"url",Kind:"public",Type:"string",Required:"xor",Desc:"Spreadsheet URL (XOR with `--spreadsheet-token`)"},
{Name:"spreadsheet-token",Kind:"public",Type:"string",Required:"xor",Desc:"Spreadsheet token (XOR with `--url`)"},
{Name:"sheet-id",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet reference_id (XOR with `--sheet-name`)"},
{Name:"sheet-name",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet name (XOR with `--sheet-id`)"},
{Name:"sheet-id",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet reference_id — required: pass this or `--sheet-name` (exactly one of the two)"},
{Name:"sheet-name",Kind:"public",Type:"string",Required:"xor",Desc:"Sheet name — required: pass this or `--sheet-id` (exactly one of the two)"},
{Name:"group-id",Kind:"own",Type:"string",Required:"required",Desc:"Target group id"},
{Name:"properties",Kind:"own",Type:"string",Required:"required",Desc:"JSON: `{config, sparklines}`; read back with `+sparkline-list --group-id <id>` first, then patch; run `--print-schema` for the full structure",Input:[]string{"file","stdin"}},
// Eval traces show every occurrence recovering on the next call, so
// the gap is knowing WHICH name to pass, not that one is needed: a
// just-created workbook has a single sheet named Sheet1, and any
// other workbook needs one +workbook-info lookup.
returncommon.ValidationErrorf("specify at least one of --sheet-id or --sheet-name").
WithHint("a freshly created workbook has one sheet named Sheet1 (`--sheet-name Sheet1`); otherwise list the real sheets with `lark-cli sheets +workbook-info --url <URL>`").
WithParams(
sheetsInvalidParam("sheet-id","required; specify at least one"),
sheetsInvalidParam("sheet-name","required; specify at least one"),
t.Errorf("message should name the weight enum %s, got %q",want,ve.Message)
}
}
ifstrings.Contains(ve.Message,"expected shape:"){
t.Errorf("enum-bearing mismatch should not fall back to the shape skeleton, got %q",ve.Message)
}
}
// TestUnderscoreFlagFormsParse pins the wire-vocabulary underscore rewrite:
// --sheet_name / --border_styles parse as their hyphen forms (agents copy
// field names out of JSON payloads where underscores are canonical).
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.