{"id":22928858,"url":"https://github.com/pezhvak98/github-repo-size-cli","last_synced_at":"2026-02-02T14:35:05.511Z","repository":{"id":263980665,"uuid":"889173262","full_name":"pezhvak98/Github-Repo-Size-CLI","owner":"pezhvak98","description":"A simple and efficient command-line tool to check the size of any GitHub repository and optionally clone it, with seamless GitHub API token management.","archived":false,"fork":false,"pushed_at":"2024-11-26T16:22:12.000Z","size":11,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-13T02:42:52.669Z","etag":null,"topics":["cli","github-repository","pip"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/github-repo-size-cli/","language":"Python","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/pezhvak98.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,"zenodo":null}},"created_at":"2024-11-15T18:51:50.000Z","updated_at":"2024-11-26T16:22:16.000Z","dependencies_parsed_at":"2025-05-13T02:36:08.161Z","dependency_job_id":"a79bfcff-d16c-4bb9-a2ce-38084a3b9bf2","html_url":"https://github.com/pezhvak98/Github-Repo-Size-CLI","commit_stats":null,"previous_names":["pezhvak98/github-repo-size-cli"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/pezhvak98/Github-Repo-Size-CLI","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pezhvak98%2FGithub-Repo-Size-CLI","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pezhvak98%2FGithub-Repo-Size-CLI/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pezhvak98%2FGithub-Repo-Size-CLI/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pezhvak98%2FGithub-Repo-Size-CLI/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pezhvak98","download_url":"https://codeload.github.com/pezhvak98/Github-Repo-Size-CLI/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pezhvak98%2FGithub-Repo-Size-CLI/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260837916,"owners_count":23070564,"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":["cli","github-repository","pip"],"created_at":"2024-12-14T09:28:03.028Z","updated_at":"2026-02-02T14:35:00.489Z","avatar_url":"https://github.com/pezhvak98.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# GitHub Repository Size CLI Tool\n\nA simple CLI tool to fetch and display the size of a GitHub repository. This tool also allows you to set and update your GitHub API token globally, so you don't need to enter it every time.\n\n## Features\n\n- Fetch the size of any public GitHub repository.\n- Display the repository size in a human-readable format (KB, MB, GB).\n- Optionally clone the repository after fetching its size.\n- Set and update your GitHub API token globally for ease of use.\n\n## Installation\n\n## Install as Package from **pip** (recommended)\n```python\nsudo pip install github-repo-size-cli\n```\nor \n\n### Install the Tool and All Prerequisites using Source Code\n\nTo install this tool and all the required dependencies after cloning, simply run the installation script:\n\n```bash\nchmod +x install.sh\nsudo ./install.sh\n```\nThis will:\n\n-   Install Python 3, `pip`, and `git` (if not already installed).\n-   Install the required Python dependencies.\n-   Create a symlink for the tool so it can be used globally from anywhere in your terminal.\n\nOnce the script finishes, the tool is installed, and you can run it with the `grs` command.\n\n## Setting up Your GitHub API Token\n\n### Step 1: Obtain Your GitHub API Token\n\nBefore using the tool, you need to set your GitHub API token. Follow these steps to generate your GitHub token:\n\n1.  Go to GitHub and log in to your account.\n2.  Navigate to **Settings** \u003e **Developer settings** \u003e **Personal access tokens**.\n3.  Click **Generate new token**.\n4.  Provide a name for the token, select the required scopes (for repository access, at least `repo` is needed), and then click **Generate token**.\n5.  Copy the generated token. **Important**: You won't be able to see it again once you leave the page.\n\n### Step 2: Set the GitHub API Token in the Tool\n\nOnce you have your token, you can set it globally using the tool. Run the following command:\n```bash\ngrs --set-token \u003cyour-github-api-token\u003e\n```\nThis will store your GitHub API token in a global file (`~/.github_token`), so you won't need to enter it again in the future.\n\n## Using the Tool\n\n### Fetch Repository Size\n\nTo fetch the size of a repository, simply run:\n```bash\ngrs https://github.com/owner/repository.git\n```\nReplace `owner` and `repository` with the actual GitHub repository details. The tool will display the repository size in a human-readable format (KB, MB, or GB).\n\nExample output:\n```bash\nSize of repository owner/repo: 2.44 MB\n```\n### Clone the Repository (Optional)\n\nAfter fetching the repository size, you will be asked if you'd like to clone the repository:\n```bash\nDo you want to clone the repository 'https://github.com/owner/repository.git'? (y/n):\n```\nType `y` to clone the repository or `n` to skip cloning.\n\n### Update Your Token (if needed)\n\nIf you need to update your GitHub API token (e.g., if it expires), run the following command:\n```bash\ngrs --update-token\n```\nYou will be prompted to enter your new token.\n\n---\n### Key Points: \n1. **Installation:** The script `install.sh` will handle everything related to installing prerequisites (like `Python3`, `pip`, and `git`). \n2. **GitHub API Token:** There is a detailed section on how to obtain and set the `GitHub API token`. \n3. **Tool Usage:** Clear instructions on how to use the tool, set the token, fetch repository sizes, clone repos, and update the token.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpezhvak98%2Fgithub-repo-size-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpezhvak98%2Fgithub-repo-size-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpezhvak98%2Fgithub-repo-size-cli/lists"}