CLI for common MaybeAI spreadsheet operations
Project description
maybeai-sheet-cli
CLI for MaybeAI spreadsheet operations.
mbs wraps the MaybeAI spreadsheet HTTP APIs behind a stable command-line interface for humans, CI jobs, and agents.
Install
On Debian/Ubuntu and other PEP 668 systems, do not use bare pip install on system Python. Use pipx (recommended for CLIs):
sudo apt install -y pipx python3-venv
pipx ensurepath
# re-login or: source ~/.bashrc
pipx install maybeai-sheet-cli
mbs --version
For local venvs or macOS/dev machines, plain pip is fine:
pip install maybeai-sheet-cli
Upgrade to the latest release:
mbs update # when installed via pip or pipx
pipx upgrade maybeai-sheet-cli # alternative on pipx installs
Install a specific version:
mbs update --version 0.3.2
pipx install maybeai-sheet-cli==0.3.2 --force # pipx reinstall pin
Uninstall:
pipx uninstall maybeai-sheet-cli
# not: pip uninstall -U (-U is invalid for uninstall)
Requirements
- Python 3.10+
MAYBEAI_API_TOKEN
Configure
Set your API token:
export MAYBEAI_API_TOKEN="YOUR_TOKEN"
Optional global flags:
--base-urlto point at a different MaybeAI API host--output json|table|yaml--timeout <seconds>--verbose
Quick Start
Read a bounded range:
mbs range read --doc-id abc123 --worksheet-name Sheet1 --range A1:D20
List worksheets:
mbs worksheet list --doc-id abc123
Read headers from a worksheet:
mbs table headers --doc-id abc123 --gid 3
Create a workbook:
mbs workbook create --title "Board Pack"
Upload a workbook-style .xlsx through the default Excelize path:
mbs workbook import ./report.xlsx
Import a large table-like .xlsx into SheetTable/PG:
mbs workbook import ./large-table.xlsx --engine postgres
Append rows and verify:
mbs table append-rows --doc-id abc123 --gid 3 --rows rows.json --verify
Make a workbook public for viewers:
mbs share visibility --doc-id abc123 --visibility public --public-permission viewer
Commands
The preferred command groups are workbook, worksheet, range, table,
formula, share, and raw. The older sheet ... commands remain available
as compatibility aliases.
mbs
├── update
│ └── Update maybeai-sheet-cli from PyPI.
│
├── workbook
│ ├── create Create a new workbook.
│ ├── create-from-file Upload/import an .xlsx file.
│ ├── import Preferred alias for create-from-file.
│ ├── manifest Inspect workbook profile and routing metadata.
│ └── capabilities Inspect workbook capability/profile metadata.
│
├── worksheet
│ ├── list List worksheets in a workbook.
│ └── create Create a worksheet, optionally with starter values.
│
├── range
│ ├── read Read a bounded A1 range.
│ ├── write Write a JSON matrix into an A1 range.
│ └── clear Clear an A1 range.
│
├── table
│ ├── headers Read header row metadata.
│ ├── append-rows Append JSON row objects.
│ └── upsert-rows Upsert JSON row objects by key.
│
├── formula
│ ├── read Read formulas with FORMULA render mode.
│ ├── set Set one formula cell.
│ ├── batch-set Set formula ranges from a JSON operations file.
│ └── recalculate Recalculate formulas for a worksheet/workbook.
│
├── share
│ ├── visibility Set workbook visibility.
│ ├── grant Grant a user permission.
│ ├── permission Read current permission.
│ ├── remove Remove a user's access.
│ └── list List sharing entries.
│
├── raw
│ └── post Low-level POST escape hatch for routed API paths.
│
└── sheet Legacy compatibility aliases.
├── read
├── read-range
├── read-many
├── named-range
├── headers
├── worksheets
├── formulas
├── write-range
├── clear-range
├── append
├── upsert
├── formula-set
├── formula-batch-set
├── recalculate
└── create-worksheet
Relationship guide:
- Use
workbookfor file-level creation, upload/import, and manifest checks. - Use
worksheetfor tab lifecycle operations. - Use
rangefor coordinate-based reads and writes. - Use
tablewhen data is row-object shaped and keyed by headers. - Use
formulawhen preserving or changing formulas matters. - Use
sharefor visibility and collaborator access. - Use
raw postonly when a first-class command does not exist yet.
Targeting notes:
- Most commands accept
--doc-id,--url, or--uri. - Prefer
--worksheet-namewhen the backend route supports names. - Use
--gidfor gid-specific table operations; live verification showedtable upsert-rowsis safest with--gid.
Input Rules
- Use
--doc-id,--url, or--urito identify a workbook. - Use
--worksheet-namewhen the endpoint supports it. - Use
--gidfor gid-specific sheet targeting. - File inputs like
--rows,--values,--targets, and--operationsmust be JSON.
Output
Default output is JSON. table is optimized for sheet-like payloads; yaml is also supported.
Development
python3 -m venv .venv
. .venv/bin/activate
pip install -U pip
pip install -e .
Run tests:
python -m unittest discover -s tests -v
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file maybeai_sheet_cli-0.3.2.tar.gz.
File metadata
- Download URL: maybeai_sheet_cli-0.3.2.tar.gz
- Upload date:
- Size: 76.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
32d696f3b58b4581001553589e3e530408aded7367960e6ee2b62b3a9a4b90a6
|
|
| MD5 |
2146e8c8ab490e381a0660b9ccf1204e
|
|
| BLAKE2b-256 |
3521e047180d38631f381f63bf93a9cbc4c521173b5f93b89694d1ae30a08881
|
File details
Details for the file maybeai_sheet_cli-0.3.2-py3-none-any.whl.
File metadata
- Download URL: maybeai_sheet_cli-0.3.2-py3-none-any.whl
- Upload date:
- Size: 26.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
586a50286b4f0300a6d5712087e4f7467ce87aee7a00c4bf28273dfd09bf58a1
|
|
| MD5 |
70387ed9c63f54409da6c657bd357318
|
|
| BLAKE2b-256 |
a3c3fa894fb7b46038913d3803f4945128c4d4cd4232da4b73c58978fc8b0fa3
|