{"id":28153090,"url":"https://github.com/kirklin/gh-repo-export","last_synced_at":"2026-02-20T19:33:53.740Z","repository":{"id":285949204,"uuid":"959800011","full_name":"kirklin/gh-repo-export","owner":"kirklin","description":"A tool to export GitHub user's repository information as an HTML file, categorized by programming language.","archived":false,"fork":false,"pushed_at":"2025-04-03T18:14:42.000Z","size":131,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-09T07:02:13.985Z","etag":null,"topics":["github","repository"],"latest_commit_sha":null,"homepage":"https://kirklin.github.io/gh-repo-export/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kirklin.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":".github/CODE_OF_CONDUCT.md","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},"funding":{"github":"kirklin","patreon":"kirklin","custom":["https://www.buymeacoffee.com/linkirk"]}},"created_at":"2025-04-03T11:24:22.000Z","updated_at":"2025-07-09T16:36:18.000Z","dependencies_parsed_at":"2025-04-03T14:36:57.826Z","dependency_job_id":"c0ce3c30-f29b-44d9-ace5-ffc9881f6081","html_url":"https://github.com/kirklin/gh-repo-export","commit_stats":null,"previous_names":["kirklin/gh-repo-export"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/kirklin/gh-repo-export","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kirklin%2Fgh-repo-export","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kirklin%2Fgh-repo-export/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kirklin%2Fgh-repo-export/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kirklin%2Fgh-repo-export/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kirklin","download_url":"https://codeload.github.com/kirklin/gh-repo-export/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kirklin%2Fgh-repo-export/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29661615,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-20T16:33:43.953Z","status":"ssl_error","status_checked_at":"2026-02-20T16:33:43.598Z","response_time":59,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["github","repository"],"created_at":"2025-05-15T05:12:47.264Z","updated_at":"2026-02-20T19:33:53.724Z","avatar_url":"https://github.com/kirklin.png","language":"TypeScript","funding_links":["https://github.com/sponsors/kirklin","https://patreon.com/kirklin","https://www.buymeacoffee.com/linkirk"],"categories":[],"sub_categories":[],"readme":"# gh-repo-export\n\n[![npm version][npm-version-src]][npm-version-href]\n[![npm downloads][npm-downloads-src]][npm-downloads-href]\n[![bundle][bundle-src]][bundle-href]\n[![JSDocs][jsdocs-src]][jsdocs-href]\n[![License][license-src]][license-href]\n[![javascript_code style][code-style-image]][code-style-url]\n\nA tool to export GitHub user's repository information as HTML and JSON files, categorized by programming language.\n\n[简体中文](./README.zh-CN.md)\n\n## Features\n\n- Fetch all public repositories of a GitHub user\n- Categorize by programming language\n- Automatically export both JSON and HTML formats\n- Generate beautiful HTML pages displaying repository information\n- Command-line support\n- Can be imported as a library into other projects\n\n## Installation\n\n```bash\n# Global installation (recommended for command-line usage)\nnpm install -g gh-repo-export\n\n# Or as a project dependency\nnpm install gh-repo-export\n```\n\n## Command-line Usage\n\n```bash\n# Export specified user's repository information (outputs username-repos.json and username-repos.html)\ngh-repo-export username\n\n# Specify custom output file base name (will generate custom.json and custom.html)\ngh-repo-export username custom\n```\n\n## Programmatic Usage\n\n### Export Both JSON and HTML\n\n```typescript\nimport { exportGithubRepoDataToJson, exportGithubRepos } from \"gh-repo-export\";\n\n// Export user's repository data to both formats\nasync function exportUserData(username) {\n  // First export JSON\n  const jsonPath = `${username}-repos.json`;\n  await exportGithubRepoDataToJson(username, jsonPath);\n\n  // Then export HTML using the JSON data\n  const htmlPath = `${username}-repos.html`;\n  await exportGithubRepos(username, htmlPath, jsonPath);\n}\n```\n\n### Export Only HTML\n\n```typescript\nimport { exportGithubRepos } from \"gh-repo-export\";\n\n// Export user's repository information as HTML\nawait exportGithubRepos(\"username\", \"output.html\");\n```\n\n### Export Only JSON\n\n```typescript\nimport { exportGithubRepoDataToJson } from \"gh-repo-export\";\n\n// Export user's repository information as JSON\nawait exportGithubRepoDataToJson(\"username\", \"output.json\");\n```\n\n### Get Structured Data\n\n```typescript\nimport { getGithubRepoData } from \"gh-repo-export\";\n\n// Get structured repository data\nconst data = await getGithubRepoData(\"username\");\nconsole.log(data.profile); // User information\nconsole.log(data.repos); // All repositories\nconsole.log(data.languageGroups); // Repositories grouped by language\n```\n\n### Using Lower-level API\n\n```typescript\nimport {\n  checkUser,\n  generateHtml,\n  getAllRepos,\n  groupByLanguages\n} from \"gh-repo-export\";\n\nasync function exportUser(username) {\n  // Get user information\n  const profile = await checkUser(username);\n\n  // Get all repositories\n  const repos = await getAllRepos(username, profile.public_repos);\n\n  // Group by language\n  const groups = groupByLanguages(repos);\n\n  // Get structured data\n  const data = { profile, repos, languageGroups: groups };\n\n  // Generate HTML\n  const html = generateHtml(data);\n\n  // Now you can use the generated HTML\n  console.log(html);\n}\n```\n\n## License\n\n[MIT](./LICENSE) License \u0026copy; [Kirk Lin](https://github.com/kirklin)\n\n\u003c!-- Badges --\u003e\n\n[npm-version-src]: https://img.shields.io/npm/v/gh-repo-export?style=flat\u0026colorA=080f12\u0026colorB=3491fa\n[npm-version-href]: https://npmjs.com/package/gh-repo-export\n[npm-downloads-src]: https://img.shields.io/npm/dm/gh-repo-export?style=flat\u0026colorA=080f12\u0026colorB=3491fa\n[npm-downloads-href]: https://npmjs.com/package/gh-repo-export\n[bundle-src]: https://img.shields.io/bundlephobia/minzip/gh-repo-export?style=flat\u0026colorA=080f12\u0026colorB=3491fa\u0026label=minzip\n[bundle-href]: https://bundlephobia.com/result?p=gh-repo-export\n[license-src]: https://img.shields.io/github/license/kirklin/gh-repo-export.svg?style=flat\u0026colorA=080f12\u0026colorB=3491fa\n[license-href]: https://github.com/kirklin/gh-repo-export/blob/main/LICENSE\n[jsdocs-src]: https://img.shields.io/badge/jsdocs-reference-080f12?style=flat\u0026colorA=080f12\u0026colorB=3491fa\n[jsdocs-href]: https://www.jsdocs.io/package/gh-repo-export\n[code-style-image]: https://img.shields.io/badge/code__style-%40kirklin%2Feslint--config-3491fa?style=flat\u0026colorA=080f12\u0026colorB=3491fa\n[code-style-url]: https://github.com/kirklin/eslint-config/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkirklin%2Fgh-repo-export","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkirklin%2Fgh-repo-export","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkirklin%2Fgh-repo-export/lists"}