Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jaebradley/npm-install-search-cli
🔍 📦 Search and install npm packages in the same command
https://github.com/jaebradley/npm-install-search-cli
cli inquirer inquirer-autocomplete nodejs npm npm-install npm-search
Last synced: 3 months ago
JSON representation
🔍 📦 Search and install npm packages in the same command
- Host: GitHub
- URL: https://github.com/jaebradley/npm-install-search-cli
- Owner: jaebradley
- License: mit
- Created: 2018-03-28T17:23:05.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2022-02-09T19:18:33.000Z (about 3 years ago)
- Last Synced: 2024-09-13T04:25:20.074Z (5 months ago)
- Topics: cli, inquirer, inquirer-autocomplete, nodejs, npm, npm-install, npm-search
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/npm-install-search-cli
- Size: 1.87 MB
- Stars: 4
- Watchers: 3
- Forks: 0
- Open Issues: 12
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# npm-install-search-cli
[![npm](https://img.shields.io/npm/v/npm-install-search-cli.svg)](https://www.npmjs.com/package/npm-install-search-cli)
[![npm](https://img.shields.io/npm/dt/npm-install-search-cli.svg)](https://www.npmjs.com/package/npm-install-search-cli)![alt-text](https://media.giphy.com/media/1akH8ZffIwX1XcIwWt/giphy.gif)
## Installation
```bash
npm install npm-install-search-cli -g
// or
yarn add npm-install-search-cli -g
```## Usage
### `npm install` + `search`
```bash
nis [...options]
```### `yarn add` + `search`
```bash
yas [...options]
```If you use `npm` for package management, you can execute `nis` with some of [the current `npm install` `options`](https://docs.npmjs.com/cli/install) like `--save` or `--save-dev` or `--save-prod`. [1](#npm-options-footnote)
If you use `yarn` for package management, you can execute `yas` with all of [the current `yarn add` `options`](https://yarnpkg.com/en/docs/cli/add) like `--dev` or `-E`.
You'll be prompted to search packages in the `npm` registy using an autocomplete interface.
![alt-text](https://imgur.com/hSRpcfT.png)
(Under the hood, the CLI is making HTTP requests to [the `npm` registry's `search` API](https://github.com/npm/registry/blob/master/docs/REGISTRY-API.md#get-v1search)).
Once you make a selection, it should install like good 'ol `npm install` or `yarn add`!
![alt-text](https://imgur.com/ijG0lBQ.png)
1: The current options are `-S` / `--save`, `-P` / `--save-prod`, `-D` / `--save-dev`, `-O` / `--save-optional`, `-E` / `--save-exact`, `-B` / `--save-bundle`, `-g`, / `--global`, `--no-save`, and `--dry-run`. While not the complete list of options available via `npm install`, I find these options represent `99%` of my usecases - feel free to open a PR if you want to add more options!