# nugget

> minimalist wget clone written in node. HTTP GETs a file and saves it to the current working directory

Latest version **2.2.0** (published 2022-09-01) · BSD license · 0 weekly downloads

## Install

```sh
npm install nugget
pnpm add nugget
yarn add nugget
bun add nugget
```

Provides the command `nugget`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.2.0 |
| Published | 2022-09-01 |
| First published | 2014-10-18 |
| Weekly downloads | 0 |
| License | BSD |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 7 |
| Unpacked size | 43.8 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 178 |
| Author | max ogden |
| Maintainers | jlord, mafintosh, grncdr, maxogden |

## Links

- npm: https://www.npmjs.com/package/nugget
- Repository: https://github.com/maxogden/nugget
- Issues: https://github.com/maxogden/nugget/issues
- npm.io page: https://npm.io/package/nugget

## Dependencies (7)

- [debug](https://npm.io/package/debug.md) ^2.1.3
- [request](https://npm.io/package/request.md) ^2.45.0
- [minimist](https://npm.io/package/minimist.md) ^1.1.0
- [throttleit](https://npm.io/package/throttleit.md) 0.0.2
- [pretty-bytes](https://npm.io/package/pretty-bytes.md) ^4.0.2
- [progress-stream](https://npm.io/package/progress-stream.md) ^1.1.0
- [single-line-log](https://npm.io/package/single-line-log.md) ^1.1.2

## Recent versions

- 2.2.0 (latest) — 2022-09-01
- 1.6.2 (1x) — 2016-02-10
- 2.0.2 — 2022-02-17
- 2.0.1 — 2016-09-12
- 2.0.0 — 2016-02-10
- 1.6.1 — 2016-02-10
- 1.5.5 — 2016-02-10
- 1.6.0 — 2015-10-13
- 1.5.4 — 2015-07-27
- 1.5.3 — 2015-07-26
- 1.5.2 — 2015-05-14
- 1.5.1 — 2015-04-14
- 1.5.0 — 2015-04-14
- 1.4.1 — 2015-02-03
- 1.4.0 — 2015-02-03
- … 7 more at https://npm.io/package/nugget/versions

## README

# nugget

Minimalist command line downloader written in node, inspired by wget. HTTP GETs a file and streams it into a file in the current working directory. Specializes at downloading many files in parallel.

[![NPM](https://nodei.co/npm/nugget.png?global=true)](https://nodei.co/npm/nugget/)
![dat](http://img.shields.io/badge/Development%20sponsored%20by-dat-green.svg?style=flat)
[![Travis](http://img.shields.io/travis/maxogden/nugget.svg?style=flat)](https://travis-ci.org/maxogden/nugget)

## installation

```
npm install nugget -g
```

## usage

```
Usage: nugget <urls> [options]
  -o, --output     output filename
  -d, --dir        output parent directory
  -c, --continue   resume aborted download
  -f, --force      ignore response codes > 299
  -s, --sockets    concurrent socket limit (default infinity)
  -q, --quiet      disable logging
  -t, --tmpfile    write files to <name>.tmp while downloading
  --proxy          specify a proxy to use
  --no-strict-ssl  disable strict SSL cehcking
```

### examples

```
nugget http://foo.com/bar.jpg
# downloads bar.jpg and stores it in the current directory
```

or

```
nugget http://foo.com/bar.jpg -O baz.jpg
# saves it as baz.jpg. you can also do lowercase -o
```

if you get a statusCode of 300 or greater nugget will stop. you can force it to stream the response into a file anyway by doing `nugget http://404link.com/file.html -f` or `--force` works too

you can also download multiple files, just pass multiple urls:

![download multiple](multiple.png)

## options

The following options are recognized by nugget:

- `-o|-O|--out` - specify the filename to write to. this only works if you are downloading a single file
- `-d|--dir` - save files in a directory other than the current one.
- `-c|--continue` - resume downloads if a partially complete target file already exists. If the target file exists and is the same size as the remote file, nothing will be done.
- `-f|--force` - force the server response to be saved to the target file, even if it's a non-successful status code.
- `-s|--sockets` - default Infinity. specify the number of http sockets to use at once (this controls concurrency)
- `-q|--quiet` - disable logging
- `-t, --tmpfile` - write files to <name>.tmp while downloading
- `--proxy` - specify a proxy to use
- `--no-strict-ssl` - disable strict ssl

---
_Source: https://npm.io/package/nugget · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
