# system-installer

> Get the install command for the system package manager or auto install the package

Latest version **1.1.6** (published 2020-12-22) · MIT license · 0 weekly downloads

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

## Install

```sh
npm install system-installer
pnpm add system-installer
yarn add system-installer
bun add system-installer
```

Provides the command `system-installer`.

## Health

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

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 1.1.6 |
| Published | 2020-12-22 |
| First published | 2018-02-14 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 17.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Arve Seljebu |
| Maintainers | technoexpress |
| Keywords | apt-get, choco, chocolatey, brew, pacman, nix, yum, dnf, pkg, pkg_add, emerge, zypper, nix, cross, platform, cross-platform, package, manager, installer |

## Links

- npm: https://www.npmjs.com/package/system-installer
- Repository: https://github.com/techno-express/system-installer
- Homepage: https://github.com/techno-express/system-installer#readme
- Issues: https://github.com/techno-express/system-installer/issues
- npm.io page: https://npm.io/package/system-installer

## Dependencies (1)

- [which](https://npm.io/package/which.md) ^2.0.2

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 1.1.6 (latest) — 2020-12-22
- 1.1.5 — 2020-11-08
- 1.1.4 — 2020-11-07
- 1.1.3 — 2020-11-06
- 1.1.2 — 2020-11-06
- 1.1.1 — 2020-11-06
- 1.1.0 — 2018-08-29
- 1.0.9 — 2018-08-29
- 1.0.8 — 2018-08-28
- 1.0.7 — 2018-02-16
- 1.0.6 — 2018-02-14
- 1.0.5 — 2018-02-14

## README

system-installer
=======
[![NPM](https://nodei.co/npm/system-installer.png)](https://nodei.co/npm/system-installer/)

[![Dependencies Status](http://img.shields.io/david/techno-express/system-installer.svg)](https://david-dm.org/techno-express/system-installer) [![Node.js CI](https://github.com/techno-express/system-installer/workflows/Node.js%20CI/badge.svg)](https://github.com/techno-express/system-installer/actions) [![codecov](https://codecov.io/gh/techno-express/system-installer/branch/master/graph/badge.svg?token=nups0UsVPw)](https://codecov.io/gh/techno-express/system-installer) [![Maintainability](https://api.codeclimate.com/v1/badges/54f89d3ae887724ceb93/maintainability)](https://codeclimate.com/github/techno-express/system-install/maintainability) [![Release](http://img.shields.io/npm/v/system-installer.svg)](https://www.npmjs.org/package/system-installer)

> Get the install command or install a package using the system packaging manager, e.g. `sudo apt-get install` for Debian-based systems.

This package has been replaced with [node-sys](https://www.npmjs.com/package/node-sys).

`system-installer` will try to find which system packaging is installed for the given `process.platform`. If no system package manager is found, `'your_package_manager install'` is returned.

## Install

```sh
npm install system-installer
```

## Usage

### Node

```js
const sysInstaller = require('system-installer').packager();
/* - 'brew install' on OS X if homebrew is installed.
 * - 'sudo apt-get install' on debian platforms.
 * - 'sudo yum install' on red hat platforms.
 * - 'your_package_manager install' if no package manager is found.
 *
 * Throws if `process.platform` is none of darwin, freebsd, linux, sunos or win32.
 */

console.log(`Please install pandoc: ${sysInstaller.installerCommand} pandoc`);
```

### Install `vim` package onto host, using system's default package manager

* Returns a Promise

```sh
const sysInstaller = require('system-installer').installer;
sysInstaller('vim')
.then(function(data){
    // returns installation output
    console.log(data);
})
.catch(function(err) {
    console.log(err);
});
```

### CLI

```sh
$ npm i -g system-installer
$ system-installer
brew install
```

## Supported package managers

### FreeBSD
- [pkg]
- [pkg_add]

### Linux
- [apt-get] - Debian, Ubuntu
- [dnf] - fedora
- [emerge] - Gentoo
- [nix] - NixOS
- [pacman] - ArchLinux
- [yum] - fedora
- [zypper] - OpenSUSE
- [chromebrew] - Chrome OS

### OS X
- [brew]
- [pkgin]
- [port]

### Solaris
- [pkg](https://docs.oracle.com/cd/E23824_01/html/E21802/gihhp.html)

### Windows
- [chocolatey]

[apt-get]: https://help.ubuntu.com/community/AptGet/Howto
[brew]: http://brew.sh
[pacman]: https://wiki.archlinux.org/index.php/pacman
[yum]: https://fedoraproject.org/wiki/Yum
[dnf]: https://fedoraproject.org/wiki/Dnf
[nix]: https://nixos.org/nix/
[zypper]: https://en.opensuse.org/Portal:Zypper
[emerge]: https://wiki.gentoo.org/wiki/Portage
[port]: https://guide.macports.org/#using.port
[pkgin]: https://github.com/cmacrae/saveosx
[pkg]: https://www.freebsd.org/doc/handbook/pkgng-intro.html
[pkg_add]: https://www.freebsd.org/cgi/man.cgi?query=pkg_add&manpath=FreeBSD+7.2-RELEASE
[chocolatey]: https://chocolatey.org
[chromebrew]: https://github.com/skycocker/chromebrew

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