New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@screencloud/fetch-github-release

Package Overview
Dependencies
Maintainers
7
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@screencloud/fetch-github-release

CLI downloader for github release assets

  • 1.2.2
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
17
Maintainers
7
Weekly downloads
 
Created
Source

@screencloud/fetch-github-release

a micro CLI tool for downloading named assets from tagged github releases

Installation

Install as

npm i -g @screencloud/fetch-github-release

Afterwards use fetch-github-release or simply fghr.

Configuration

Run fghr -h for a comprehensive help

screencloud/fetch-github-release cli
Usage: cli [options]

Options:
  -V, --version                  output the version number
  -m, --make-dir                 Creates the output directory if it doesn't exist yet
  -t, --token <token>            Github token to be used (default: GH_TOKEN|GITHUB_TOKEN) (default: "b1885a63210480d6bb422fe079fb9dbd1290aeb3")
  -v, --tag <tag>                Github release tag (default: GH_TAG|GITHUB_TAG)
  -r, --repo <github repo slug>  Target github repository slug (default: GH_REPO|GITHUB_REPOSITORY)
  -a, --asset <file name>        asset name (repeatable, default: GH_ASSET_NAME|GITHUB_ASSET_NAME) (default: [])
  -u, --unzip                    Unpack .zip files automatically into a same-named folder
  -o, --output <path>            Output path for downloaded assets (default: CWD) (default: "C:\\git\\screencloud\\fetch-github-release")
  -h, --help                     display help for command

Use either arguments or environment variables for configuration.

To download a asset foobar.zip for release v1.2.3 from github repository example/bob run

fghr -a foobar.zip -v v1.2.3 -r example/bob -t <your github token>

Or with environment variables in mind

GH_REPO=example/bob GH_TOKEN=<your github token> GH_TAG=v1.2.3
fghr -a foobar.zip

Downloading multiple assets

The --asset|-a argument is repeatable

GH_REPO=example/bob GH_TOKEN=<your github token> GH_TAG=v1.2.3
fghr -a foobar.zip -a alice.zip -a bob.zip

Unzipping downloaded assets

Assets ending in .zip can be automatically unzipped into a folder of the same name (minus the extension).

Use -u or --unzip to do so. All other assets will ignore the flag automatically.

FAQs

Package last updated on 22 Apr 2020

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