{"id":20068814,"url":"https://github.com/dotangad/nakal","last_synced_at":"2025-09-18T22:33:18.766Z","repository":{"id":49860892,"uuid":"324858996","full_name":"dotangad/nakal","owner":"dotangad","description":"A MySQL backup tool for Google Sheets, written in Node.js.","archived":false,"fork":false,"pushed_at":"2021-06-09T18:38:59.000Z","size":30,"stargazers_count":15,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-09T03:11:35.477Z","etag":null,"topics":["backup","databases","google-sheets","javascript","mysql","nodejs"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dotangad.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-12-27T22:18:19.000Z","updated_at":"2025-01-07T05:30:30.000Z","dependencies_parsed_at":"2022-09-18T22:23:36.245Z","dependency_job_id":null,"html_url":"https://github.com/dotangad/nakal","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/dotangad/nakal","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dotangad%2Fnakal","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dotangad%2Fnakal/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dotangad%2Fnakal/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dotangad%2Fnakal/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dotangad","download_url":"https://codeload.github.com/dotangad/nakal/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dotangad%2Fnakal/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":275844435,"owners_count":25538991,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-18T02:00:09.552Z","response_time":77,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["backup","databases","google-sheets","javascript","mysql","nodejs"],"created_at":"2024-11-13T14:09:24.211Z","updated_at":"2025-09-18T22:33:18.488Z","avatar_url":"https://github.com/dotangad.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# nakal - Backup MySQL databases to Google Sheets\n\nA MySQL backup tool for Google Sheets, written in Node.js.\n\n## Why\n\nAt [Exun Clan](https://exunclan.com), my school's CS club, we usually build an app and take it down after a month or two. However, we need the data somewhere easily accessible by people who don't know SQL for much longer than that. We already use Google Sheets for a lot of internal tracking so this felt like the natural thing to do.\n\n## How\n\nI'd never written a CLI with Node.js before but I'd heard good things about [yargs](https://github.com/yargs/yargs/) so I decided to use it. It was easy enough to setup and didn't get in the way, 10/10. I used the [`google-spreadsheet`](https://www.npmjs.com/package/google-spreadsheet) package to edit spreadsheets.\n\nI started by writing a function to fetch tables and their contents from the database and another function to put those into a Google Sheet. The user needs to make the Google Sheet, share it with the client email and give me the sheetId and the functions populate that sheet with data.\n\n## Installation\n\nFor now, you'll have to clone the repository and install the command manually. I'll get around to putting this on NPM someday.\n\n```sh\ngit clone https://github.com/dotangad/nakal\ncd nakal\nnpm install\nnpm link\n```\n\nYou should now be able to run the `nakal` command from anywhere.\n\n## Getting credentials from Google\n\n1. Head to [console.developers.google.com](https://console.developers.google.com/).\n2. Create a new project from the select project modal in the top left corner of the screen.\n3. Search for the Google Sheets API and enable it.\n4. Go to the Credentials tab (from the navbar: APIs \u0026 Services \u003e Credentials).\n5. Create a service account (Create credentials \u003e Service Account) and download the `credentials.json` file.\n\n## Usage\n\n```\nUsage: nakal \u003coptions\u003e \u003csheet_id\u003e\n\nOptions:\n      --help         Show help                                         [boolean]\n      --version      Show version number                               [boolean]\n  -h, --host         MySQL host                  [string] [default: \"127.0.0.1\"]\n  -u, --user         MySQL Username                          [string] [required]\n  -p, --pass         MySQL Password                                     [string]\n      --db           MySQL Database                          [string] [required]\n  -c, --credentials  Path to credentials.json file for access to Google's APIs.\n                                                             [string] [required]\n\nA MySQL backup tool for Google Sheets.\n```\n\nRemember to share your Sheet with the client email in your `credentials.json` file before running the CLI.\n\n## License\nMIT License\n\nCopyright (c) 2021 Angad Singh\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdotangad%2Fnakal","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdotangad%2Fnakal","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdotangad%2Fnakal/lists"}