github-repo-size-cli


Namegithub-repo-size-cli JSON
Version 0.2.5 PyPI version JSON
download
home_pagehttps://github.com/pezhvak98/Github-Repo-Size-CLI
SummaryA CLI tool to fetch and display the size of GitHub repositories.
upload_time2024-11-15 20:33:57
maintainerNone
docs_urlNone
authorPezhvak
requires_python>=3.6
licenseMIT
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # github-repo-size-cli

A simple CLI tool to fetch the size of a GitHub repository.

## Installation

You can install the tool using `pip`:

```bash
pip install github-repo-size-cli
```

## Setting up Your GitHub API Token

  

### Step 1: Obtain Your GitHub API Token

  

Before using the tool, you need to set your GitHub API token. Follow these steps to generate your GitHub token:

  

1. Go to GitHub and log in to your account.

2. Navigate to **Settings** > **Developer settings** > **Personal access tokens**.

3. Click **Generate new token**.

4. Provide a name for the token, select the required scopes (for repository access, at least `repo` is needed), and then click **Generate token**.

5. Copy the generated token. **Important**: You won't be able to see it again once you leave the page.

  

### Step 2: Set the GitHub API Token in the Tool

  

Once you have your token, you can set it globally using the tool. Run the following command:

```bash

grs  --set-token <your-github-api-token>

```

This will store your GitHub API token in a global file (`~/.github_token`), so you won't need to enter it again in the future.

## Usage

 

### Fetch Repository Size

  

To fetch the size of a repository, simply run:

```bash

grs  https://github.com/owner/repository.git

```

Replace `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).

  

Example output:

```bash

Size  of  repository  owner/repo:  2.44  MB

```

### Clone the Repository (Optional)

  

After fetching the repository size, you will be asked if you'd like to clone the repository:

```bash

Do  you  want  to  clone  the  repository  'https://github.com/owner/repository.git'? (y/n):

```

Type `y` to clone the repository or `n` to skip cloning.

  

### Update Your Token (if needed)

  

If you need to update your GitHub API token (e.g., if it expires), run the following command:

```bash

grs  --update-token

```

You will be prompted to enter your new token.
## Contributing

Fork the [Github-Repo-Size-CLI ](https://github.com/pezhvak98/Github-Repo-Size-CLI) and submit pull requests for any improvements!

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/pezhvak98/Github-Repo-Size-CLI",
    "name": "github-repo-size-cli",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": null,
    "keywords": null,
    "author": "Pezhvak",
    "author_email": "m.8562.m@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/47/e4/d59df63c7349de4b97ad3c69776b127cbeaaf0e20c4f7d34159d7aff803a/github-repo-size-cli-0.2.5.tar.gz",
    "platform": null,
    "description": "# github-repo-size-cli\n\nA simple CLI tool to fetch the size of a GitHub repository.\n\n## Installation\n\nYou can install the tool using `pip`:\n\n```bash\npip install github-repo-size-cli\n```\n\n## Setting up Your GitHub API Token\n\n  \n\n### Step 1: Obtain Your GitHub API Token\n\n  \n\nBefore using the tool, you need to set your GitHub API token. Follow these steps to generate your GitHub token:\n\n  \n\n1. Go to GitHub and log in to your account.\n\n2. Navigate to **Settings** > **Developer settings** > **Personal access tokens**.\n\n3. Click **Generate new token**.\n\n4. Provide a name for the token, select the required scopes (for repository access, at least `repo` is needed), and then click **Generate token**.\n\n5. Copy the generated token. **Important**: You won't be able to see it again once you leave the page.\n\n  \n\n### Step 2: Set the GitHub API Token in the Tool\n\n  \n\nOnce you have your token, you can set it globally using the tool. Run the following command:\n\n```bash\n\ngrs  --set-token <your-github-api-token>\n\n```\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## Usage\n\n \n\n### Fetch Repository Size\n\n  \n\nTo fetch the size of a repository, simply run:\n\n```bash\n\ngrs  https://github.com/owner/repository.git\n\n```\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\n  \n\nExample output:\n\n```bash\n\nSize  of  repository  owner/repo:  2.44  MB\n\n```\n\n### Clone the Repository (Optional)\n\n  \n\nAfter fetching the repository size, you will be asked if you'd like to clone the repository:\n\n```bash\n\nDo  you  want  to  clone  the  repository  'https://github.com/owner/repository.git'? (y/n):\n\n```\n\nType `y` to clone the repository or `n` to skip cloning.\n\n  \n\n### Update Your Token (if needed)\n\n  \n\nIf you need to update your GitHub API token (e.g., if it expires), run the following command:\n\n```bash\n\ngrs  --update-token\n\n```\n\nYou will be prompted to enter your new token.\n## Contributing\n\nFork the [Github-Repo-Size-CLI ](https://github.com/pezhvak98/Github-Repo-Size-CLI) and submit pull requests for any improvements!\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A CLI tool to fetch and display the size of GitHub repositories.",
    "version": "0.2.5",
    "project_urls": {
        "Homepage": "https://github.com/pezhvak98/Github-Repo-Size-CLI"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c4f6034fd016da0d34df66858d36d021f2b4a3b2c4a0f3f2bd4ca8cbac890431",
                "md5": "0a0705c178d719e3bc56b7560b1ccf19",
                "sha256": "b285b6e5d28e64758b813d8aaf55c3d0ff4b69b4ea068cb409be2cf528c57bfe"
            },
            "downloads": -1,
            "filename": "github_repo_size_cli-0.2.5-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "0a0705c178d719e3bc56b7560b1ccf19",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 5351,
            "upload_time": "2024-11-15T20:33:56",
            "upload_time_iso_8601": "2024-11-15T20:33:56.699924Z",
            "url": "https://files.pythonhosted.org/packages/c4/f6/034fd016da0d34df66858d36d021f2b4a3b2c4a0f3f2bd4ca8cbac890431/github_repo_size_cli-0.2.5-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "47e4d59df63c7349de4b97ad3c69776b127cbeaaf0e20c4f7d34159d7aff803a",
                "md5": "2cc89b20b3bf6c42209ca0c4137c3025",
                "sha256": "e35de77167e07d3cfa3cd8f2d92d65b87c8578acfeac1908e9ffcb89154d6082"
            },
            "downloads": -1,
            "filename": "github-repo-size-cli-0.2.5.tar.gz",
            "has_sig": false,
            "md5_digest": "2cc89b20b3bf6c42209ca0c4137c3025",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 4990,
            "upload_time": "2024-11-15T20:33:57",
            "upload_time_iso_8601": "2024-11-15T20:33:57.859935Z",
            "url": "https://files.pythonhosted.org/packages/47/e4/d59df63c7349de4b97ad3c69776b127cbeaaf0e20c4f7d34159d7aff803a/github-repo-size-cli-0.2.5.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-11-15 20:33:57",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "pezhvak98",
    "github_project": "Github-Repo-Size-CLI",
    "github_not_found": true,
    "lcname": "github-repo-size-cli"
}
        
Elapsed time: 0.68867s