maybeai-sheet-cli 0.3.1__tar.gz → 0.4.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- maybeai_sheet_cli-0.4.0/PKG-INFO +304 -0
- maybeai_sheet_cli-0.4.0/README.md +280 -0
- {maybeai_sheet_cli-0.3.1 → maybeai_sheet_cli-0.4.0}/docs/agent-friendly-command-tree.md +153 -5
- maybeai_sheet_cli-0.4.0/docs/operation-plan-cli-no-dsl-plan.md +477 -0
- {maybeai_sheet_cli-0.3.1 → maybeai_sheet_cli-0.4.0}/docs/superpowers/plans/2026-07-01-mbs-agent-friendly-phase-2-routes.md +20 -13
- maybeai_sheet_cli-0.4.0/docs/superpowers/reports/2026-07-01-phase2-test-review.html +309 -0
- {maybeai_sheet_cli-0.3.1 → maybeai_sheet_cli-0.4.0}/pyproject.toml +1 -1
- {maybeai_sheet_cli-0.3.1 → maybeai_sheet_cli-0.4.0}/src/maybeai_sheet/__init__.py +1 -1
- {maybeai_sheet_cli-0.3.1 → maybeai_sheet_cli-0.4.0}/src/maybeai_sheet/cli.py +10 -0
- maybeai_sheet_cli-0.4.0/src/maybeai_sheet/commands/_phase2.py +140 -0
- maybeai_sheet_cli-0.4.0/src/maybeai_sheet/commands/column.py +221 -0
- maybeai_sheet_cli-0.4.0/src/maybeai_sheet/commands/file.py +135 -0
- {maybeai_sheet_cli-0.3.1 → maybeai_sheet_cli-0.4.0}/src/maybeai_sheet/commands/formula.py +99 -0
- maybeai_sheet_cli-0.4.0/src/maybeai_sheet/commands/history.py +104 -0
- {maybeai_sheet_cli-0.3.1 → maybeai_sheet_cli-0.4.0}/src/maybeai_sheet/commands/range.py +55 -0
- maybeai_sheet_cli-0.4.0/src/maybeai_sheet/commands/row.py +170 -0
- maybeai_sheet_cli-0.4.0/src/maybeai_sheet/commands/style.py +255 -0
- maybeai_sheet_cli-0.4.0/src/maybeai_sheet/commands/worksheet.py +255 -0
- maybeai_sheet_cli-0.4.0/src/maybeai_sheet/endpoints.py +127 -0
- {maybeai_sheet_cli-0.3.1 → maybeai_sheet_cli-0.4.0}/src/maybeai_sheet/formatters.py +6 -0
- maybeai_sheet_cli-0.4.0/tests/test_endpoints.py +105 -0
- maybeai_sheet_cli-0.4.0/tests/test_phase2_cli.py +620 -0
- {maybeai_sheet_cli-0.3.1 → maybeai_sheet_cli-0.4.0}/tests/test_update.py +2 -1
- {maybeai_sheet_cli-0.3.1 → maybeai_sheet_cli-0.4.0}/uv.lock +1 -1
- maybeai_sheet_cli-0.3.1/PKG-INFO +0 -211
- maybeai_sheet_cli-0.3.1/README.md +0 -187
- maybeai_sheet_cli-0.3.1/src/maybeai_sheet/commands/worksheet.py +0 -65
- {maybeai_sheet_cli-0.3.1 → maybeai_sheet_cli-0.4.0}/.claude/settings.local.json +0 -0
- {maybeai_sheet_cli-0.3.1 → maybeai_sheet_cli-0.4.0}/.gitignore +0 -0
- {maybeai_sheet_cli-0.3.1 → maybeai_sheet_cli-0.4.0}/CLAUDE.md +0 -0
- {maybeai_sheet_cli-0.3.1 → maybeai_sheet_cli-0.4.0}/cli-packaging-plan.md +0 -0
- {maybeai_sheet_cli-0.3.1 → maybeai_sheet_cli-0.4.0}/cli-plan.md +0 -0
- {maybeai_sheet_cli-0.3.1 → maybeai_sheet_cli-0.4.0}/docs/superpowers/plans/2026-07-01-mbs-agent-friendly-command-tree.md +0 -0
- {maybeai_sheet_cli-0.3.1 → maybeai_sheet_cli-0.4.0}/docs/superpowers/plans/2026-07-01-mbs-agent-friendly-phase-2.md +0 -0
- {maybeai_sheet_cli-0.3.1 → maybeai_sheet_cli-0.4.0}/docs/superpowers/reports/2026-07-01-phase1-test-review.html +0 -0
- {maybeai_sheet_cli-0.3.1 → maybeai_sheet_cli-0.4.0}/docs/verification-matrix-fallback.md +0 -0
- {maybeai_sheet_cli-0.3.1 → maybeai_sheet_cli-0.4.0}/src/maybeai_sheet/client.py +0 -0
- {maybeai_sheet_cli-0.3.1 → maybeai_sheet_cli-0.4.0}/src/maybeai_sheet/commands/__init__.py +0 -0
- {maybeai_sheet_cli-0.3.1 → maybeai_sheet_cli-0.4.0}/src/maybeai_sheet/commands/raw.py +0 -0
- {maybeai_sheet_cli-0.3.1 → maybeai_sheet_cli-0.4.0}/src/maybeai_sheet/commands/share.py +0 -0
- {maybeai_sheet_cli-0.3.1 → maybeai_sheet_cli-0.4.0}/src/maybeai_sheet/commands/sheet.py +0 -0
- {maybeai_sheet_cli-0.3.1 → maybeai_sheet_cli-0.4.0}/src/maybeai_sheet/commands/table.py +0 -0
- {maybeai_sheet_cli-0.3.1 → maybeai_sheet_cli-0.4.0}/src/maybeai_sheet/commands/workbook.py +0 -0
- {maybeai_sheet_cli-0.3.1 → maybeai_sheet_cli-0.4.0}/src/maybeai_sheet/config.py +0 -0
- {maybeai_sheet_cli-0.3.1 → maybeai_sheet_cli-0.4.0}/src/maybeai_sheet/errors.py +0 -0
- {maybeai_sheet_cli-0.3.1 → maybeai_sheet_cli-0.4.0}/src/maybeai_sheet/models/__init__.py +0 -0
- {maybeai_sheet_cli-0.3.1 → maybeai_sheet_cli-0.4.0}/src/maybeai_sheet/models/share.py +0 -0
- {maybeai_sheet_cli-0.3.1 → maybeai_sheet_cli-0.4.0}/src/maybeai_sheet/models/sheet.py +0 -0
- {maybeai_sheet_cli-0.3.1 → maybeai_sheet_cli-0.4.0}/src/maybeai_sheet/models/workbook.py +0 -0
- {maybeai_sheet_cli-0.3.1 → maybeai_sheet_cli-0.4.0}/src/maybeai_sheet/options.py +0 -0
- {maybeai_sheet_cli-0.3.1 → maybeai_sheet_cli-0.4.0}/src/maybeai_sheet/resolver.py +0 -0
- {maybeai_sheet_cli-0.3.1 → maybeai_sheet_cli-0.4.0}/src/maybeai_sheet/update.py +0 -0
- {maybeai_sheet_cli-0.3.1 → maybeai_sheet_cli-0.4.0}/tests/test_cli.py +0 -0
- {maybeai_sheet_cli-0.3.1 → maybeai_sheet_cli-0.4.0}/tests/test_formatters.py +0 -0
- {maybeai_sheet_cli-0.3.1 → maybeai_sheet_cli-0.4.0}/tests/test_resolver.py +0 -0
|
@@ -0,0 +1,304 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: maybeai-sheet-cli
|
|
3
|
+
Version: 0.4.0
|
|
4
|
+
Summary: CLI for common MaybeAI spreadsheet operations
|
|
5
|
+
Project-URL: Homepage, https://github.com/OmniMCP-AI/maybeai-sheet-cli
|
|
6
|
+
Project-URL: Repository, https://github.com/OmniMCP-AI/maybeai-sheet-cli
|
|
7
|
+
Project-URL: Issues, https://github.com/OmniMCP-AI/maybeai-sheet-cli/issues
|
|
8
|
+
Author: OmniMCP-AI
|
|
9
|
+
License: Proprietary
|
|
10
|
+
Keywords: cli,excel,maybeai,spreadsheet
|
|
11
|
+
Classifier: Environment :: Console
|
|
12
|
+
Classifier: License :: Other/Proprietary License
|
|
13
|
+
Classifier: Programming Language :: Python :: 3
|
|
14
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
16
|
+
Classifier: Topic :: Office/Business :: Financial :: Spreadsheet
|
|
17
|
+
Requires-Python: >=3.10
|
|
18
|
+
Requires-Dist: httpx<1,>=0.27
|
|
19
|
+
Requires-Dist: pydantic<3,>=2.7
|
|
20
|
+
Requires-Dist: pyyaml<7,>=6
|
|
21
|
+
Requires-Dist: rich<14,>=13.7
|
|
22
|
+
Requires-Dist: typer<1,>=0.12
|
|
23
|
+
Description-Content-Type: text/markdown
|
|
24
|
+
|
|
25
|
+
# maybeai-sheet-cli
|
|
26
|
+
|
|
27
|
+
CLI for MaybeAI spreadsheet operations.
|
|
28
|
+
|
|
29
|
+
`mbs` wraps the MaybeAI spreadsheet HTTP APIs behind a stable command-line interface for humans, CI jobs, and agents.
|
|
30
|
+
|
|
31
|
+
## Install
|
|
32
|
+
|
|
33
|
+
On Debian/Ubuntu and other **PEP 668** systems, do **not** use bare `pip install` on system Python. Use **pipx** (recommended for CLIs):
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
sudo apt install -y pipx python3-venv
|
|
37
|
+
pipx ensurepath
|
|
38
|
+
# re-login or: source ~/.bashrc
|
|
39
|
+
|
|
40
|
+
pipx install maybeai-sheet-cli
|
|
41
|
+
mbs --version
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
For local venvs or macOS/dev machines, plain pip is fine:
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
pip install maybeai-sheet-cli
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
Upgrade to the latest release:
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
mbs update # when installed via pip or pipx
|
|
54
|
+
pipx upgrade maybeai-sheet-cli # alternative on pipx installs
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
Install a specific version:
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
mbs update --version 0.3.2
|
|
61
|
+
pipx install maybeai-sheet-cli==0.3.2 --force # pipx reinstall pin
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
Uninstall:
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
pipx uninstall maybeai-sheet-cli
|
|
68
|
+
# not: pip uninstall -U (-U is invalid for uninstall)
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
## Requirements
|
|
72
|
+
|
|
73
|
+
- Python 3.10+
|
|
74
|
+
- `MAYBEAI_API_TOKEN`
|
|
75
|
+
|
|
76
|
+
## Configure
|
|
77
|
+
|
|
78
|
+
Set your API token:
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
export MAYBEAI_API_TOKEN="YOUR_TOKEN"
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
Optional global flags:
|
|
85
|
+
|
|
86
|
+
- `--base-url` to point at a different MaybeAI API host
|
|
87
|
+
- `--output json|table|yaml`
|
|
88
|
+
- `--timeout <seconds>`
|
|
89
|
+
- `--verbose`
|
|
90
|
+
|
|
91
|
+
## Quick Start
|
|
92
|
+
|
|
93
|
+
Read a bounded range:
|
|
94
|
+
|
|
95
|
+
```bash
|
|
96
|
+
mbs range read --doc-id abc123 --worksheet-name Sheet1 --range A1:D20
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
List worksheets:
|
|
100
|
+
|
|
101
|
+
```bash
|
|
102
|
+
mbs worksheet list --doc-id abc123
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
Read headers from a worksheet:
|
|
106
|
+
|
|
107
|
+
```bash
|
|
108
|
+
mbs table headers --doc-id abc123 --gid 3
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
Create a workbook:
|
|
112
|
+
|
|
113
|
+
```bash
|
|
114
|
+
mbs workbook create --title "Board Pack"
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
Upload a workbook-style `.xlsx` through the default Excelize path:
|
|
118
|
+
|
|
119
|
+
```bash
|
|
120
|
+
mbs workbook import ./report.xlsx
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
Import a large table-like `.xlsx` into SheetTable/PG:
|
|
124
|
+
|
|
125
|
+
```bash
|
|
126
|
+
mbs workbook import ./large-table.xlsx --engine postgres
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
Append rows and verify:
|
|
130
|
+
|
|
131
|
+
```bash
|
|
132
|
+
mbs table append-rows --doc-id abc123 --gid 3 --rows rows.json --verify
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
Make a workbook public for viewers:
|
|
136
|
+
|
|
137
|
+
```bash
|
|
138
|
+
mbs share visibility --doc-id abc123 --visibility public --public-permission viewer
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
Rename a worksheet and inspect a destructive row delete before sending it:
|
|
142
|
+
|
|
143
|
+
```bash
|
|
144
|
+
mbs worksheet rename --doc-id abc123 --worksheet-name Old --new-name New
|
|
145
|
+
mbs row delete --doc-id abc123 --worksheet-name Sheet1 --row 10 --dry-run
|
|
146
|
+
mbs row delete --doc-id abc123 --worksheet-name Sheet1 --row 10 --yes
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
Search, style, inspect history, and export:
|
|
150
|
+
|
|
151
|
+
```bash
|
|
152
|
+
mbs range search --doc-id abc123 --worksheet-name Sheet1 --query revenue --max-results 20
|
|
153
|
+
mbs style freeze-panes --doc-id abc123 --worksheet-name Sheet1 --cell B2
|
|
154
|
+
mbs formula calculate --doc-id abc123 --worksheet-name Sheet1 --cell E2 --formula "=SUM(B2:D2)"
|
|
155
|
+
mbs history list --doc-id abc123 --limit 10
|
|
156
|
+
mbs file export --doc-id abc123 --out workbook.xlsx
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
## Commands
|
|
160
|
+
|
|
161
|
+
The preferred command groups are `workbook`, `worksheet`, `range`, `table`,
|
|
162
|
+
`row`, `column`, `formula`, `style`, `history`, `file`, `share`, and `raw`.
|
|
163
|
+
The older `sheet ...` commands remain available as compatibility aliases.
|
|
164
|
+
|
|
165
|
+
```text
|
|
166
|
+
mbs
|
|
167
|
+
├── update
|
|
168
|
+
│ └── Update maybeai-sheet-cli from PyPI.
|
|
169
|
+
│
|
|
170
|
+
├── workbook
|
|
171
|
+
│ ├── create Create a new workbook.
|
|
172
|
+
│ ├── create-from-file Upload/import an .xlsx file.
|
|
173
|
+
│ ├── import Preferred alias for create-from-file.
|
|
174
|
+
│ ├── manifest Inspect workbook profile and routing metadata.
|
|
175
|
+
│ └── capabilities Inspect workbook capability/profile metadata.
|
|
176
|
+
│
|
|
177
|
+
├── worksheet
|
|
178
|
+
│ ├── list List worksheets in a workbook.
|
|
179
|
+
│ ├── create Create a worksheet, optionally with starter values.
|
|
180
|
+
│ ├── rename Rename a worksheet.
|
|
181
|
+
│ ├── delete Delete a worksheet; requires --yes unless --dry-run.
|
|
182
|
+
│ ├── copy Copy a worksheet.
|
|
183
|
+
│ └── move Move a worksheet to a zero-based index.
|
|
184
|
+
│
|
|
185
|
+
├── range
|
|
186
|
+
│ ├── read Read a bounded A1 range.
|
|
187
|
+
│ ├── write Write a JSON matrix into an A1 range.
|
|
188
|
+
│ ├── clear Clear an A1 range.
|
|
189
|
+
│ └── search Search a worksheet with bounded results.
|
|
190
|
+
│
|
|
191
|
+
├── table
|
|
192
|
+
│ ├── headers Read header row metadata.
|
|
193
|
+
│ ├── append-rows Append JSON row objects.
|
|
194
|
+
│ └── upsert-rows Upsert JSON row objects by key.
|
|
195
|
+
│
|
|
196
|
+
├── row
|
|
197
|
+
│ ├── insert Insert rows.
|
|
198
|
+
│ ├── delete Delete rows; requires --yes unless --dry-run.
|
|
199
|
+
│ └── move Move rows.
|
|
200
|
+
│
|
|
201
|
+
├── column
|
|
202
|
+
│ ├── insert Insert columns.
|
|
203
|
+
│ ├── delete Delete columns; requires --yes unless --dry-run.
|
|
204
|
+
│ ├── move Move columns.
|
|
205
|
+
│ └── width Set column width.
|
|
206
|
+
│
|
|
207
|
+
├── formula
|
|
208
|
+
│ ├── read Read formulas with FORMULA render mode.
|
|
209
|
+
│ ├── set Set one formula cell.
|
|
210
|
+
│ ├── batch-set Set formula ranges from a JSON operations file.
|
|
211
|
+
│ ├── recalculate Recalculate formulas for a worksheet/workbook.
|
|
212
|
+
│ ├── calculate Calculate one formula cell.
|
|
213
|
+
│ └── lineage Trace formula lineage for one cell.
|
|
214
|
+
│
|
|
215
|
+
├── style
|
|
216
|
+
│ ├── freeze-panes Freeze rows/columns using an A1 cell boundary.
|
|
217
|
+
│ ├── auto-filter set Set worksheet auto-filter range.
|
|
218
|
+
│ ├── auto-filter remove Remove worksheet auto-filter.
|
|
219
|
+
│ ├── columns-width Set column widths.
|
|
220
|
+
│ └── rows-height Set row heights.
|
|
221
|
+
│
|
|
222
|
+
├── history
|
|
223
|
+
│ ├── list List workbook versions with bounded output.
|
|
224
|
+
│ └── read Read a workbook version.
|
|
225
|
+
│
|
|
226
|
+
├── file
|
|
227
|
+
│ ├── export Export workbook bytes to --out.
|
|
228
|
+
│ ├── list List files with bounded output.
|
|
229
|
+
│ └── search Search files with bounded output.
|
|
230
|
+
│
|
|
231
|
+
├── share
|
|
232
|
+
│ ├── visibility Set workbook visibility.
|
|
233
|
+
│ ├── grant Grant a user permission.
|
|
234
|
+
│ ├── permission Read current permission.
|
|
235
|
+
│ ├── remove Remove a user's access.
|
|
236
|
+
│ └── list List sharing entries.
|
|
237
|
+
│
|
|
238
|
+
├── raw
|
|
239
|
+
│ └── post Low-level POST escape hatch for routed API paths.
|
|
240
|
+
│
|
|
241
|
+
└── sheet Legacy compatibility aliases.
|
|
242
|
+
├── read
|
|
243
|
+
├── read-range
|
|
244
|
+
├── read-many
|
|
245
|
+
├── named-range
|
|
246
|
+
├── headers
|
|
247
|
+
├── worksheets
|
|
248
|
+
├── formulas
|
|
249
|
+
├── write-range
|
|
250
|
+
├── clear-range
|
|
251
|
+
├── append
|
|
252
|
+
├── upsert
|
|
253
|
+
├── formula-set
|
|
254
|
+
├── formula-batch-set
|
|
255
|
+
├── recalculate
|
|
256
|
+
└── create-worksheet
|
|
257
|
+
```
|
|
258
|
+
|
|
259
|
+
Relationship guide:
|
|
260
|
+
|
|
261
|
+
- Use `workbook` for file-level creation, upload/import, and manifest checks.
|
|
262
|
+
- Use `worksheet` for tab lifecycle operations.
|
|
263
|
+
- Use `range` for coordinate-based reads and writes.
|
|
264
|
+
- Use `table` when data is row-object shaped and keyed by headers.
|
|
265
|
+
- Use `row` and `column` for structural row/column changes.
|
|
266
|
+
- Use `formula` when preserving or changing formulas matters.
|
|
267
|
+
- Use `style` for layout operations like freeze panes, filter ranges, widths, and heights.
|
|
268
|
+
- Use `history` for read-only version inspection.
|
|
269
|
+
- Use `file` for export/list/search file operations.
|
|
270
|
+
- Use `share` for visibility and collaborator access.
|
|
271
|
+
- Use `raw post` only when a first-class command does not exist yet.
|
|
272
|
+
|
|
273
|
+
Targeting notes:
|
|
274
|
+
|
|
275
|
+
- Most commands accept `--doc-id`, `--url`, or `--uri`.
|
|
276
|
+
- Prefer `--worksheet-name` when the backend route supports names.
|
|
277
|
+
- Use `--gid` for gid-specific table operations; live verification showed
|
|
278
|
+
`table upsert-rows` is safest with `--gid`.
|
|
279
|
+
|
|
280
|
+
## Input Rules
|
|
281
|
+
|
|
282
|
+
- Use `--doc-id`, `--url`, or `--uri` to identify a workbook.
|
|
283
|
+
- Use `--worksheet-name` when the endpoint supports it.
|
|
284
|
+
- Use `--gid` for gid-specific sheet targeting.
|
|
285
|
+
- File inputs like `--rows`, `--values`, `--targets`, and `--operations` must be JSON.
|
|
286
|
+
|
|
287
|
+
## Output
|
|
288
|
+
|
|
289
|
+
Default output is JSON. `table` is optimized for sheet-like payloads; `yaml` is also supported.
|
|
290
|
+
|
|
291
|
+
## Development
|
|
292
|
+
|
|
293
|
+
```bash
|
|
294
|
+
python3 -m venv .venv
|
|
295
|
+
. .venv/bin/activate
|
|
296
|
+
pip install -U pip
|
|
297
|
+
pip install -e .
|
|
298
|
+
```
|
|
299
|
+
|
|
300
|
+
Run tests:
|
|
301
|
+
|
|
302
|
+
```bash
|
|
303
|
+
python -m unittest discover -s tests -v
|
|
304
|
+
```
|
|
@@ -0,0 +1,280 @@
|
|
|
1
|
+
# maybeai-sheet-cli
|
|
2
|
+
|
|
3
|
+
CLI for MaybeAI spreadsheet operations.
|
|
4
|
+
|
|
5
|
+
`mbs` wraps the MaybeAI spreadsheet HTTP APIs behind a stable command-line interface for humans, CI jobs, and agents.
|
|
6
|
+
|
|
7
|
+
## Install
|
|
8
|
+
|
|
9
|
+
On Debian/Ubuntu and other **PEP 668** systems, do **not** use bare `pip install` on system Python. Use **pipx** (recommended for CLIs):
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
sudo apt install -y pipx python3-venv
|
|
13
|
+
pipx ensurepath
|
|
14
|
+
# re-login or: source ~/.bashrc
|
|
15
|
+
|
|
16
|
+
pipx install maybeai-sheet-cli
|
|
17
|
+
mbs --version
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
For local venvs or macOS/dev machines, plain pip is fine:
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
pip install maybeai-sheet-cli
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
Upgrade to the latest release:
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
mbs update # when installed via pip or pipx
|
|
30
|
+
pipx upgrade maybeai-sheet-cli # alternative on pipx installs
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Install a specific version:
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
mbs update --version 0.3.2
|
|
37
|
+
pipx install maybeai-sheet-cli==0.3.2 --force # pipx reinstall pin
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
Uninstall:
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
pipx uninstall maybeai-sheet-cli
|
|
44
|
+
# not: pip uninstall -U (-U is invalid for uninstall)
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## Requirements
|
|
48
|
+
|
|
49
|
+
- Python 3.10+
|
|
50
|
+
- `MAYBEAI_API_TOKEN`
|
|
51
|
+
|
|
52
|
+
## Configure
|
|
53
|
+
|
|
54
|
+
Set your API token:
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
export MAYBEAI_API_TOKEN="YOUR_TOKEN"
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
Optional global flags:
|
|
61
|
+
|
|
62
|
+
- `--base-url` to point at a different MaybeAI API host
|
|
63
|
+
- `--output json|table|yaml`
|
|
64
|
+
- `--timeout <seconds>`
|
|
65
|
+
- `--verbose`
|
|
66
|
+
|
|
67
|
+
## Quick Start
|
|
68
|
+
|
|
69
|
+
Read a bounded range:
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
mbs range read --doc-id abc123 --worksheet-name Sheet1 --range A1:D20
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
List worksheets:
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
mbs worksheet list --doc-id abc123
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
Read headers from a worksheet:
|
|
82
|
+
|
|
83
|
+
```bash
|
|
84
|
+
mbs table headers --doc-id abc123 --gid 3
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
Create a workbook:
|
|
88
|
+
|
|
89
|
+
```bash
|
|
90
|
+
mbs workbook create --title "Board Pack"
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
Upload a workbook-style `.xlsx` through the default Excelize path:
|
|
94
|
+
|
|
95
|
+
```bash
|
|
96
|
+
mbs workbook import ./report.xlsx
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
Import a large table-like `.xlsx` into SheetTable/PG:
|
|
100
|
+
|
|
101
|
+
```bash
|
|
102
|
+
mbs workbook import ./large-table.xlsx --engine postgres
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
Append rows and verify:
|
|
106
|
+
|
|
107
|
+
```bash
|
|
108
|
+
mbs table append-rows --doc-id abc123 --gid 3 --rows rows.json --verify
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
Make a workbook public for viewers:
|
|
112
|
+
|
|
113
|
+
```bash
|
|
114
|
+
mbs share visibility --doc-id abc123 --visibility public --public-permission viewer
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
Rename a worksheet and inspect a destructive row delete before sending it:
|
|
118
|
+
|
|
119
|
+
```bash
|
|
120
|
+
mbs worksheet rename --doc-id abc123 --worksheet-name Old --new-name New
|
|
121
|
+
mbs row delete --doc-id abc123 --worksheet-name Sheet1 --row 10 --dry-run
|
|
122
|
+
mbs row delete --doc-id abc123 --worksheet-name Sheet1 --row 10 --yes
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
Search, style, inspect history, and export:
|
|
126
|
+
|
|
127
|
+
```bash
|
|
128
|
+
mbs range search --doc-id abc123 --worksheet-name Sheet1 --query revenue --max-results 20
|
|
129
|
+
mbs style freeze-panes --doc-id abc123 --worksheet-name Sheet1 --cell B2
|
|
130
|
+
mbs formula calculate --doc-id abc123 --worksheet-name Sheet1 --cell E2 --formula "=SUM(B2:D2)"
|
|
131
|
+
mbs history list --doc-id abc123 --limit 10
|
|
132
|
+
mbs file export --doc-id abc123 --out workbook.xlsx
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
## Commands
|
|
136
|
+
|
|
137
|
+
The preferred command groups are `workbook`, `worksheet`, `range`, `table`,
|
|
138
|
+
`row`, `column`, `formula`, `style`, `history`, `file`, `share`, and `raw`.
|
|
139
|
+
The older `sheet ...` commands remain available as compatibility aliases.
|
|
140
|
+
|
|
141
|
+
```text
|
|
142
|
+
mbs
|
|
143
|
+
├── update
|
|
144
|
+
│ └── Update maybeai-sheet-cli from PyPI.
|
|
145
|
+
│
|
|
146
|
+
├── workbook
|
|
147
|
+
│ ├── create Create a new workbook.
|
|
148
|
+
│ ├── create-from-file Upload/import an .xlsx file.
|
|
149
|
+
│ ├── import Preferred alias for create-from-file.
|
|
150
|
+
│ ├── manifest Inspect workbook profile and routing metadata.
|
|
151
|
+
│ └── capabilities Inspect workbook capability/profile metadata.
|
|
152
|
+
│
|
|
153
|
+
├── worksheet
|
|
154
|
+
│ ├── list List worksheets in a workbook.
|
|
155
|
+
│ ├── create Create a worksheet, optionally with starter values.
|
|
156
|
+
│ ├── rename Rename a worksheet.
|
|
157
|
+
│ ├── delete Delete a worksheet; requires --yes unless --dry-run.
|
|
158
|
+
│ ├── copy Copy a worksheet.
|
|
159
|
+
│ └── move Move a worksheet to a zero-based index.
|
|
160
|
+
│
|
|
161
|
+
├── range
|
|
162
|
+
│ ├── read Read a bounded A1 range.
|
|
163
|
+
│ ├── write Write a JSON matrix into an A1 range.
|
|
164
|
+
│ ├── clear Clear an A1 range.
|
|
165
|
+
│ └── search Search a worksheet with bounded results.
|
|
166
|
+
│
|
|
167
|
+
├── table
|
|
168
|
+
│ ├── headers Read header row metadata.
|
|
169
|
+
│ ├── append-rows Append JSON row objects.
|
|
170
|
+
│ └── upsert-rows Upsert JSON row objects by key.
|
|
171
|
+
│
|
|
172
|
+
├── row
|
|
173
|
+
│ ├── insert Insert rows.
|
|
174
|
+
│ ├── delete Delete rows; requires --yes unless --dry-run.
|
|
175
|
+
│ └── move Move rows.
|
|
176
|
+
│
|
|
177
|
+
├── column
|
|
178
|
+
│ ├── insert Insert columns.
|
|
179
|
+
│ ├── delete Delete columns; requires --yes unless --dry-run.
|
|
180
|
+
│ ├── move Move columns.
|
|
181
|
+
│ └── width Set column width.
|
|
182
|
+
│
|
|
183
|
+
├── formula
|
|
184
|
+
│ ├── read Read formulas with FORMULA render mode.
|
|
185
|
+
│ ├── set Set one formula cell.
|
|
186
|
+
│ ├── batch-set Set formula ranges from a JSON operations file.
|
|
187
|
+
│ ├── recalculate Recalculate formulas for a worksheet/workbook.
|
|
188
|
+
│ ├── calculate Calculate one formula cell.
|
|
189
|
+
│ └── lineage Trace formula lineage for one cell.
|
|
190
|
+
│
|
|
191
|
+
├── style
|
|
192
|
+
│ ├── freeze-panes Freeze rows/columns using an A1 cell boundary.
|
|
193
|
+
│ ├── auto-filter set Set worksheet auto-filter range.
|
|
194
|
+
│ ├── auto-filter remove Remove worksheet auto-filter.
|
|
195
|
+
│ ├── columns-width Set column widths.
|
|
196
|
+
│ └── rows-height Set row heights.
|
|
197
|
+
│
|
|
198
|
+
├── history
|
|
199
|
+
│ ├── list List workbook versions with bounded output.
|
|
200
|
+
│ └── read Read a workbook version.
|
|
201
|
+
│
|
|
202
|
+
├── file
|
|
203
|
+
│ ├── export Export workbook bytes to --out.
|
|
204
|
+
│ ├── list List files with bounded output.
|
|
205
|
+
│ └── search Search files with bounded output.
|
|
206
|
+
│
|
|
207
|
+
├── share
|
|
208
|
+
│ ├── visibility Set workbook visibility.
|
|
209
|
+
│ ├── grant Grant a user permission.
|
|
210
|
+
│ ├── permission Read current permission.
|
|
211
|
+
│ ├── remove Remove a user's access.
|
|
212
|
+
│ └── list List sharing entries.
|
|
213
|
+
│
|
|
214
|
+
├── raw
|
|
215
|
+
│ └── post Low-level POST escape hatch for routed API paths.
|
|
216
|
+
│
|
|
217
|
+
└── sheet Legacy compatibility aliases.
|
|
218
|
+
├── read
|
|
219
|
+
├── read-range
|
|
220
|
+
├── read-many
|
|
221
|
+
├── named-range
|
|
222
|
+
├── headers
|
|
223
|
+
├── worksheets
|
|
224
|
+
├── formulas
|
|
225
|
+
├── write-range
|
|
226
|
+
├── clear-range
|
|
227
|
+
├── append
|
|
228
|
+
├── upsert
|
|
229
|
+
├── formula-set
|
|
230
|
+
├── formula-batch-set
|
|
231
|
+
├── recalculate
|
|
232
|
+
└── create-worksheet
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
Relationship guide:
|
|
236
|
+
|
|
237
|
+
- Use `workbook` for file-level creation, upload/import, and manifest checks.
|
|
238
|
+
- Use `worksheet` for tab lifecycle operations.
|
|
239
|
+
- Use `range` for coordinate-based reads and writes.
|
|
240
|
+
- Use `table` when data is row-object shaped and keyed by headers.
|
|
241
|
+
- Use `row` and `column` for structural row/column changes.
|
|
242
|
+
- Use `formula` when preserving or changing formulas matters.
|
|
243
|
+
- Use `style` for layout operations like freeze panes, filter ranges, widths, and heights.
|
|
244
|
+
- Use `history` for read-only version inspection.
|
|
245
|
+
- Use `file` for export/list/search file operations.
|
|
246
|
+
- Use `share` for visibility and collaborator access.
|
|
247
|
+
- Use `raw post` only when a first-class command does not exist yet.
|
|
248
|
+
|
|
249
|
+
Targeting notes:
|
|
250
|
+
|
|
251
|
+
- Most commands accept `--doc-id`, `--url`, or `--uri`.
|
|
252
|
+
- Prefer `--worksheet-name` when the backend route supports names.
|
|
253
|
+
- Use `--gid` for gid-specific table operations; live verification showed
|
|
254
|
+
`table upsert-rows` is safest with `--gid`.
|
|
255
|
+
|
|
256
|
+
## Input Rules
|
|
257
|
+
|
|
258
|
+
- Use `--doc-id`, `--url`, or `--uri` to identify a workbook.
|
|
259
|
+
- Use `--worksheet-name` when the endpoint supports it.
|
|
260
|
+
- Use `--gid` for gid-specific sheet targeting.
|
|
261
|
+
- File inputs like `--rows`, `--values`, `--targets`, and `--operations` must be JSON.
|
|
262
|
+
|
|
263
|
+
## Output
|
|
264
|
+
|
|
265
|
+
Default output is JSON. `table` is optimized for sheet-like payloads; `yaml` is also supported.
|
|
266
|
+
|
|
267
|
+
## Development
|
|
268
|
+
|
|
269
|
+
```bash
|
|
270
|
+
python3 -m venv .venv
|
|
271
|
+
. .venv/bin/activate
|
|
272
|
+
pip install -U pip
|
|
273
|
+
pip install -e .
|
|
274
|
+
```
|
|
275
|
+
|
|
276
|
+
Run tests:
|
|
277
|
+
|
|
278
|
+
```bash
|
|
279
|
+
python -m unittest discover -s tests -v
|
|
280
|
+
```
|