{"id":19509576,"url":"https://github.com/raspi/github-stats","last_synced_at":"2026-05-14T11:42:13.206Z","repository":{"id":158037102,"uuid":"628984388","full_name":"raspi/github-stats","owner":"raspi","description":"Generate GitHub traffic statistics charts","archived":false,"fork":false,"pushed_at":"2023-06-19T11:49:51.000Z","size":86,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-01-08T11:42:11.486Z","etag":null,"topics":["chart","clones","command-line","github","github-api","http-client","rest-api","rust","statistics","svg","traffic","views"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/raspi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2023-04-17T11:40:50.000Z","updated_at":"2024-05-19T16:47:00.000Z","dependencies_parsed_at":"2025-01-09T00:47:06.537Z","dependency_job_id":null,"html_url":"https://github.com/raspi/github-stats","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raspi%2Fgithub-stats","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raspi%2Fgithub-stats/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raspi%2Fgithub-stats/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raspi%2Fgithub-stats/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/raspi","download_url":"https://codeload.github.com/raspi/github-stats/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240761105,"owners_count":19853255,"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":["chart","clones","command-line","github","github-api","http-client","rest-api","rust","statistics","svg","traffic","views"],"created_at":"2024-11-10T23:12:33.403Z","updated_at":"2026-05-14T11:42:08.182Z","avatar_url":"https://github.com/raspi.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# github-stats\n\n![GitHub All Releases](https://img.shields.io/github/downloads/raspi/github-stats/total?style=for-the-badge)\n![GitHub release (latest by date)](https://img.shields.io/github/v/release/raspi/github-stats?style=for-the-badge)\n![GitHub tag (latest by date)](https://img.shields.io/github/v/tag/raspi/github-stats?style=for-the-badge)\n\nGenerate GitHub traffic statistics SVG charts.\n\nTraffic statistics for views and clones are downloaded from GitHub API to a local SQLite database.\n\nGitHub keeps these statistics only for 14 days. With this program you can keep infinite days in local database and update the statistics once per day.\n\nExample for this project:\n\n\u003cimg src=\"_asset/github-stats_views.svg\" width=\"500\" align=\"left\" alt=\"SVG: views\" /\u003e\n\u003cimg src=\"_asset/github-stats_clones.svg\" width=\"500\" alt=\"SVG: clones\" /\u003e\n\n## Usage\n\n```\n% github-stats --help\nGenerate project traffic statistics charts from GitHub API\n\nUsage: github-stats [OPTIONS] \u003cCOMMAND\u003e\n\nCommands:\n  fetch       Fetch traffic statistics from Github to a local database\n  list-repos  List repositories found in local database\n  stats       Generate statistics for repo from local database\n  generate    Generate all statistics from local database\n  help        Print this message or the help of the given subcommand(s)\n\nOptions:\n  -v, --verbose          Be verbose?\n  -c, --config \u003cCONFIG\u003e  Config file [default: config.toml]\n  -h, --help             Print help\n  -V, --version          Print version\n```\n\n## Setting up\n\nFirst copy `config.example.toml` to `config.toml` and edit the config with your favorite editor.\n[Generate](https://github.com/settings/tokens) new API key or use existing one.\n\n## Example:\n\nFetch latest statistics from GitHub to local database:\n\n```shell\ngithub-stats fetch\n```\n\nNote: data from GitHub API is cached for one hour in `cache` directory.\n\nGenerate SVG chart for a repository named *heksa*:\n\n```shell\ngithub-stats stats heksa\n```\n\nThe generated chart is saved to `stats` directory. Stats for last 30 days is displayed.\n\nNow you can for example copy the result to your web page and for example display the chart in your project's `README.md`.\n\nGenerate all statistics charts at once:\n\n```shell\ngithub-stats generate\n```\n\nSee [example](example) directory for how to automate updates with systemd.\n\n## Internals\n\n* [reqwest](https://crates.io/crates/reqwest) as HTTP client\n* [rusqlite](https://crates.io/crates/rusqlite) as SQLite library\n* [plotters](https://crates.io/crates/plotters) as SVG renderer\n\n## Is it any good?\n\nYes.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fraspi%2Fgithub-stats","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fraspi%2Fgithub-stats","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fraspi%2Fgithub-stats/lists"}