Skip to content

Download the directory from a repository on github through command line. It is so trivial lots of times specially when the repository is really huge and what we want is very small part of it. It is simply one liner which uses github Api to collect information about repo and downloads the required files inside your working directory

Notifications You must be signed in to change notification settings

Amit0617/directory-downloader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

directory-downloader

An extension to gh CLI for a very trivial but missing feature.

Installation

One liner installation:

git clone https://github.com/Amit0617/directory-downloader.git; cd directory-downloader; chmod u+x gh-down.sh; sudo ln -s -T $(pwd)/gh-down.sh /usr/bin/gh-down

Usage

gh-down username/repositoryname path/to/directory

Screenshot_20220228_144809

Example

Let say you want to download ABAP directory which is in samples in https://github.com/octocat/linguist

gh-down octocat/linguist samples/ABAP

That's it!

Note: It will download the files inside the given directory in your current directory and to keep it minimal it downloads files only and should be skipping if it contains more directory inside the given directory.

About

Download the directory from a repository on github through command line. It is so trivial lots of times specially when the repository is really huge and what we want is very small part of it. It is simply one liner which uses github Api to collect information about repo and downloads the required files inside your working directory

Topics

Resources

Stars

Watchers

Forks

Languages