How to Install and Use the GitHub Repository Size Chrome Extension

May 11, 2021 | Data Science

In the ever-expansive universe of GitHub, knowing the size of repositories can be a crucial metric for developers. Thankfully, a nifty Chrome extension is available that automatically adds repository size to GitHub’s repository summary, making it a breeze to check how hefty or lightweight your favorite projects are. Let’s explore how to install and use this extension effectively!

Getting Started: Installation

To begin your journey with the GitHub Repository Size extension, follow these simple steps:

  • Click on the following link to navigate to the Chrome Web Store: GitHub Repository Size Extension.
  • Click on the “Add to Chrome” button to install the extension.
  • Once installed, you’ll notice an icon for the extension next to the address bar in your Chrome browser.

Screenshot of the Extension

Here’s a visual representation of what the extension looks like:

Screenshot of repository size on GitHub

How to View Repository Sizes for Private Repositories

To enable viewing the size of private repositories, follow these additional steps:

  1. Make sure you’ve installed the extension from the Chrome Web Store.
  2. Go to GitHub Personal Access Tokens and generate your personal access token. Ensure that you check the ‘repo’ scope to allow the extension to work with your private repositories.
  3. Click on the GitHub Repo Size extension icon next to the address bar.
  4. Paste your access token into the prompt box that appears.

Temporarily Overriding Your Access Token

If you need to override your personal access token temporarily, follow these steps:

  1. Open the console in your Chrome browser.
  2. Set the x-github-token in localStorage with the following command:
  3. localStorage.setItem('x-github-token', 'YOUR-PERSONAL-ACCESS-TOKEN');
  4. To revert back to using your previously set token, use:
  5. localStorage.removeItem('x-github-token');

Development Instructions

If you’re eager to dive deeper into development, here’s what you can do:

  • Clone this repository to your local machine.
  • Navigate to chrome:extensions in your Chrome browser.
  • Enable developer mode by toggling the switch in the upper right corner.
  • Select “Load unpacked” and choose the directory of your cloned repo.

Troubleshooting Tips

Should you encounter any issues while using the GitHub Repository Size extension, consider the following troubleshooting steps:

  • Verify that you have the correct permissions enabled for your personal access token.
  • Ensure that you are logged into the correct GitHub account that corresponds with your access token.
  • If the extension isn’t displaying sizes, try refreshing the GitHub page.
  • If all else fails, reinstall the extension and repeat the setup process.

For more insights, updates, or to collaborate on AI development projects, stay connected with fxis.ai.

Conclusion

Knowing the size of repositories can be immensely beneficial, similar to understanding the weight of a suitcase before packing for a trip. This Chrome extension acts like a personal assistant, giving you quick insights into your GitHub repositories without the need for manual checks. At fxis.ai, we believe that such advancements are crucial for the future of AI, as they enable more comprehensive and effective solutions. Our team is continually exploring new methodologies to push the envelope in artificial intelligence, ensuring that our clients benefit from the latest technological innovations.

Stay Informed with the Newest F(x) Insights and Blogs

Tech News and Blog Highlights, Straight to Your Inbox