# @whoj/manage-pkg

> Install & Uninstall package programmatically.

Latest version **1.1.0** (published 2023-03-16) · MIT license · 0 weekly downloads

## Install

```sh
npm install @whoj/manage-pkg
pnpm add @whoj/manage-pkg
yarn add @whoj/manage-pkg
bun add @whoj/manage-pkg
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.0 |
| Published | 2023-03-16 |
| First published | 2022-05-21 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 2 |
| Unpacked size | 16.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Jonson B. |
| Maintainers | who_jonson, whoj |
| Keywords | npm, pnpm, yarn, universal |

## Links

- npm: https://www.npmjs.com/package/@whoj/manage-pkg
- Repository: https://github.com/who-jonson/manage-pkg
- Homepage: https://github.com/who-jonson/manage-pkg#readme
- Issues: https://github.com/who-jonson/manage-pkg/issues
- npm.io page: https://npm.io/package/@whoj/manage-pkg

## Dependencies (2)

- [execa](https://npm.io/package/execa.md) ^7.1.1
- [@antfu/ni](https://npm.io/package/@antfu/ni.md) ^0.20.0

## Recent versions

- 1.1.0 (latest) — 2023-03-16
- 1.0.1 — 2023-03-15
- 1.0.0 — 2023-03-15
- 0.1.2 — 2022-05-21
- 0.1.2-beta.1 — 2022-05-21

## README

# manage-pkg

<p>
  <a href="https://www.npmjs.com/package/@whoj/manage-pkg">
    <img src="https://badgen.net/npm/v/@whoj/manage-pkg?icon=npm&color=green&label=" alt="Version">
  </a>
  <a href="#">
    <img src="https://badgen.net/npm/types/@whoj/manage-pkg?color=blue&icon=typescript&label=" alt="Typings">
  </a>
  <a href="https://github.com/who-jonson/manage-pkg">
    <img src="https://badgen.net/github/checks/node-formidable/node-formidable/master/macos?icon=github&label=" alt="Linting Status">
  </a>
  <a href="https://github.com/who-jonson/manage-pkg/blob/master/LICENSE">
    <img src="https://badgen.net/npm/license/@whoj/manage-pkg" alt="License">
  </a>
</p>

Install / Uninstall package(s) programmatically. Detect package managers automatically (`npm`, `yarn` and `pnpm`).
Skips already installed packages. Powered by [@antfu/ni](https://github.com/antfu/ni)

```bash
npm i @whoj/manage-pkg
```

### Install Package
```ts
import { installPackage } from '@whoj/manage-pkg';

await installPackage('unplugin', { dev: true });
```


### Uninstall Package
```ts
import { uninstallPackage } from '@whoj/manage-pkg';

await uninstallPackage('unplugin', { silent: true });
```


### Check if installed or not
```ts
import { checkPackageStatus } from '@whoj/manage-pkg';

// This will return false OR package's installed version number
await checkPackageStatus('unplugin');
```



## License

[MIT](./LICENSE) License © 2022 [Jonson B.](https://github.com/who-jonson)

---
_Source: https://npm.io/package/@whoj/manage-pkg · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
