{"id":18997419,"url":"https://github.com/thanhhaudev/github-stats","last_synced_at":"2026-05-23T09:01:58.978Z","repository":{"id":253743094,"uuid":"839694790","full_name":"thanhhaudev/github-stats","owner":"thanhhaudev","description":"Show your coding stats on GitHub","archived":false,"fork":false,"pushed_at":"2026-05-17T15:55:22.000Z","size":227,"stargazers_count":20,"open_issues_count":0,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2026-05-17T17:52:11.747Z","etag":null,"topics":["github-api","metrics","profile-generator","profile-readme","readme-generator","time-tracker","wakatime","wakatime-stats"],"latest_commit_sha":null,"homepage":"","language":"Go","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/thanhhaudev.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-08-08T06:27:32.000Z","updated_at":"2026-05-17T15:55:26.000Z","dependencies_parsed_at":"2024-08-26T11:00:57.724Z","dependency_job_id":"0c3060f7-0ddd-4695-ac4b-2dbb1dbe2fbc","html_url":"https://github.com/thanhhaudev/github-stats","commit_stats":null,"previous_names":["thanhhaudev/github-stats"],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/thanhhaudev/github-stats","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thanhhaudev%2Fgithub-stats","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thanhhaudev%2Fgithub-stats/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thanhhaudev%2Fgithub-stats/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thanhhaudev%2Fgithub-stats/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thanhhaudev","download_url":"https://codeload.github.com/thanhhaudev/github-stats/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thanhhaudev%2Fgithub-stats/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33389229,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-23T04:15:53.637Z","status":"ssl_error","status_checked_at":"2026-05-23T04:15:53.242Z","response_time":53,"last_error":"SSL_read: 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-api","metrics","profile-generator","profile-readme","readme-generator","time-tracker","wakatime","wakatime-stats"],"created_at":"2024-11-08T17:40:29.120Z","updated_at":"2026-05-23T09:01:58.972Z","avatar_url":"https://github.com/thanhhaudev.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Quick start\n\n1. Use a profile repo: a repo named exactly `\u003cyour-username\u003e/\u003cyour-username\u003e`. Its README shows on your profile page.\n2. Add markers in that README where stats should land:\n   ```markdown\n   \u003c!--START_SECTION:readme-stats--\u003e\n   \u003c!--END_SECTION:readme-stats--\u003e\n   ```\n3. Add secrets at **Settings → Secrets and variables → Actions**:\n   - `GH_TOKEN` — Personal access token (classic), scope `repo`. ([create one](https://github.com/settings/tokens))\n   - `WAKATIME_API_KEY` — optional, only for WakaTime metrics. ([get key](https://wakatime.com/settings/api-key))\n4. Add `.github/workflows/update-stats.yml`:\n   ```yaml\n   name: Update README Stats\n   on:\n     schedule:\n       - cron: '0 0 * * *'    # daily at midnight UTC\n     workflow_dispatch:\n   jobs:\n     update:\n       runs-on: ubuntu-latest\n       permissions:\n         contents: write\n       steps:\n         - uses: actions/checkout@v4\n         - uses: thanhhaudev/github-stats@v1\n           env:\n             GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}\n             WAKATIME_API_KEY: ${{ secrets.WAKATIME_API_KEY }}\n             SHOW_METRICS: \"CODING_STREAK\"\n   ```\n   \u003e ⚠️ For long-term use, fork this repository and run your forked Action, or pin to a specific release/SHA instead of relying on `thanhhaudev/github-stats@v1`. This avoids unexpected behavior changes when the upstream `v1` tag moves.\n5. Trigger once: **Actions → Update README Stats → Run workflow**.\n\n## Sample output\n\n**📈 Coding Streak**\n```\n🔥 Current Streak:        14 days\n🏆 Longest Streak:        45 days\n📊 Daily Average:         3 hrs 44 mins\n💪 Total Coding Time:     1,383 hrs 16 mins\n🎯 Coding Consistency:    87.5%\n📅 Active Days:           128 days\n```\n\nEvery other metric: [docs/metrics.md](docs/metrics.md).\n\n## Metrics\n\nSet `SHOW_METRICS` to a comma-separated list. Output appears in the order you list.\n\n| Key                   | Shows                                                        |\n|-----------------------|--------------------------------------------------------------|\n| `CODING_STREAK`       | Streak + (with WakaTime) daily-average totals                |\n| `COMMIT_TIMES_OF_DAY` | Morning / Daytime / Evening / Night split                    |\n| `COMMIT_DAYS_OF_WEEK` | Commits per weekday                                          |\n| `LANGUAGE_PER_REPO`   | Primary language per repo                                    |\n| `LANGUAGES_AND_TOOLS` | Per-language badges                                          |\n| `WAKATIME_AI_STATS`   | AI vs human attribution (needs WakaTime + GenAI integration) |\n| `WAKATIME_SPENT_TIME` | Editors / Languages / Projects / OS time                     |\n\n## Required env vars\n\n| Variable           | Purpose                                                                                                                 |\n|--------------------|-------------------------------------------------------------------------------------------------------------------------|\n| `GITHUB_TOKEN`     | API access. Scope `repo`.                                                                                               |\n| `SHOW_METRICS`     | Which metrics to render.                                                                                                |\n| `WAKATIME_API_KEY` | Required for any `WAKATIME_*` metric and for time fields in `CODING_STREAK`.                                            |\n| `WAKATIME_DATA`    | Required if `WAKATIME_SPENT_TIME` is in `SHOW_METRICS`. Any of `EDITORS`, `LANGUAGES`, `PROJECTS`, `OPERATING_SYSTEMS`. |\n\nFull env var list (timezone, cache, commit author, progress-bar style, emoji stripping, etc.): [docs/configuration.md](docs/configuration.md).\n\n## More docs\n\n- [Configuration reference](docs/configuration.md) — every env var, progress-bar styles, ready-made configs.\n- [Caching](docs/caching.md) — skip API calls for unchanged repos.\n- [Running every few minutes](docs/scheduling.md) — cron limits, commit spam, rate budgets.\n\n## Notes\n\n- Reads commit metadata only (timestamps, line counts). Never reads file contents.\n- Counts private-repo commits when the token has `repo` scope.\n- Works on any repo, not just your profile repo. Override the marker name with `SECTION_NAME`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthanhhaudev%2Fgithub-stats","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthanhhaudev%2Fgithub-stats","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthanhhaudev%2Fgithub-stats/lists"}