# google-spreadsheet-cli **Repository Path**: mirrors_FGRibreau/google-spreadsheet-cli ## Basic Information - **Project Name**: google-spreadsheet-cli - **Description**: 📊 CLI for reading and writing data into Google Spreadsheet - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2020-09-24 - **Last Updated**: 2026-07-04 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README ### 📊 Google Spreadsheet CLI [](https://circleci.com/gh/FGRibreau/google-spreadsheet-cli/) [](https://coveralls.io/github/FGRibreau/google-spreadsheet-cli?branch=master)   [](https://hub.docker.com/r/fgribreau/google-spreadsheet-cli/) [](http://bit.ly/2c7uFJq)  [](https://twitter.com/FGRibreau) ## ❤️ Shameless plug - [Open-Source self-hostable or fully-managed **webhook as a service**](https://www.hook0.com/) - [**Charts, simple as a URL**. No more server-side rendering pain, 1 url = 1 chart](https://image-charts.com) - [Looking for a managed Keycloak IAM ?](https://www.cloud-iam.com/) ## 📢 Features - List worksheets - Add worksheet - Remove worksheet - Append a row to a worksheet - Automatically adds the header row if it's missing - Permissive JSON format through [JSON5](http://json5.org/) - Available as a [docker image](https://hub.docker.com/r/fgribreau/google-spreadsheet-cli/) ## 🎩 Authentication First thing first, you need your Google credentials, [follow the authentication instructions there](https://github.com/theoephraim/node-google-spreadsheet#service-account-recommended-method). Then save the JSON file somewhere, e.g. `~/myproject-8cbb20000000.json`. Locate the spreadsheet you want to work with, take the id from Google spreadsheet URL, e.g. `2CVmfghQmkMdLct11Tfo0aqv1WtnPA-chuYDUMEvoVPw`. If you wish to directly pass the base64 stringified JSON as `--credentials` parameter you might first want to only keep `client_email` and `private_key` using [jq.node](https://github.com/FGRibreau/jq.node) like so: ```bash export CREDENTIALS=$(cat ~/myproject-8cbb20000000.json | jq -r btoa 'pick(["client_email", "private_key"]) | JSON.stringify | btoa') ``` ## 😇 Documentation ### `worksheets list` List spreadsheet document worksheets: ```bash google-spreadsheet-cli \ --id 2CVmfghQmkMdLct11Tfo0aqv1WtnPA-chuYDUMEvoVPw \ --credentials ~/myproject-8cbb20000000.json \ worksheets list {"id":"od6","title":"my first worksheet"} {"id":"od7","title":"my second worksheet"} {"id":"ad7","title":"oh oh oh the last one"} ``` ... or you could also pass the credential as a JSON base64 encoded string: ```bash google-spreadsheet-cli \ --id 2CVmfghQmkMdLct11Tfo0aqv1WtnPA-chuYDUMEvoVPw \ --credentials $CREDENTIALS \ worksheets list {"id":"od6","title":"my first worksheet"} {"id":"od7","title":"my second worksheet"} {"id":"ad7","title":"oh oh oh the last one"} ``` ### `worksheets add