# grab-deps-cli

> The tool for grabbing dependencies from the local project

Latest version **1.0.0** (published 2018-12-25) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install grab-deps-cli
pnpm add grab-deps-cli
yarn add grab-deps-cli
bun add grab-deps-cli
```

Provides the command `grab-deps`.

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2018-12-25 |
| First published | 2018-12-25 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 4 |
| Unpacked size | 8.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Viacheslav Yefremov |
| Maintainers | viacheslavyefremov |
| Keywords | cli, dependencies, terminal, console |

## Links

- npm: https://www.npmjs.com/package/grab-deps-cli
- Repository: https://github.com/viacheslavyefremov/grab-deps-cli
- Homepage: https://github.com/viacheslavyefremov/grab-deps-cli#readme
- Issues: https://github.com/viacheslavyefremov/grab-deps-cli/issues
- npm.io page: https://npm.io/package/grab-deps-cli

## Dependencies (4)

- [chalk](https://npm.io/package/chalk.md) ^2.4.1
- [read-pkg](https://npm.io/package/read-pkg.md) ^4.0.1
- [commander](https://npm.io/package/commander.md) ^2.19.0
- [cross-spawn](https://npm.io/package/cross-spawn.md) ^6.0.5

## Alternatives

- [@salesforce/cli](https://npm.io/package/@salesforce/cli.md) — 389.7K weekly downloads
- [@mintlify/cli](https://npm.io/package/@mintlify/cli.md) — 208.9K weekly downloads
- [@grafana/e2e-selectors](https://npm.io/package/@grafana/e2e-selectors.md) — 128.7K weekly downloads
- [mintlify](https://npm.io/package/mintlify.md) — 112.0K weekly downloads
- [@intlayer/cli](https://npm.io/package/@intlayer/cli.md) — 22.8K weekly downloads

## Recent versions

- 1.0.0 (latest) — 2018-12-25

## README

# grab-deps-cli

> npm i -g grab-deps-cli

## Why
When you want to create the new project based on the old one, you need to install the same dependencies there. In this case, you are faced with the installing of these packages manually.

You can skirt around this problem by using `grab-deps-cli`. With it, you are able to grab the dependencies for the new project from the other one in the seconds.

## Usage
1. Install the package globally: `npm i -g grab-deps-cli`
2. Go to the folder of the new project: `cd projects/new`
3. Init this project to add `package.json` (e.g. by using npm): `npm init`
4. Grab the dependencies from the old project: `grab-deps ../projects/old`

> Warning: Path to the old project is required!

## Options
`--exclude <packages> (-e <packages>)`: Exclude packages from the list

`--show (-s)`: Show packages from the list without installing

## Examples

### Setup

In the **old** project:

```json
// projects/old/package.json
{
  ...
  "dependencies": {
    "react": "^16.7.0",
    "react-dom": "^16.7.0",
    ...
  },
  "devDependencies": {
    "@types/react": "^16.7.18",
    "@types/react-dom": "^16.0.11",
    "prettier": "^1.15.3",
    ...
  },
  ...
}
```

In the **new** project (after init):

```json
// projects/new/package.json
{
  ...
  "dependencies": {},
  "devDependencies": {},
  ...
}
```

### 1. Basic
1. `cd projects/new`
2. `grab-deps ../projects/old`

Magic! All packages from the **old** project will be installed to the **new** one.

### 2. Exclude dependencies
1. `cd projects/new`
2. `grab-deps ../projects/old -e prettier`

All packages except `prettier` will be installed.

### 3. Show deps for installation (without installing)
1. `cd projects/new`
2. `grab-deps ../projects/old -e prettier --show`

Nothing will be installed, this is preview mode - you can see what packages will be installed in the future without `--show` flag.

---
_Source: https://npm.io/package/grab-deps-cli · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
