Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ipull

Package Overview
Dependencies
Maintainers
1
Versions
50
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ipull

Super fast cli file downloader

  • 1.2.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
5K
increased by36.82%
Maintainers
1
Weekly downloads
 
Created
Source

IPULL

npm version npm downloads GitHub license


Simple CLI to pull files from the internet super fast!

npx ipull http://example.com/file.txt

pull-example

Features

  • Download using multiple connections
  • Smart retry on fail
  • Resuming after fails

CLI

Usage: ipull [options] [files...]

Pull/copy files from remote server/local directory

Arguments:
  files                         Files to pull/copy

Options:
  -V, --version                 output the version number
  -s --save [path]              Save location (directory/file)
  -f --full-name                Show full name of the file while downloading, even if it long
  -h, --help                    display help for command

Commands:
  set [options] [path] <value>  Set download locations

Set custom save directory

You can set a custom save directory by using the set command.

ipull set .zip ~/Downloads/zips

(use default to set the default save directory)

NodeJS API

class PullProgress {
    constructor(progress: IStreamProgress, onProgress: PullProgressCallback) {
    }

    startPull(): Promise<void> {
    }
}

class CLIPullProgress {
    constructor(progress: IStreamProgress, name: string) {
    }

    startPull(): Promise<void> {
    }
}

interface IStreamProgress {
    init(): Promise<void>;

    progress(callback: (progressBytes: number, totalBytes: number) => void): Promise<any>;
}


class FastDownload implements IStreamProgress {
    constructor(url: string, savePath: string, options?: TurboDownloaderOptions);

    static async fetchFilename(url: string);
}

class CopyProgress implements IStreamProgress {
    constructor(fromPath: string, toPath: string);
}

Example:

import {FastDownload, CLIPullProgress} from 'ipull';

const download = new FastDownload('http://example.com/file.txt', './file.txt');
await download.init();

const progress = new CLIPullProgress(download, 'file.txt');
await progress.startPull();

Browser support

You can also use IPull without the CLI, just for download metadata

import PullProgress from 'ipull/pull-progress.js';

const pull = new PullProgress(download, (info) => {
    console.log(info.speed);
});

pull.startPull();
  • Make sure you import the exact file when using, so Node.js only modules will not be imported

Credits

Turbo-Downloader - The download engine used in this package

Keywords

FAQs

Package last updated on 27 Nov 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc