{"id":16371563,"url":"https://github.com/tom-draper/repo-stats","last_synced_at":"2026-04-28T17:34:49.701Z","repository":{"id":107162829,"uuid":"566297688","full_name":"tom-draper/repo-stats","owner":"tom-draper","description":"Generates a statistical overview for a local or remote repository.","archived":false,"fork":false,"pushed_at":"2023-12-04T10:01:52.000Z","size":89,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-05-24T17:40:54.800Z","etag":null,"topics":["cli","command-line","command-line-tool","file-stats","github","programming-language","project","project-analysis","repo-stats","repository","rust","rust-lang","statistics","stats"],"latest_commit_sha":null,"homepage":"","language":"Rust","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/tom-draper.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}},"created_at":"2022-11-15T11:32:19.000Z","updated_at":"2024-04-10T12:04:57.000Z","dependencies_parsed_at":"2023-12-04T10:44:18.915Z","dependency_job_id":null,"html_url":"https://github.com/tom-draper/repo-stats","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/tom-draper/repo-stats","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tom-draper%2Frepo-stats","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tom-draper%2Frepo-stats/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tom-draper%2Frepo-stats/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tom-draper%2Frepo-stats/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tom-draper","download_url":"https://codeload.github.com/tom-draper/repo-stats/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tom-draper%2Frepo-stats/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32392300,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-28T14:34:11.604Z","status":"ssl_error","status_checked_at":"2026-04-28T14:32:37.009Z","response_time":56,"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":["cli","command-line","command-line-tool","file-stats","github","programming-language","project","project-analysis","repo-stats","repository","rust","rust-lang","statistics","stats"],"created_at":"2024-10-11T03:08:53.015Z","updated_at":"2026-04-28T17:34:49.684Z","avatar_url":"https://github.com/tom-draper.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Repo Stats\n\nA command-line tool for generating statistical overview for a local or remote repository including metrics like line count, average line length and proportion of whitespace, broken down by file extension.\n\n## Installation\n\n```bash\ngit clone https://github.com/tom-draper/repo-stats.git\ncd repo-stats\ncargo build --release\n```\n\nThis builds the executable in `/target/release`.\n\nSetting the path to `repo-stats.exe` as an environment variable will allow it to be run in the terminal from within any directory.\n\n## Usage\n\nWhen run without arguments the program will target the current directory, scanning all subfolders recursively and logging all files.\n\n```bash\nrepo-stats\n```\n\n#### Path\n\nA path to the target repo directory can be specified with the `-p` or `--path` flag followed by the path. If this argument is excluded, the current working directory is used as default.\n\n```bash\nrepo-stats -p \u003cpath\u003e\n```\n\n#### Ignore directory\n\nA specific directory can be ignored with the `-i` or `--ignore` flag followed by the name of the directory to ignore. Any directory path containing this directory name will be ignored. The directory names provided must be relative to the selected path (either specified by the path argument or the current working directory).  \n\n```bash\nrepo-stats -i bin\n```\n\nTo ignore multiple directories, separate the directory names by commas.\n\n```bash\nrepo-stats -i bin,target,.vscode\n```\n\n#### Target directory\n\nA specific directory can be targeted using the '-t' or '--target' flag followed by the name of the directory to target. Only paths containing this target directory will be used. The directory names provided must be relative to the selected path (either specified by the path argument or the current working directory).  \n\n```bash\nrepo-stats -t src\n```\n\nTo target multiple directories, separate the directory names by commas.\n\n```bash\nrepo-stats -t src,example,test\n```\n\n#### Remote repository\n\nProject statistics can also be displayed for a remote repository. Simply specify the name of the remote GitHub repo with the `-r` or `--remote` flag. The repo name must be specified in the form \u003cuser\u003e/\u003crepo\u003e and the repo must be public.\n\n```bath\nrepo-stats -r tom-draper/repo-stats\n```\n\n## Example\n\n```text\n\u003e repo-stats\n\n---- Total -------------------------\n Files:                       2,386\n Lines:                      34,116\n Characters:              1,880,326\n Average line length:          55.1\n Whitespace:                 10.56%\n Memory:                   572.5 MB\n Carridge returns:             2474\n------------------------------------\n\n---- Source code -------------------\n Languages:\n .h: 68.72%\n     Files:                      98\n     Lines:                  28,004\n     Characters:            942,236\n     Average line length:      33.6\n     Whitespace:             16.53%\n     Memory:               942.2 KB\n     Carridge returns:           98\n .d: 22.65%\n     Files:                     118\n     Lines:                   1,553\n     Characters:            310,586\n     Average line length:     200.0\n     Whitespace:              0.69%\n     Memory:               310.6 KB\n     Carridge returns:          118\n .json: 4.69%\n     Files:                     131\n     Lines:                     135\n     Characters:             64,309\n     Average line length:     476.4\n     Whitespace:              0.28%\n     Memory:                64.3 KB\n     Carridge returns:          135\n .rs: 2.94%\n     Files:                       4\n     Lines:                   1,156\n     Characters:             40,257\n     Average line length:      34.8\n     Whitespace:             41.01%\n     Memory:                40.3 KB\n     Carridge returns:         1156\n .lock: 0.88%\n     Files:                      42\n     Lines:                     511\n     Characters:             12,035\n     Average line length:      23.6\n     Whitespace:              4.87%\n     Memory:                12.0 KB\n     Carridge returns:           42\n .md: 0.11%\n     Files:                       1\n     Lines:                      53\n     Characters:              1,448\n     Average line length:      27.3\n     Whitespace:             12.15%\n     Memory:                 1.4 KB\n     Carridge returns:           53\n .toml: 0.02%\n     Files:                       1\n     Lines:                      15\n     Characters:                324\n     Average line length:      21.6\n     Whitespace:             10.19%\n     Memory:                  324 B\n     Carridge returns:            1\n------------------------------------\n\n---- Binaries ----------------------\n Files: 28\n Memory: 1.0 KB\n------------------------------------\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftom-draper%2Frepo-stats","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftom-draper%2Frepo-stats","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftom-draper%2Frepo-stats/lists"}