Skip to main content

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.1
pipx install maybeai-sheet-cli==0.3.1 --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-url to 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.

  • update
  • workbook create
  • workbook create-from-file
  • workbook import
  • workbook manifest
  • workbook capabilities
  • worksheet list
  • worksheet create
  • range read
  • range write
  • range clear
  • table headers
  • table append-rows
  • table upsert-rows
  • formula read
  • formula set
  • formula batch-set
  • formula recalculate
  • share visibility
  • share grant
  • share permission
  • share remove
  • share list
  • sheet read
  • sheet read-range
  • sheet read-many
  • sheet named-range
  • sheet headers
  • sheet worksheets
  • sheet formulas
  • sheet write-range
  • sheet clear-range
  • sheet append
  • sheet formula-set
  • sheet formula-batch-set
  • sheet recalculate
  • sheet upsert
  • sheet create-worksheet
  • raw post

Input Rules

  • Use --doc-id, --url, or --uri to identify a workbook.
  • Use --worksheet-name when the endpoint supports it.
  • Use --gid for gid-specific sheet targeting.
  • File inputs like --rows, --values, --targets, and --operations must 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

maybeai_sheet_cli-0.3.1.tar.gz (76.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

maybeai_sheet_cli-0.3.1-py3-none-any.whl (25.7 kB view details)

Uploaded Python 3

File details

Details for the file maybeai_sheet_cli-0.3.1.tar.gz.

File metadata

  • Download URL: maybeai_sheet_cli-0.3.1.tar.gz
  • Upload date:
  • Size: 76.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for maybeai_sheet_cli-0.3.1.tar.gz
Algorithm Hash digest
SHA256 ac29247498fa40a1b044721fb206f45c4d727b6cf5aa5f6a96ae63c18e304c24
MD5 afb736134407bf8331b940e3859751f1
BLAKE2b-256 010467f20aad8240c0e1b84ee229f7c16cd33511def914eae3228f18b99a07a8

See more details on using hashes here.

File details

Details for the file maybeai_sheet_cli-0.3.1-py3-none-any.whl.

File metadata

File hashes

Hashes for maybeai_sheet_cli-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 62ae8ceef5afb026973133839bfc00b12168c5d394b27a1cf1d3773f145501a4
MD5 f5535964238351e4ae7008cb8e9aa7b7
BLAKE2b-256 5d7dc81ddad4f98d758bfb41e75d2a559be0674e89d5f75803d77438322d01d4

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page