{"id":28902445,"url":"https://github.com/manishkumar1601/gitdb","last_synced_at":"2026-04-12T14:54:34.747Z","repository":{"id":300195941,"uuid":"992433804","full_name":"manishkumar1601/gitdb","owner":"manishkumar1601","description":"A simple Node.js library to read/write JSON files on GitHub and serve as a lightweight GitDB.","archived":false,"fork":false,"pushed_at":"2025-05-29T06:37:51.000Z","size":6,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-06-20T11:06:20.580Z","etag":null,"topics":["backend","data-storage","database","esm","git","gitdb","github","github-api","json","json-storage","nodejs","npm-package","octokit","open-source","typescript"],"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/manishkumar1601.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-05-29T06:34:42.000Z","updated_at":"2025-05-30T05:39:00.000Z","dependencies_parsed_at":"2025-06-20T11:06:24.602Z","dependency_job_id":null,"html_url":"https://github.com/manishkumar1601/gitdb","commit_stats":null,"previous_names":["manishkumar1601/gitdb"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/manishkumar1601/gitdb","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manishkumar1601%2Fgitdb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manishkumar1601%2Fgitdb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manishkumar1601%2Fgitdb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manishkumar1601%2Fgitdb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/manishkumar1601","download_url":"https://codeload.github.com/manishkumar1601/gitdb/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manishkumar1601%2Fgitdb/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261110622,"owners_count":23111066,"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","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":["backend","data-storage","database","esm","git","gitdb","github","github-api","json","json-storage","nodejs","npm-package","octokit","open-source","typescript"],"created_at":"2025-06-21T11:08:57.961Z","updated_at":"2026-04-12T14:54:34.742Z","avatar_url":"https://github.com/manishkumar1601.png","language":"JavaScript","readme":"# GitDB\n\nA simple Node.js library to read/write JSON files on GitHub and serve as a lightweight GitDB.\n\n## Features\n- Read JSON file from a GitHub repository\n- Write (create/update) JSON file to a GitHub repository\n\n## Installation\n\n```bash\nnpm install gitdb\n```\n\nor\n\n```bash\nnpm install git+https://github.com/manishkumar1601/gitdb.git\n```\n\n## Usage\n\n### CommonJS (Node.js)\n```js\nconst { createDriver, fetchFile, saveFile } = require('gitdb');\n\nconst driver = createDriver({\n  username: 'your-github-username',\n  repository: 'your-repo-name',\n  token: 'your-github-personal-access-token',\n  path: 'data.json', // path in repo\n});\n\nfetchFile(driver).then(console.log);\nsaveFile(driver, { foo: 'bar' }).then(console.log);\n```\n\n### ESModule (Node.js ESM or modern bundlers)\n```js\nimport { createDriver, fetchFile, saveFile } from 'gitdb';\n\nconst driver = createDriver({\n  username: 'your-github-username',\n  repository: 'your-repo-name',\n  token: 'your-github-personal-access-token',\n  path: 'data.json',\n});\n\nfetchFile(driver).then(console.log);\nsaveFile(driver, { foo: 'bar' }).then(console.log);\n```\n\n### TypeScript\n```ts\nimport { createDriver, fetchFile, saveFile } from 'gitdb';\n\nconst driver = createDriver({\n  username: 'your-github-username',\n  repository: 'your-repo-name',\n  token: 'your-github-personal-access-token',\n  path: 'data.json',\n});\n\nfetchFile(driver).then(console.log);\nsaveFile(driver, { foo: 'bar' }).then(console.log);\n```\n\n## API\n\n### createDriver(options)\n- `username` (string): GitHub username\n- `repository` (string): Repository name\n- `token` (string): GitHub personal access token\n- `path` (string): File path in the repository (default: `file.json`)\n- `message` (string): Commit message (optional)\n\n### fetchFile(driver)\nFetch the JSON file from the repository.\n\n### saveFile(driver, data, extraOptions)\nSave (create/update) the JSON file in the repository.\n\n## License\nMIT\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmanishkumar1601%2Fgitdb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmanishkumar1601%2Fgitdb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmanishkumar1601%2Fgitdb/lists"}