gsheets-cli
v0.1.0
Published
Command-line interface for Google Sheets
Maintainers
Readme
gsheets-cli
Google Sheets CLI - Read, write, and manage spreadsheets from the command line.
Installation
npm install -g gsheets-cliSetup
- Create OAuth credentials in Google Cloud Console
- Download the credentials JSON file
- Configure the CLI:
gsheets accounts credentials ~/path/to/credentials.json
gsheets accounts add [email protected]Usage
# Get spreadsheet info
gsheets [email protected] get <spreadsheetId>
# Read values
gsheets [email protected] read <spreadsheetId> "A1:D10"
# Write values
gsheets [email protected] write <spreadsheetId> "A1" --values '[["Hello","World"]]'
# Append rows
gsheets [email protected] append <spreadsheetId> "A1" --values '[["New","Row"]]'
# Clear values
gsheets [email protected] clear <spreadsheetId> "A1:D10"
# Create spreadsheet
gsheets [email protected] create --title "My Spreadsheet" --sheets "Data,Summary"
# Manage sheets
gsheets [email protected] add-sheet <spreadsheetId> --title "NewSheet"
gsheets [email protected] delete-sheet <spreadsheetId> <sheetId>
gsheets [email protected] rename-sheet <spreadsheetId> <sheetId> --title "NewName"
# Get URL
gsheets [email protected] url <spreadsheetId>Data Storage
~/.gsheets-cli/credentials.json- OAuth client credentials~/.gsheets-cli/accounts.json- Account tokens
License
MIT
