All Projects → Gyumeijie → Github Files Fetcher

Gyumeijie / Github Files Fetcher

Download a specific folder or file from a GitHub repo through command line

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Github Files Fetcher

Forge Node App
🛠📦🎉 Generate Node.js boilerplate with optional libraries & tools
Stars: ✭ 90 (+23.29%)
Mutual labels:  command-line-tool, cli, command-line, npm-package
Saldl
A lightweight well-featured CLI downloader optimized for speed and early preview.
Stars: ✭ 203 (+178.08%)
Mutual labels:  cli, command-line, downloader, download
Sultan
Sultan: Command and Rule over your Shell
Stars: ✭ 625 (+756.16%)
Mutual labels:  command-line-tool, cli, command-line
Papis
Powerful and highly extensible command-line based document and bibliography manager.
Stars: ✭ 636 (+771.23%)
Mutual labels:  command-line-tool, cli, command-line
Laminas Cli
Console command runner, exposing commands written in Laminas MVC and Mezzio components and applications
Stars: ✭ 25 (-65.75%)
Mutual labels:  command-line-tool, cli, command-line
Node.cli Progress
⌛️ easy to use progress-bar for command-line/terminal applications
Stars: ✭ 466 (+538.36%)
Mutual labels:  command-line-tool, cli, command-line
Cbt
CBT - fun, fast, intuitive, compositional, statically checked builds written in Scala
Stars: ✭ 489 (+569.86%)
Mutual labels:  command-line-tool, cli, command-line
Terjira
Terjira is a very interactive and easy to use CLI tool for Jira.
Stars: ✭ 713 (+876.71%)
Mutual labels:  command-line-tool, cli, command-line
Define
A command-line dictionary (thesaurus) app, with access to multiple sources, written in Go.
Stars: ✭ 298 (+308.22%)
Mutual labels:  command-line-tool, cli, command-line
Ed
A modern UNIX ed (line editor) clone written in Go
Stars: ✭ 44 (-39.73%)
Mutual labels:  command-line-tool, cli, command-line
Ecsctl
Command-line tool for managing AWS Elastic Container Service and Projects to run on it.
Stars: ✭ 15 (-79.45%)
Mutual labels:  command-line-tool, cli, command-line
Rff Cli Example
An example of how to use 🏁 React Final Form in a CLI application with Ink
Stars: ✭ 55 (-24.66%)
Mutual labels:  command-line-tool, cli, command-line
Pluradl.py
Automated download of Pluralsight courses
Stars: ✭ 406 (+456.16%)
Mutual labels:  cli, downloader, download
Cpx
A cli tool to watch and copy file globs.
Stars: ✭ 394 (+439.73%)
Mutual labels:  cli, npm-package, file
Cli
A command-line interface for Hetzner Cloud
Stars: ✭ 542 (+642.47%)
Mutual labels:  command-line-tool, cli, command-line
Tsukae
🧑‍💻📊 Show off your most used shell commands
Stars: ✭ 345 (+372.6%)
Mutual labels:  command-line-tool, cli, command-line
Ripgrep
ripgrep recursively searches directories for a regex pattern while respecting your gitignore
Stars: ✭ 28,564 (+39028.77%)
Mutual labels:  command-line-tool, cli, command-line
Q
q - Run SQL directly on CSV or TSV files
Stars: ✭ 8,809 (+11967.12%)
Mutual labels:  command-line-tool, cli, command-line
Ff
Find files (ff) by name, fast!
Stars: ✭ 257 (+252.05%)
Mutual labels:  command-line-tool, cli, command-line
Starcli
✨ Browse GitHub trending projects from your command line
Stars: ✭ 269 (+268.49%)
Mutual labels:  command-line-tool, cli, command-line

Introduction License: MIT

The github-files-fetcher is designed for downloading parts of a github repository. This is very useful if you have a low bandwidth network or only need a particular file or subdirectory from a large repository. If you want to download a whole repository, prefer git clone.

Installation

Run npm install -g github-files-fetcher

Basic usage

fetcher --url=resource_url  --out=output_directory

For example:

fetcher --url="https://github.com/Gyumeijie/github-files-fetcher/blob/master/CHANGELOG.md" --out=/tmp

Authentication

The default unauthorized API access rate is 60 times per hour, which is usually enough. You can surpass this with authentication, using one of the following three ways:

  1. The --auth commandline option

    This option takes the form of --auth=username:password, where the password can be either the login password for your github account or the personal access token which can be generated in https://github.com/settings/tokens.

  2. Default configuration file

    The default configuration file is ~/.download_github, and the config file is a json file.

  3. Designate via --file commandline option

    For example, you can use ~/config.json as configuration file.

 # download a directory
 fetcher --file="~/config.json" --url="https://github.com/reduxjs/redux/tree/master/examples/async" --out="~/" 
 
 # download a single file
 fetcher --file="~/config.json" --url="https://github.com/Gyumeijie/github-files-fetcher/blob/master/index.js" --out="~/" 

This is a template for the configuration file:

{
   "auth": {
        "username" : "your_github_name",
        "password" : "password_or_api_access_token"
   },
   "alwaysUseAuth" : true,
   "timeout" : 5000 
}

Behavior

When the default unauthorized API access rate exceeded, github-files-fetcher will automatically switch to use authentication if provided through one of the ways above.

github-files-fetcher requests resources without authentication by default to improve performance. However, this incurs a delay once the default unauthorized API access rate exceeded. To avoid this problem you can specify the --alwaysUseAuth option so github-files-fetcher always uses authentication.

Environment

node >= 6

Related works

There are some other good tools that function similarly:

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].