Git Product home page Git Product logo

fetch's Introduction

Fetch

Fetch is a lightweight CLI for fast downloading .It breaks a file in chunks and utilizes multiple goroutines to download these chunks in parallel to disks and later merge them.

Benchmark

I benchmarked fetch with two popular cli for downloading cURL and wget on an average it performed better with significantly less time taken by fetch.

Benchmark

Avg Time taken to download debian.iso (377 Mb):

  • fetch (dividing in 20 chunks)-34.23124401569366 seconds
  • cURL- 61.38265061378479 seconds
  • wget- 69.53341414928437 seconds

Fetch took 44.23% less time than curl and 50.77% less time than wget

Installation

  • For linux/unix systems

    • Download the latest binary from releases

    • Download the installation script from here and run this script:

    $ wget http://projects.kindurkhya.me/fetch-install.sh && ./fetch-install.sh && rm fetch-install.sh

  • For Windows Systems

    • Download the latest executable from releases -add it to path
  • For Building from source Clone this repo Build using:

    $ go build

    add the compiled binary to path

Usage

Usage:
  fetch [flags]
  fetch [command]

Available Commands:
  clean       Delete Downloaded files
  completion  generate the autocompletion script for the specified shell
  download    Download from url
  help        Help about any command
  history     Fetch your download history

Flags:
  -h, --help   help for fetch

download

Usage:
  fetch download <URL> <filename> [flags]

Flags:
      --config string   config file (default is $HOME/.fetch.yaml)
  -h, --help            help for fetch
      --path string     Specify Download Location of the file
      --seq             Download the file sequentially instead of parallel downloading
      --threads int     Specify Number of threads to be used (default 20)
      --verbose         Specify Verbosity of the output
	Example Usage: 
	fetch download https://saimei.ftp.acc.umu.se/debian-cd/current/amd64/iso-cd/debian-11.0.0-amd64-netinst.iso debian.iso --threads=20 --verbose 

help

Get details of the files downloaded using fetch

Usage:
  fetch history [flags]
  fetch history [command]

Available Commands:
  clean       Clear your downloading history

Flags:
  -h, --help       help for history
      --list int   Specify Number of Rows in result (default 10)

Example usage:

fetch history --list=5

Shows 5 recent downloads

Clean

Clean Up all the files downloaded using fetch cli

Example usage:

fetch clean

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.