https://github.com/nurrony/gtni
Install your all npm dependencies recursively with gtni while you are doing git clone, fetch or pull
https://github.com/nurrony/gtni
clone fetch git install npm
Last synced: 3 months ago
JSON representation
Install your all npm dependencies recursively with gtni while you are doing git clone, fetch or pull
- Host: GitHub
- URL: https://github.com/nurrony/gtni
- Owner: nurrony
- License: mit
- Created: 2015-10-11T11:48:06.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2026-02-17T14:27:32.000Z (4 months ago)
- Last Synced: 2026-03-03T00:06:29.414Z (4 months ago)
- Topics: clone, fetch, git, install, npm
- Language: JavaScript
- Homepage: https://nurrony.github.io/gtni
- Size: 1.71 MB
- Stars: 16
- Watchers: 2
- Forks: 3
- Open Issues: 21
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# gtni
Install your npm dependencies recursively with gtni as soon you clone, fetch or pull a git repo.
[![version][npm-version]][npm-url] [![Downloads][npm-total-downloads]][npm-url] [![Travis branch][travis-badge]][travis-url] [![Greenkeeper badge][gk-badge]][gk-url] [![semantic-release][sembadge]][npm-url]
> **gtni** automatically choose right package manager for a git repository based on lock file in a directory with `package.json`.
## Installation
```sh
[sudo] npm install -g gtni
# or
[sudo] yarn global add gtni
```
## Usage
```sh
$gtni --help
Usage: gtni [options]
Commands:
pull git pull and install npm dependencies
fetch git fetch and install npm dependencies
clone clone a git repository and install npm dependencies
Options:
-h, --help Show help [boolean]
-v, --version Show version number [boolean]
Examples:
[NODE_ENV=] gtni pull [git-options] git pull and install npm packages
# Sub command options
$ gtni -h
Options:
-h, --help, --help Show help [boolean]
--branch, -b remote branch name to clone [string] [default: false]
--debug, -d Show debug output [boolean] [default: false]
-v, --version Show version number [boolean]
Note: here you can pass any flags for the corresponding git command
```
I need your help to improve this module. Please send me your valuable suggestions and advices. I am all ears.
## Todo List
- [x] Very basic stage of pull support
- [x] Pull support for most used `git pull` options
- [x] Fetch support for most used `git fetch` options
- [x] Support for `git clone`
- [x] `NODE_ENV` support for `npm/yarn install`
- [x] Show warnings during dependencies installation
- [x] Support for read and install dependencies when project has multiple `package.json` files
- [x] Install npm modules diffing `git tree` for various branch after doing git operations supported by `gtni`
- [x] Add support to pass custom `NODE_ENV` values for `npm install`
- [x] Choose right package manager automatically for a repository
[npm-badge]: https://nodei.co/npm/gtni.png?compact=true
[npm-version]: https://img.shields.io/npm/v/gtni.svg?style=flat-square
[npm-dependencies]: https://img.shields.io/david/nmrony/gtni.svg?style=flat-square
[npm-dev-dependencies]: https://img.shields.io/david/dev/nmrony/gtni.svg?style=flat-square
[npm-total-downloads]: https://img.shields.io/npm/dm/gtni.svg?style=flat-square
[npm-url]: https://www.npmjs.com/package/gtni
[github-url]: https://github.com/nmrony/gtni
[travis-url]: https://travis-ci.org/nmrony/gtni
[travis-badge]: https://img.shields.io/travis/nmrony/gtni/master.svg?style=flat-square
[yarn-url]: https://yarnpkg.com/
[gk-badge]: https://badges.greenkeeper.io/nmrony/gtni.svg
[gk-url]: https://greenkeeper.io/
[sembadge]: https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg