
Research
Security News
Malicious PyPI Package Exploits Deezer API for Coordinated Music Piracy
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
[![npm version][npm-version-src]][npm-version-href] [![npm downloads][npm-downloads-src]][npm-downloads-href] [![Github Actions][github-actions-src]][github-actions-href] [![Codecov][codecov-src]][codecov-href]
The giget npm package is a tool that allows users to quickly download GitHub repositories and gists without needing to clone or set up Git. It is designed to be a fast and straightforward way to fetch code from GitHub.
Download GitHub repositories
This command downloads the specified GitHub repository to the current directory.
npx giget owner/repo
Download GitHub gists
This command downloads the specified GitHub gist to the current directory.
npx giget gist <gist-id>
Download specific files or directories
This command downloads a specific file or directory from a GitHub repository.
npx giget owner/repo/path/to/file
Download specific branch, tag, or commit
This command downloads the repository as it is at the specified branch, tag, or commit.
npx giget owner/repo#ref
Degit is a similar tool that provides a straightforward way to download the contents of a git repository without the full version history. It is faster than using git clone and is useful for scaffolding projects. Compared to giget, degit focuses on git repositories and does not have built-in support for gists.
download-git-repo is a Node.js module that allows you to download GitHub, GitLab, and Bitbucket repositories. It is similar to giget in that it lets you download repositories, but it also supports other platforms besides GitHub and does not have a specific focus on gists.
Easily download git repositories
✔ Multi-provider support (GitHub, GitLab, and Bitbucket).
✔ Fast cloning using tarball gzip without depending on local git
and tar
commands or downloading history.
✔ Works online and offline with disk cache support.
✔ Support extracting with a subdir.
npx giget@latest unjs/template my-lib
# ✨ Successfully cloned https://github.com/unjs/template/tree/main/ to my-lib
npx giget@latest <repo> [<dir>] [...options]
[provider]:repo[/subpath][#ref]
.--force
: Clone to exsiting directory even if exists.--offline
: Do not attempt to download and use cached version.--prefer-offline
: Use cache if exists otherwise try to download.--force-clean
: ⚠️ Remove any existing directory or file recusively before cloning.--shell
: ⚠️ Open a new shell with current working directory in cloned dir. (Experimental)# Clone the main branch of github.com/unjs/template to unjs-template directory
npx giget@latest unjs/template
# Clone to myProject directory
npx giget@latest unjs/template myProject
# Clone dev branch
npx giget@latest unjs/template#dev
# Clone /test directory from main branch
npx giget@latest unjs/template/test
# Clone from gitlab
npx giget@latest gitlab:unjs/template
# Clone from bitbucket
npx giget@latest butbucket:unjs/template
Install package:
# npm
npm install giget
# yarn
yarn install giget
# pnpm
pnpm install giget
Import:
// ESM
import { downloadRepo } from 'giget'
// CommonJS
const { downloadRepo } = require('giget')
downloadRepo(source, dir?, options?)
Example:
const { source, dir } = await downloadRepo('github:unjs/template')
Parameters:
source
: (string) Input source in format of [provider]:repo[/subpath][#ref]
.dir
: (string) Destination directory to clone to. If not provided, user-name
will be used relative to the current directory.options
: (object) Options are usually inferred from the input string. You can customize them.
provider
: (string) Either github
, gitlab
or bitbucket
. The default is github
.repo
: (string) Name of repository in format of {username}/{reponame}
.ref
: (string) Git ref (branch or commit or tag). The default value is main
.subdirpath
: (string) subdir of the repo to clone from. The default value is none.force
: (boolean) Extract to the exisiting dir even if already exsists.forceClean
: (boolean) ⚠️ Clean ups any existing directory or file before cloning.offline
: Do not attempt to download and use cached version.preferOffline
: Use cache if exists otherwise try to download.Return value:
The return value is a promise that resolves to an object with the following properties:
dir
: (string) Path to extracted dir.url
: (string) URL of repostiroy that can be opened in browser. Useful for logging.source
: (string) Normalized version of the input source. Useful for logging.corepack enable
(use npm i -g corepack
for Node.js < 16.10)pnpm install
pnpm dev
Made with 💛
Published under MIT License.
FAQs
Download templates and git repositories with pleasure!
The npm package giget receives a total of 3,183,597 weekly downloads. As such, giget popularity was classified as popular.
We found that giget demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.
Security News
Newly introduced telemetry in devenv 1.4 sparked a backlash over privacy concerns, leading to the removal of its AI-powered feature after strong community pushback.