|
| 1 | +--- |
| 2 | +name: agentio-gsheets |
| 3 | +description: Use when interacting with Google Sheets via the agentio CLI. |
| 4 | +--- |
| 5 | + |
| 6 | +# Gsheets via agentio |
| 7 | + |
| 8 | +Auto-generated from `agentio skill gsheets`. Do not edit by hand. |
| 9 | + |
| 10 | +## agentio gsheets list |
| 11 | + |
| 12 | +List recent spreadsheets |
| 13 | + |
| 14 | +Options: |
| 15 | + |
| 16 | +- `--profile <name>`: Profile name |
| 17 | +- `--limit <n>`: Number of spreadsheets (default: 10) |
| 18 | +- `--query <query>`: Drive search query filter |
| 19 | + |
| 20 | +``` |
| 21 | +Examples: |
| 22 | +
|
| 23 | + # 10 most recently modified spreadsheets |
| 24 | + agentio gsheets list |
| 25 | +
|
| 26 | + # spreadsheets you own |
| 27 | + agentio gsheets list --query "'me' in owners" --limit 50 |
| 28 | +
|
| 29 | + # search by name fragment |
| 30 | + agentio gsheets list --query "name contains 'budget'" |
| 31 | +
|
| 32 | + # recently modified |
| 33 | + agentio gsheets list --query "modifiedTime > '2024-01-01'" |
| 34 | +
|
| 35 | +Query syntax: name contains '...', name = '...', 'me' in owners, |
| 36 | +modifiedTime > 'YYYY-MM-DD'. Combine with 'and'/'or'. |
| 37 | +``` |
| 38 | + |
| 39 | +## agentio gsheets get <spreadsheet-id-or-url> <range> |
| 40 | + |
| 41 | +Get values from a range |
| 42 | + |
| 43 | +Options: |
| 44 | + |
| 45 | +- `--profile <name>`: Profile name |
| 46 | +- `--dimension <dim>`: Major dimension: ROWS or COLUMNS |
| 47 | +- `--render <opt>`: Value render: FORMATTED_VALUE, UNFORMATTED_VALUE, or FORMULA |
| 48 | + |
| 49 | +``` |
| 50 | +Examples: |
| 51 | +
|
| 52 | + # read a 2x3 block on Sheet1 |
| 53 | + agentio gsheets get 1A2bCdEf... "Sheet1!A1:C2" |
| 54 | +
|
| 55 | + # entire column B |
| 56 | + agentio gsheets get 1A2bCdEf... "Sheet1!B:B" |
| 57 | +
|
| 58 | + # show formulas instead of computed values |
| 59 | + agentio gsheets get 1A2bCdEf... "Sheet1!A1:D10" --render FORMULA |
| 60 | +
|
| 61 | + # major dimension: COLUMNS (transposes orientation) |
| 62 | + agentio gsheets get 1A2bCdEf... "Sheet1!A1:C10" --dimension COLUMNS |
| 63 | +``` |
| 64 | + |
| 65 | +## agentio gsheets update <spreadsheet-id-or-url> <range> [values...] |
| 66 | + |
| 67 | +Update values in a range |
| 68 | + |
| 69 | +Options: |
| 70 | + |
| 71 | +- `--profile <name>`: Profile name |
| 72 | +- `--values-json <json>`: Values as JSON 2D array |
| 73 | +- `--input <opt>`: Value input option: RAW or USER_ENTERED (default: USER_ENTERED) |
| 74 | + |
| 75 | +``` |
| 76 | +Examples: |
| 77 | +
|
| 78 | + # set a 2x2 block via simple format (',' = new row, '|' = new cell) |
| 79 | + agentio gsheets update 1A2bCdEf... "Sheet1!A1:B2" "a|b,c|d" |
| 80 | +
|
| 81 | + # same write via JSON |
| 82 | + agentio gsheets update 1A2bCdEf... "Sheet1!A1:B2" --values-json '[["a","b"],["c","d"]]' |
| 83 | +
|
| 84 | + # store raw text without formula parsing |
| 85 | + agentio gsheets update 1A2bCdEf... "Sheet1!A1" "=SUM(B:B)" --input RAW |
| 86 | +
|
| 87 | + # write a formula that gets evaluated |
| 88 | + agentio gsheets update 1A2bCdEf... "Sheet1!A1" "=SUM(B:B)" --input USER_ENTERED |
| 89 | +
|
| 90 | +Input options: RAW (stored as-is), USER_ENTERED (parsed like typed in UI). |
| 91 | +``` |
| 92 | + |
| 93 | +## agentio gsheets append <spreadsheet-id-or-url> <range> [values...] |
| 94 | + |
| 95 | +Append values to a range |
| 96 | + |
| 97 | +Options: |
| 98 | + |
| 99 | +- `--profile <name>`: Profile name |
| 100 | +- `--values-json <json>`: Values as JSON 2D array |
| 101 | +- `--input <opt>`: Value input option: RAW or USER_ENTERED (default: USER_ENTERED) |
| 102 | +- `--insert <opt>`: Insert data option: OVERWRITE or INSERT_ROWS |
| 103 | + |
| 104 | +``` |
| 105 | +Examples: |
| 106 | +
|
| 107 | + # append two rows to columns A-C |
| 108 | + agentio gsheets append 1A2bCdEf... "Sheet1!A:C" "alice|10|us,bob|7|fr" |
| 109 | +
|
| 110 | + # append via JSON |
| 111 | + agentio gsheets append 1A2bCdEf... "Sheet1!A:C" --values-json '[["a","b","c"],["d","e","f"]]' |
| 112 | +
|
| 113 | + # insert new rows instead of overwriting blanks below the table |
| 114 | + agentio gsheets append 1A2bCdEf... "Sheet1!A:C" "x|y|z" --insert INSERT_ROWS |
| 115 | +
|
| 116 | +Insert: OVERWRITE writes into existing cells, INSERT_ROWS shifts rows down. |
| 117 | +``` |
| 118 | + |
| 119 | +## agentio gsheets clear <spreadsheet-id-or-url> <range> |
| 120 | + |
| 121 | +Clear values in a range |
| 122 | + |
| 123 | +Options: |
| 124 | + |
| 125 | +- `--profile <name>`: Profile name |
| 126 | + |
| 127 | +``` |
| 128 | +Examples: |
| 129 | +
|
| 130 | + # clear a small block |
| 131 | + agentio gsheets clear 1A2bCdEf... "Sheet1!A1:D10" |
| 132 | +
|
| 133 | + # clear an entire sheet |
| 134 | + agentio gsheets clear 1A2bCdEf... "Sheet1!A1:Z1000" |
| 135 | +``` |
| 136 | + |
| 137 | +## agentio gsheets format <spreadsheet-id-or-url> <range> |
| 138 | + |
| 139 | +Apply cell formatting (colors, text style, alignment, borders, merge) |
| 140 | + |
| 141 | +Options: |
| 142 | + |
| 143 | +- `--profile <name>`: Profile name |
| 144 | +- `--bold`: Make text bold |
| 145 | +- `--italic`: Make text italic |
| 146 | +- `--underline`: Underline text |
| 147 | +- `--font-size <n>`: Font size in points |
| 148 | +- `--font-family <name>`: Font family name (e.g., "Arial") |
| 149 | +- `--text-color <hex>`: Text color as #rrggbb |
| 150 | +- `--background <hex>`: Background color as #rrggbb |
| 151 | +- `--align <pos>`: Horizontal alignment: left, center, right |
| 152 | +- `--valign <pos>`: Vertical alignment: top, middle, bottom |
| 153 | +- `--wrap <strategy>`: Text wrap: overflow, clip, wrap |
| 154 | +- `--number-format <pattern>`: Number format pattern (e.g., "$#,##0.00", "0.00%") |
| 155 | +- `--border <style>`: Borders: all, outer, none |
| 156 | +- `--merge`: Merge the range into a single cell |
| 157 | +- `--clear-format`: Clear existing formatting on the range first |
| 158 | +- `--raw <json>`: Raw CellFormat JSON merged into the request |
| 159 | + |
| 160 | +``` |
| 161 | +Examples: |
| 162 | +
|
| 163 | + # bold header row with colored background and white text |
| 164 | + agentio gsheets format 1A2bCdEf... "Sheet1!A1:D1" --bold --background "#4285f4" --text-color "#ffffff" |
| 165 | +
|
| 166 | + # currency formatting on a column |
| 167 | + agentio gsheets format 1A2bCdEf... "Sheet1!C2:C100" --number-format "$#,##0.00" |
| 168 | +
|
| 169 | + # outer border around a table |
| 170 | + agentio gsheets format 1A2bCdEf... "Sheet1!A1:D10" --border outer |
| 171 | +
|
| 172 | + # merge title cells with centered bold text |
| 173 | + agentio gsheets format 1A2bCdEf... "Sheet1!A1:D1" --merge --align center --bold |
| 174 | +
|
| 175 | + # reset formatting on a range |
| 176 | + agentio gsheets format 1A2bCdEf... "Sheet1!A1:Z1000" --clear-format |
| 177 | +``` |
| 178 | + |
| 179 | +## agentio gsheets resize <spreadsheet-id-or-url> <range> |
| 180 | + |
| 181 | +Resize columns or rows (explicit pixel size or auto-fit) |
| 182 | + |
| 183 | +Options: |
| 184 | + |
| 185 | +- `--profile <name>`: Profile name |
| 186 | +- `--size <pixels>`: Pixel size |
| 187 | +- `--auto`: Auto-fit to content |
| 188 | + |
| 189 | +``` |
| 190 | +Examples: |
| 191 | +
|
| 192 | + # set columns A-C to 200px wide |
| 193 | + agentio gsheets resize 1A2bCdEf... "Sheet1!A:C" --size 200 |
| 194 | +
|
| 195 | + # auto-fit the header row to content |
| 196 | + agentio gsheets resize 1A2bCdEf... "Sheet1!1:1" --auto |
| 197 | +
|
| 198 | + # resize a single column |
| 199 | + agentio gsheets resize 1A2bCdEf... "Sheet1!B:B" --size 150 |
| 200 | +
|
| 201 | +Range must be columns-only (A:C) or rows-only (1:10). |
| 202 | +--size and --auto are mutually exclusive. |
| 203 | +``` |
| 204 | + |
| 205 | +## agentio gsheets batch <spreadsheet-id-or-url> |
| 206 | + |
| 207 | +Execute raw spreadsheets.batchUpdate requests (escape hatch) |
| 208 | + |
| 209 | +Options: |
| 210 | + |
| 211 | +- `--profile <name>`: Profile name |
| 212 | +- `--requests-json <json>`: Inline JSON array of batchUpdate requests |
| 213 | +- `--file <path>`: Path to a JSON file containing the requests array |
| 214 | + |
| 215 | +``` |
| 216 | +Examples: |
| 217 | +
|
| 218 | + # freeze the first row (inline JSON) |
| 219 | + agentio gsheets batch 1A2bCdEf... --requests-json '[{"updateSheetProperties":{"properties":{"sheetId":0,"gridProperties":{"frozenRowCount":1}},"fields":"gridProperties.frozenRowCount"}}]' |
| 220 | +
|
| 221 | + # from a file |
| 222 | + agentio gsheets batch 1A2bCdEf... --file ./requests.json |
| 223 | +
|
| 224 | +Accepts an array of Sheets API Request objects. See: |
| 225 | +https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets/request |
| 226 | +``` |
| 227 | + |
| 228 | +## agentio gsheets metadata <spreadsheet-id-or-url> |
| 229 | + |
| 230 | +Get spreadsheet metadata |
| 231 | + |
| 232 | +Options: |
| 233 | + |
| 234 | +- `--profile <name>`: Profile name |
| 235 | + |
| 236 | +``` |
| 237 | +Examples: |
| 238 | +
|
| 239 | + # title, sheets, sheetIds, locale, etc. |
| 240 | + agentio gsheets metadata 1A2bCdEf... |
| 241 | +
|
| 242 | + # accept a full URL |
| 243 | + agentio gsheets metadata https://docs.google.com/spreadsheets/d/1A2bCdEf.../edit |
| 244 | +``` |
| 245 | + |
| 246 | +## agentio gsheets create <title> |
| 247 | + |
| 248 | +Create a new spreadsheet |
| 249 | + |
| 250 | +Options: |
| 251 | + |
| 252 | +- `--profile <name>`: Profile name |
| 253 | +- `--sheets <names>`: Comma-separated sheet names to create |
| 254 | + |
| 255 | +``` |
| 256 | +Examples: |
| 257 | +
|
| 258 | + # blank spreadsheet with default Sheet1 |
| 259 | + agentio gsheets create "Q4 Plan" |
| 260 | +
|
| 261 | + # multi-sheet workbook |
| 262 | + agentio gsheets create "Budget 2024" --sheets "Income,Expenses,Summary" |
| 263 | +``` |
| 264 | + |
| 265 | +## agentio gsheets copy <spreadsheet-id-or-url> <title> |
| 266 | + |
| 267 | +Copy a spreadsheet |
| 268 | + |
| 269 | +Options: |
| 270 | + |
| 271 | +- `--profile <name>`: Profile name |
| 272 | +- `--parent <folder-id>`: Destination folder ID |
| 273 | + |
| 274 | +``` |
| 275 | +Examples: |
| 276 | +
|
| 277 | + # duplicate to My Drive root |
| 278 | + agentio gsheets copy 1A2bCdEf... "Q4 Plan (copy)" |
| 279 | +
|
| 280 | + # duplicate into a specific folder |
| 281 | + agentio gsheets copy 1A2bCdEf... "Q4 Plan (copy)" --parent 1FoLdErIdAbCd... |
| 282 | +``` |
| 283 | + |
| 284 | +## agentio gsheets export <spreadsheet-id-or-url> |
| 285 | + |
| 286 | +Export a spreadsheet to a file |
| 287 | + |
| 288 | +Options: |
| 289 | + |
| 290 | +- `--profile <name>`: Profile name |
| 291 | +- `--output <path>`: Output file path |
| 292 | +- `--format <fmt>`: Export format: xlsx, pdf, csv, ods, tsv (default: xlsx) |
| 293 | + |
| 294 | +``` |
| 295 | +Examples: |
| 296 | +
|
| 297 | + # default xlsx export |
| 298 | + agentio gsheets export 1A2bCdEf... --output report.xlsx |
| 299 | +
|
| 300 | + # CSV (first sheet only) |
| 301 | + agentio gsheets export 1A2bCdEf... --output data.csv --format csv |
| 302 | +
|
| 303 | + # PDF |
| 304 | + agentio gsheets export 1A2bCdEf... --output report.pdf --format pdf |
| 305 | +
|
| 306 | +Formats: xlsx (default), pdf, csv, ods, tsv. csv and tsv are first sheet only. |
| 307 | +``` |
| 308 | + |
0 commit comments