{"id":21831438,"url":"https://github.com/nodef/extra-download","last_synced_at":"2026-05-19T02:40:39.526Z","repository":{"id":90491424,"uuid":"156687333","full_name":"nodef/extra-download","owner":"nodef","description":"Download and extract files (with progress).","archived":false,"fork":false,"pushed_at":"2020-09-14T06:20:18.000Z","size":27,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-26T09:15:56.814Z","etag":null,"topics":["cli","console","download","extra","extract","file","http","https","progress","shell"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/extra-download","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nodef.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-11-08T10:08:22.000Z","updated_at":"2022-04-12T17:42:03.000Z","dependencies_parsed_at":null,"dependency_job_id":"bddd13e0-0173-432c-b851-e1b47f4d980a","html_url":"https://github.com/nodef/extra-download","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nodef%2Fextra-download","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nodef%2Fextra-download/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nodef%2Fextra-download/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nodef%2Fextra-download/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nodef","download_url":"https://codeload.github.com/nodef/extra-download/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244803792,"owners_count":20512992,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","console","download","extra","extract","file","http","https","progress","shell"],"created_at":"2024-11-27T19:10:26.315Z","updated_at":"2026-05-19T02:40:39.521Z","avatar_url":"https://github.com/nodef.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[Download] and extract files (with [progress]).\n\n## console\n\n```bash\n$ download [options] \u003curl\u003e\n# --help: show help\n# -o | --out:     Where to place the downloaded files\n# -e | --extract: Try decompressing the file\n# -s | --strip \u003cnumber\u003e: Strip leading paths from file names on extraction\n# --filename \u003cstring\u003e: Name of the saved file\n# --proxy \u003cstring\u003e:    Proxy endpoint\n# --header \u003cstring\u003e:   HTTP header. Can be set multiple times\n\n$ download http://foo.com/file.zip\n$ download http://foo.com/cat.png \u003e dog.png\n$ download --extract --strip 1 --out dest http://foo.com/file.zip\n$ download --header 'authorization: Basic foo:bar' http://foo.com/file.zip\n```\n\n\n## package\n\n```js\nconst fs = require('fs');\nconst download = require('extra-download');\n// download(\u003curl\u003e, [out], [options])\n// -\u003e Promise\u003cBuffer\u003e \u0026 \u003cDuplex Stream\u003e with additional events\n\n// [options]: {\n//   extract: false, // try decompressing the file?\n//   filename: null, // name of the saved file\n//   proxy: null,    // proxy endpoint\n//   progress: new Progress(...), // progress object (null to disable)\n//   onresponse: /* handler */    // download stream response handler\n// }\n\n\nawait download('http://unicorn.com/foo.jpg', 'dist');\nconsole.log('done!');\n\nvar data = await download('http://unicorn.com/foo.jpg');\nfs.writeFileSync('dist/foo.jpg', data);\n\nvar stream = download('unicorn.com/foo.jpg');\nstream.pipe(fs.createWriteStream('dist/foo.jpg'));\n\nvar urls = [\n\t'unicorn.com/foo.jpg',\n\t'cats.com/dancing.gif'\n];\nawait Promise.all(urls.map(url =\u003e download(url, 'dist')));\nconsole.log('files downloaded!');\n```\n\n\n\n[![Merferry](https://i.imgur.com/lKwA6yH.jpg)](https://merferry.github.io)\n\u003e See about [Duplex stream], and [additional events].\u003cbr\u003e\n\u003e See the original modules: [download], [download-cli].\n\n![](https://ga-beacon.deno.dev/G-RC63DPBH3P:SH3Eq-NoQ9mwgYeHWxu7cw/github.com/nodef/extra-download)\n\n[Duplex stream]: https://nodejs.org/api/stream.html#stream_class_stream_duplex\n[additional events]: https://github.com/sindresorhus/got#streams-1\n[Download]: https://www.npmjs.com/package/download\n[download]: https://www.npmjs.com/package/download\n[download-cli]: https://www.npmjs.com/package/download-cli\n[progress]: https://www.npmjs.com/package/progress\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnodef%2Fextra-download","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnodef%2Fextra-download","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnodef%2Fextra-download/lists"}