{"id":37063481,"url":"https://github.com/sahansera/repostats","last_synced_at":"2026-01-14T07:14:32.061Z","repository":{"id":329654439,"uuid":"1120318661","full_name":"sahansera/repostats","owner":"sahansera","description":"A CLI tool to fetch GitHub repository statistics.","archived":false,"fork":false,"pushed_at":"2025-12-21T04:00:02.000Z","size":96,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-12-22T22:05:51.030Z","etag":null,"topics":["cli","github","python"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/repostats","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/sahansera.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":"ROADMAP.md","authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-12-21T00:16:46.000Z","updated_at":"2025-12-21T04:00:05.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/sahansera/repostats","commit_stats":null,"previous_names":["sahansera/repostats"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/sahansera/repostats","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sahansera%2Frepostats","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sahansera%2Frepostats/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sahansera%2Frepostats/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sahansera%2Frepostats/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sahansera","download_url":"https://codeload.github.com/sahansera/repostats/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sahansera%2Frepostats/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28412739,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T05:26:33.345Z","status":"ssl_error","status_checked_at":"2026-01-14T05:21:57.251Z","response_time":107,"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":["cli","github","python"],"created_at":"2026-01-14T07:14:31.277Z","updated_at":"2026-01-14T07:14:32.053Z","avatar_url":"https://github.com/sahansera.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ⚡️ repostats\n\n[![PyPI version](https://badge.fury.io/py/repostats.svg)](https://pypi.org/project/repostats/)\n[![Tests](https://github.com/sahansera/repostats/workflows/Python%20CI/badge.svg)](https://github.com/sahansera/repostats/actions)\n[![Python 3.9+](https://img.shields.io/badge/python-3.9+-blue.svg)](https://www.python.org/downloads/)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\nA CLI tool to fetch GitHub repository statistics.\n\n## Installation\n\n```bash\n# Basic installation\npip install repostats\n\n# With TUI support\npip install repostats[tui]\n```\n\n## Usage\n\n### Command Line Interface (CLI)\n\n```bash\n# Basic usage - single repository\nrepostats python/cpython\n\n# Multiple repositories\nrepostats python/cpython golang/go rust-lang/rust\n\n# With GitHub token for higher rate limits\nexport GITHUB_TOKEN=your_token_here\nrepostats python/cpython\n\n# Or pass token directly\nrepostats python/cpython --token your_token_here\n\n# Output as JSON\nrepostats python/cpython --format json\n\n# Output as YAML\nrepostats python/cpython --format yaml\n\n# Save output to a file\nrepostats python/cpython --format json --output stats.json\n\n# Multiple repos with JSON output to file\nrepostats python/cpython golang/go --format json -o repos.json\n```\n\n### Terminal User Interface (TUI)\n\nFor an interactive experience, use the TUI:\n\n```bash\n# Launch TUI (requires installation with [tui] extra)\nrepostats-tui\n\n# Launch TUI with a pre-filled repository\nrepostats-tui python/cpython\n```\n\nThe TUI provides:\n- **Interactive repository input** with real-time validation\n- **Rich formatting** with colors and organized sections\n- **Keyboard shortcuts**: Press `r` to refresh, `q` to quit\n- **GitHub token support** via `GITHUB_TOKEN` environment variable\n\n### Example output\n\n**Text format (default):**\n```text\npython/cpython statistics\n-------------------------\nStars       : 70,399\nForks       : 33,713\nOpen issues : 9,248\nWatchers    : 1,529\nLanguage    : Python\nLicense     : NOASSERTION\nSize        : 754.8 MB\nDefault branch: main\nLatest release: v3.13.0\nCreated     : 2017-02-10T19:23:51Z\nUpdated     : 2025-12-20T23:50:36Z\n```\n\n**JSON format:**\n```json\n{\n  \"name\": \"python/cpython\",\n  \"stars\": 58000,\n  \"forks\": 29000,\n  \"open_issues\": 992,\n  \"watchers\": 3400,\n  \"language\": \"Python\",\n  \"created_at\": \"2007-02-20T00:00:00Z\",\n  \"updated_at\": \"2024-01-15T12:34:56Z\"\n}\n```\n\n**YAML format:**\n```yaml\nname: python/cpython\nstars: 58000\nforks: 29000\nopen_issues: 992\nwatchers: 3400\nlanguage: Python\ncreated_at: '2007-02-20T00:00:00Z'\nupdated_at: '2024-01-15T12:34:56Z'\n```\n\nThe command exits with code `1` when the GitHub API request fails (for example, when the repository is missing or you hit a rate limit), which makes it easy to integrate into scripts.\n\n## Features\n\n- **Two interfaces**: Command-line tool and interactive TUI\n- **Multiple repositories**: Fetch stats for multiple repos in a single command (CLI)\n- **Rich metrics**: Stars, forks, issues, watchers, language, license, size, latest release, and more\n- **Multiple output formats**: text (default), JSON, and YAML (CLI)\n- **File output**: Save results to a file with `--output` (CLI)\n- **Interactive exploration**: Navigate and refresh stats in real-time (TUI)\n- **GitHub token support**: Authenticate to increase rate limits\n- **Clean output**: Accessible formatting for all output types\n- **Helpful error messages**: Clear guidance on rate limits and missing repos\n- **Exit codes**: Non-zero exit on failure for scripting integration (CLI)\n- **Cross-platform**: Works on macOS, Linux, and Windows\n\n## Development\n\n```bash\n# Clone the repository\ngit clone https://github.com/sahansera/repostats.git\ncd repostats\n\n# Create virtual environment\nuv venv\nsource .venv/bin/activate\n\n# Install in development mode (with TUI support)\nuv pip install -e \".[dev,tui]\"\n\n# Run tests\nmake test\n\n# Format code\nmake format\n\n# Type checking\nmake type-check\n\n# See all available commands\nmake help\n```\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsahansera%2Frepostats","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsahansera%2Frepostats","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsahansera%2Frepostats/lists"}