# nofi

> If you're online, it installs/caches npm packages with --force (so you get fresh packages). If you're offline, it installs cached packages with --cache-min.

Latest version **1.2.0** (published 2016-10-20) · MIT license · 0 weekly downloads

## Install

```sh
npm install nofi
pnpm add nofi
yarn add nofi
bun add nofi
```

Provides the command `nofi`.

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.2.0 |
| Published | 2016-10-20 |
| First published | 2016-10-20 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Cory Simmons |
| Maintainers | corysimmons |

## Links

- npm: https://www.npmjs.com/package/nofi
- Repository: https://github.com/corysimmons/nofi
- Homepage: https://github.com/corysimmons/nofi#readme
- Issues: https://github.com/corysimmons/nofi/issues
- npm.io page: https://npm.io/package/nofi

## Dependencies (3)

- [meow](https://npm.io/package/meow.md) ^3.7.0
- [chalk](https://npm.io/package/chalk.md) ^1.1.3
- [is-online](https://npm.io/package/is-online.md) ^5.1.2

## Recent versions

- 1.2.0 (latest) — 2016-10-20
- 1.1.0 — 2016-10-20
- 1.0.1 — 2016-10-20
- 1.0.0 — 2016-10-20

## README

# nofi

**npm Online-First Installer**

Do you switch between online/offline environments somewhat regularly?

### Installation/Usage

- `npm i -g nofi`
- Replace all your `npm install` commands with `nofi`

### Examples

```fish
✖︎  npm install
✔︎  nofi
```
```fish
✖︎  npm install --save foo
✔︎  nofi --save foo
```
```fish
✖︎  npm install --save-dev foo
✔︎  nofi --save-dev foo
```
```fish
✖︎  npm install --save-optional foo
✔︎  nofi --save-optional foo
```

Flag aliases and installing multiple packages work as well...

- `nofi -S foo`
- `nofi -D foo bar`
- `nofi -O foo bar baz`

### How does it work?

0. Test internet connection using [is-online](https://github.com/sindresorhus/is-online).
0. If online, use `npm install --force` to install/cache the latest package.
0. If offline, use `npm install --cache-min Infinity` to install _from_ your cache (usually located in `~/.npm`).

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