New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

go-git-it

Package Overview
Dependencies
Maintainers
1
Versions
38
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

go-git-it

Download any repository or subdirectory on GitHub with support for Node.js and the CLI

latest
Source
npmnpm
Version
5.1.5
Version published
Weekly downloads
2.7K
15.8%
Maintainers
1
Weekly downloads
 
Created
Source

npm downloads workflow

go-git-it

Download any repository or subdirectory on GitHub with support for Node.js and the CLI

npx go-git-it <url> [outputDir]
Command line instructions

Use cases

# cwd is ~/mydevspace/

npx go-git-it https://github.com/extension-js/extension.js
# Creates ~/mydevspace/extension.js/ folder (like git clone)

npx go-git-it https://github.com/extension-js/extension.js/tree/main/templates/react/images
# Creates ~/mydevspace/images/ folder

npx go-git-it https://github.com/extension-js/extension.js/blob/main/templates/react/manifest.json
# Downloads ~/mydevspace/manifest.json

The second command argument is the output directory:

npx go-git-it https://github.com/extension-js/extension.js ./my-browser-extension
# Creates ./my-browser-extension/extension.js/ folder (like git clone)

Node interface

go-git-it can also run on a Node.js program.

Installation

npm install go-git-it

Usage

import goGitIt from 'go-git-it';

// Assume cwd is ~/mydevspace/

await goGitIt('https://github.com/extension-js/extension.js');
// Creates ~/mydevspace/extension.js/ folder (like git clone)

await goGitIt(
  'https://github.com/extension-js/extension.js/tree/main/templates/react/images',
);
// Creates ~/mydevspace/images/ folder

await goGitIt(
  'https://github.com/extension-js/extension.js/blob/main/templates/react/manifest.json',
);
// Downloads ~/mydevspace/manifest.json

The second parameter is the output path:

import goGitIt from 'go-git-it';

// Assume cwd is ~/mydevspace/

await goGitIt(
  'https://github.com/extension-js/extension.js',
  './my-browser-extension',
);
// Creates ./my-browser-extension/extension.js/ folder (like git clone)

API

goGitIt(url, outputDir?, text?)

url

Type: string

The URL to the path you want to download. If a folder, will download its content as well.

outputDir

Type: string

Custom path to the outputDir (defaults to the working directory)

text

Type: string

Adds a custom text message instead of default config. This option overrides the success message as well.

License

MIT (c) Cezar Augusto.

Keywords

git

FAQs

Package last updated on 02 Apr 2026

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