{"id":22396047,"url":"https://github.com/priyavkaneria/codestats","last_synced_at":"2026-04-14T18:34:21.051Z","repository":{"id":257027052,"uuid":"850275998","full_name":"PriyavKaneria/CodeStats","owner":"PriyavKaneria","description":"A quick project to calculate and analyze code and contribution stats for all my github, gitlab, local projects along with those I have contributed to","archived":false,"fork":false,"pushed_at":"2024-09-13T22:04:57.000Z","size":3318,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-05T06:38:51.286Z","etag":null,"topics":["analysis","code","github","projects","stats"],"latest_commit_sha":null,"homepage":"","language":"Python","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/PriyavKaneria.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-08-31T10:35:03.000Z","updated_at":"2024-09-13T22:05:01.000Z","dependencies_parsed_at":null,"dependency_job_id":"e6ec71ef-9d1c-4487-8719-6045d7f9fc5f","html_url":"https://github.com/PriyavKaneria/CodeStats","commit_stats":null,"previous_names":["priyavkaneria/codestats"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/PriyavKaneria/CodeStats","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PriyavKaneria%2FCodeStats","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PriyavKaneria%2FCodeStats/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PriyavKaneria%2FCodeStats/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PriyavKaneria%2FCodeStats/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PriyavKaneria","download_url":"https://codeload.github.com/PriyavKaneria/CodeStats/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PriyavKaneria%2FCodeStats/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31810738,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-14T18:05:02.291Z","status":"ssl_error","status_checked_at":"2026-04-14T18:05:01.765Z","response_time":153,"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":["analysis","code","github","projects","stats"],"created_at":"2024-12-05T06:06:49.693Z","updated_at":"2026-04-14T18:34:21.045Z","avatar_url":"https://github.com/PriyavKaneria.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CodeStats\nA quick project to calculate and analyze stats for all my github, gitlab, local projects\n\nClones the repositories, counts the lines of code, and calculates the stats.\n\n## Output stats\n\nCLI Visualization\n![visualization_screenshot](https://github.com/user-attachments/assets/ee704556-8767-4dbe-baa6-d8b55aeaeb14)\n\nDemo\n\n\nhttps://github.com/user-attachments/assets/c1030eb8-8e18-403d-aeef-7bfe9ce0211e\n\n\n\n`loc_analysis.json`\n```json5\n    \"repo_name\": {\n        \"total_files\": \"number\",\n        \"total_lines\": \"number\",\n        \"total_blanks\": \"number\",\n        \"total_comments\": \"number\",\n        \"total_lines_of_code\": \"number\",\n        \"boilerplate_lines\": \"number\", // import statements, require statements, etc for now\n        \"actual_code_lines\": \"number\",\n        \"language_distribution\": {\n            \"language_extension\": \"number_of_lines\", // supports any language can be configured as below\n        },\n        \"description\": \"string\",\n        \"stars\": \"number\", // if repo accessible\n        \"topics\": [\"string\"], // if repo accessible\n        \"contributions\": {\n            \"total_commits\": \"number\",\n            \"total_lines_changed\": {\n                \"additions\": \"number\",\n                \"deletions\": \"number\",\n            },\n            \"first_commit_date\": \"datetime_string\",\n            \"last_commit_date\": \"datetime_string\",\n            \"median_commit_size\": \"float\",\n        }\n    },\n```\n\n## Usage\n\n### Requirements\n\nRecommended Python version: 3.10+\n```bash\npip install -r requirements.txt\n```\n\n### Configuration\n\nCreate a `repos.json` file in the root directory with the following structure:\n\n```json5\n[\n    {\n        \"source\": \"github\", // only github supported for now [local, gitlab to be added]\n        \"path\": \"REPO_OWNER/REPO_NAME\",\n        \"ignore\": [\"files\", \"to\", \"ignore\"],\n        \"contributor\": true // optional, default: false\n    },\n]\n```\n\nSet environment variables for the following:\n\n```env\nCONTRIBUTION_AUTHOR_NAMES={COMMA_SEPARATED_AUTHOR_NAMES}\nGITHUB_ACCESS_TOKEN={YOUR_GITHUB_ACCESS_TOKEN}\n```\n\n### Run\n\nIf you have cmake installed, you can use make commands to run the project\n\n#### Getting unique languages across all repos\n```bash\nmake languages\n```\nOR\n```bash\npython main.py languages\n```\n\n\u003e The languages can be configured in the `main.py` file using the `analyze_file_types` variable\n\n#### Calculating analysis for all repos\n```bash\nmake analyze\n```\nOR\n```bash\npython main.py analyze\n```\n\n#### Visualizing the stats\n```bash\nmake visualize\n```\nOR\n```bash\npython main.py visualize\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpriyavkaneria%2Fcodestats","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpriyavkaneria%2Fcodestats","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpriyavkaneria%2Fcodestats/lists"}