Skip to content

CLI Overview

HolySheets! includes a command-line interface focused on public read operations from Google Sheets. No authentication is required — your spreadsheet only needs to be publicly accessible.


Installation

The CLI ships with the holysheets package. Install it globally or use npx:

bash
npx holysheets read find-many --sheet <sheet-name> --spreadsheet-id <ID>
bash
npm install -g holysheets
holysheets read find-many --sheet <sheet-name> --spreadsheet-id <ID>

Command Structure

The CLI supports two equivalent command forms:

bash
# Implicit source (google-sheets is the default)
holysheets read <operation> [flags]

# Explicit source
holysheets google-sheets read <operation> [flags]

Both forms are functionally identical. The explicit form exists for future extensibility.

By default, commands validate that --sheet exists before querying.
Use --skip-sheet-validation only as an escape hatch when you intentionally prefer fewer requests over stricter safety.


Available Operations

OperationDescription
find-manyReturns all records matching the filters.
find-firstReturns the first matching record.
find-uniqueReturns a single matching record (errors if multiple).
find-lastReturns the last matching record.
find-many-or-throwLike find-many, but errors if no records found.
find-first-or-throwLike find-first, but errors if no records found.
find-unique-or-throwLike find-unique, but errors if none or multiple.
find-last-or-throwLike find-last, but errors if no records found.
describeReturns sheet metadata (columns and schema).

Quick Example

bash
holysheets read find-many \
  --spreadsheet-id 1AbCDefGhIJkLMNOPQRS_TUVWXYZ \
  --sheet <sheet-name> \
  --where-field rating --where-op gte --where-value 4 \
  --select name \
  --select rating \
  --format json \
  --pretty

Output:

json
[
  { "name": "Cafe Central", "rating": "4.5" },
  { "name": "Bar do Zé", "rating": "4.2" }
]

Help

bash
holysheets --help
holysheets read --help

Prerequisites

Your Google Sheet must be accessible publicly. Either:

  • Publish the spreadsheet via File → Share → Publish to the web, or
  • Share it as "Anyone with the link can view".

No service account, OAuth setup, or API key is required.

Released under the MIT License.