# ci

> Run npm ci using the appropriate Node package manager (npm, yarn, pnpm)

Latest version **2.3.0** (published 2023-08-09) · MIT license · 0 weekly downloads

## Install

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

Provides the command `ci`.

## Health

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

Positive: no vulnerabilities; high maintenance score.

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

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 2.3.0 |
| Published | 2023-08-09 |
| First published | 2014-02-04 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 7.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 61 |
| Author | Hiroki Osame |
| Maintainers | hirokiosame |
| Keywords | npm, yarn, pnpm, ci |

## Links

- npm: https://www.npmjs.com/package/ci
- Repository: https://github.com/privatenumber/ci
- Homepage: https://github.com/privatenumber/ci#readme
- Issues: https://github.com/privatenumber/ci/issues
- Funding: https://github.com/privatenumber/ci?sponsor=1
- npm.io page: https://npm.io/package/ci

## Alternatives

- [random-seedable](https://npm.io/package/random-seedable.md) — 27.9K weekly downloads
- [n2words](https://npm.io/package/n2words.md) — 22.2K weekly downloads
- [@stdlib/math-base-special-factorialln](https://npm.io/package/@stdlib/math-base-special-factorialln.md) — 5.7K weekly downloads
- [@stdlib/math-base-special-abs2](https://npm.io/package/@stdlib/math-base-special-abs2.md) — 1.7K weekly downloads
- [commons-math-interpolation](https://npm.io/package/commons-math-interpolation.md) — 1.4K weekly downloads

## Recent versions

- 2.3.0 (latest) — 2023-08-09
- 2.2.0 — 2022-05-03
- 2.1.1 — 2021-05-06
- 2.1.0 — 2021-04-11
- 2.0.0 — 2021-01-30
- 1.0.0 — 2016-10-14
- 0.0.5 — 2014-04-02
- 0.0.4 — 2014-02-18
- 0.0.3 — 2014-02-18
- 0.0.2 — 2014-02-18
- 0.0.1 — 2014-02-04

## README

# npx ci [![Latest version](https://badgen.net/npm/v/ci)](https://npm.im/ci) [![npm downloads](https://badgen.net/npm/dm/esbuild-loader)](https://npm.im/esbuild-loader)

A safer [`npm ci`](https://docs.npmjs.com/cli/v8/commands/npm-ci).

Run it in any npm project to install dependencies from lock using the appropriate package-manager (supports [npm](https://docs.npmjs.com/cli/v7/commands/npm), [yarn](https://yarnpkg.com/) and [pnpm](https://pnpm.io/)).

<br>

<p align="center">
	<a href="https://privatenumber-sponsors.vercel.app/api/sponsor?tier=platinum">
		<picture>
			<source width="830" media="(prefers-color-scheme: dark)" srcset="https://privatenumber-sponsors.vercel.app/api/sponsor?tier=platinum&image=dark">
			<source width="830" media="(prefers-color-scheme: light)" srcset="https://privatenumber-sponsors.vercel.app/api/sponsor?tier=platinum&image">
			<img width="830" src="https://privatenumber-sponsors.vercel.app/api/sponsor?tier=platinum&image" alt="Premium sponsor banner">
		</picture>
	</a>
</p>

## Usage

Use in your npm project instead of [`npm ci`](https://docs.npmjs.com/cli/v8/commands/npm-ci):
```sh
npx ci
```

## Why?

npm has a [`npm ci`](https://docs.npmjs.com/cli/v8/commands/npm-ci) command to install dependencies from the lock file (eg. `package-lock.json`), ensuring all project contributors have the same dependencies.

This command is different across 3rd-party package-managers like [yarn](https://yarnpkg.com/) and [pnpm](https://pnpm.io/), and can be confusing to remember when switching between projects.


This is where `npx ci` comes in:

- **Package-manager agnostic**

	`npx ci` is a package-manager agnostic `npm ci`. You can run this in any project and dependencies will be installed appropriately.
	
	It's great for contributing to new projects!

- **Can use in any environment with a single command**

	If yarn or pnpm isn't already installed, `npx ci` installs it for you.
	
	It's great for using it in CI/CD workflows!
	

- **Typo proof**

	When you accidentally type _npx_ when typing in `npm ci`, your dependencies still get installed.
	
	It's actually the _safer_ option too!

<br>

<p align="center">
	<a href="https://privatenumber-sponsors.vercel.app/api/sponsor?tier=gold">
		<picture>
			<source width="830" media="(prefers-color-scheme: dark)" srcset="https://privatenumber-sponsors.vercel.app/api/sponsor?tier=gold&image=dark">
			<source width="830" media="(prefers-color-scheme: light)" srcset="https://privatenumber-sponsors.vercel.app/api/sponsor?tier=gold&image">
			<img width="830" src="https://privatenumber-sponsors.vercel.app/api/sponsor?tier=gold&image" alt="Premium sponsor banner">
		</picture>
	</a>
</p>

## FAQ

### Can it detect the package manager without a lock file?

It's possible to detect the package manager using other signals (eg [`package.json#packageManager`](https://nodejs.org/api/packages.html#packagemanager), `.yarnrc.yml`).

However, since `npx ci` is strictly an alternative to `npm ci`, a lock file is necessary to do a _clean_/_immutable_/_frozen_ install.

## Related

- [`npx link`](https://github.com/privatenumber/link) - A safer `npm link`.

## Sponsors

<p align="center">
	<a href="https://privatenumber-sponsors.vercel.app/api/sponsor?tier=silver1">
		<picture>
			<source width="410" media="(prefers-color-scheme: dark)" srcset="https://privatenumber-sponsors.vercel.app/api/sponsor?tier=silver1&image=dark">
			<source width="410" media="(prefers-color-scheme: light)" srcset="https://privatenumber-sponsors.vercel.app/api/sponsor?tier=silver1&image">
			<img width="410" src="https://privatenumber-sponsors.vercel.app/api/sponsor?tier=silver1&image" alt="Premium sponsor banner">
		</picture>
	</a>
	<a href="https://privatenumber-sponsors.vercel.app/api/sponsor?tier=silver2">
		<picture>
			<source width="410" media="(prefers-color-scheme: dark)" srcset="https://privatenumber-sponsors.vercel.app/api/sponsor?tier=silver2&image=dark">
			<source width="410" media="(prefers-color-scheme: light)" srcset="https://privatenumber-sponsors.vercel.app/api/sponsor?tier=silver2&image">
			<img width="410" src="https://privatenumber-sponsors.vercel.app/api/sponsor?tier=silver2&image" alt="Premium sponsor banner">
		</picture>
	</a>
</p>

<p align="center">
	<a href="https://github.com/sponsors/privatenumber">
		<img src="https://cdn.jsdelivr.net/gh/privatenumber/sponsors/sponsorkit/sponsors.svg">
	</a>
</p>

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