Skip to main content

Command Palette

Search for a command to run...

Check Size of a Github Repo

Published
1 min read
Check Size of a Github Repo

Just a shell script.

Requirements: curl, jq, GNU Coreutils

#!/bin/sh

sizeof()
{
    curl -s https://api.github.com/repos/$1 | jq '.size' | numfmt --to=iec --from-unit=1024
}

size=$(sizeof $1)
echo $size

Usage

Pass username/repo as argument to the script.

1 views

More from this blog

Aditya's blog

57 posts

Who tricked sands into thinking?