# unleash-client

> Unleash Client for Node

Latest version **6.12.1** (published 2026-08-14) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install unleash-client
pnpm add unleash-client
yarn add unleash-client
bun add unleash-client
```

## Health

**Score 70/100 (B)** — status: active.

Positive: has types; no vulnerabilities; has provenance; recently updated; high maintenance score; high quality score.

Warnings: low downloads; no esm support.

## Facts

| | |
|---|---|
| Version | 6.12.1 |
| Published | 2026-08-14 |
| First published | 2015-03-12 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | bundled |
| Module format | CommonJS |
| Node | >=20 |
| Dependencies | 10 |
| Unpacked size | 317.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 226 |
| Maintainers | ivarconr, foseberg, chriswk |
| Keywords | unleash, client, feature toggle |

## Links

- npm: https://www.npmjs.com/package/unleash-client
- Repository: https://github.com/Unleash/unleash-node-sdk
- Issues: https://github.com/Unleash/unleash-node-sdk/issues
- npm.io page: https://npm.io/package/unleash-client

## Dependencies (10)

- [re2js](https://npm.io/package/re2js.md) ^2.3.2
- [semver](https://npm.io/package/semver.md) ^7.7.3
- [lru-cache](https://npm.io/package/lru-cache.md) ^11.2.5
- [ip-address](https://npm.io/package/ip-address.md) ^10.0.0
- [murmurhash3js](https://npm.io/package/murmurhash3js.md) ^3.0.1
- [proxy-from-env](https://npm.io/package/proxy-from-env.md) ^1.1.0
- [http-proxy-agent](https://npm.io/package/http-proxy-agent.md) ^7.0.2
- [https-proxy-agent](https://npm.io/package/https-proxy-agent.md) ^7.0.5
- [make-fetch-happen](https://npm.io/package/make-fetch-happen.md) ^15.0.3
- [launchdarkly-eventsource](https://npm.io/package/launchdarkly-eventsource.md) 2.2.0

## Alternatives

- [launchdarkly-js-client-sdk](https://npm.io/package/launchdarkly-js-client-sdk.md) — 2.5M weekly downloads
- [@elastic/elasticsearch](https://npm.io/package/@elastic/elasticsearch.md) — 2.1M weekly downloads
- [@c8y/client](https://npm.io/package/@c8y/client.md) — 15.3K weekly downloads
- [@signaldb/maverickjs](https://npm.io/package/@signaldb/maverickjs.md) — 1.7K weekly downloads
- [@bbc/http-transport-cache](https://npm.io/package/@bbc/http-transport-cache.md) — 1.2K weekly downloads

## Recent versions

- 6.12.1 (latest) — 2026-08-14
- 6.12.0-beta.1 (beta) — 2026-08-07
- 6.3.0-alpha.0 (alpha) — 2024-12-09
- 3.2.3-frontend.0 (frontend) — 2019-05-04
- 1.0.0-beta.1 (next) — 2016-11-06
- 6.12.0 — 2026-08-07
- 6.12.0-beta.0 — 2026-07-16
- 6.11.1 — 2026-06-29
- 6.11.0 — 2026-05-11
- 6.10.1 — 2026-03-05
- 6.10.0 — 2026-03-04
- 6.9.7-beta.0 — 2026-02-19
- 6.9.6 — 2026-02-03
- 6.9.5 — 2026-01-28
- 6.9.4 — 2026-01-26
- … 151 more at https://npm.io/package/unleash-client/versions

## README

[![Unleash node SDK on npm](https://img.shields.io/npm/v/unleash-client)](https://www.npmjs.com/package/unleash-client)
![npm downloads](https://img.shields.io/npm/dm/unleash-client)
[![Build Status](https://github.com/Unleash/unleash-node-sdk/actions/workflows/build-and-test.yaml/badge.svg)](https://github.com/Unleash/unleash-node-sdk/actions)
[![Coverage Status](https://coveralls.io/repos/github/Unleash/unleash-node-sdk/badge.svg?branch=main)](https://coveralls.io/github/Unleash/unleash-node-sdk?branch=main)

# unleash-node-sdk

The official Unleash SDK for Node.js. This SDK lets you evaluate feature flags in your Node.js services and applications.

[Unleash](https://github.com/Unleash/unleash) is an open-source feature management platform. You can use this SDK with [Unleash Enterprise](https://www.getunleash.io/pricing) or [Unleash Open Source](https://github.com/Unleash/unleash).

For complete documentation, see the [Node.js SDK reference](https://docs.getunleash.io/sdks/node).

## Requirements

- Node.js 20 or later

## Installation

```bash
npm install unleash-client
```

## Quick start

The following example initializes the SDK and checks a feature flag:

```js
import { startUnleash } from 'unleash-client';

const unleash = await startUnleash({
  url: 'https://<your-unleash-instance>/api/',
  appName: 'my-node-name',
  customHeaders: { Authorization: '<your-backend-token>' },
});

const enabled = unleash.isEnabled('my-feature');
if (enabled) {
  // new behavior
}

const variant = unleash.getVariant('checkout-experiment');
if (variant.name === 'blue') {
  // blue variant behavior
} else if (variant.name === 'green') {
  // green variant behavior
}
```

## Contributing

### Local development

Clone the repository and install dependencies:

```bash
git clone https://github.com/Unleash/unleash-node-sdk.git
cd unleash-node-sdk
yarn install
yarn prepare
```

`yarn prepare` sets up git hooks and builds the project. It doesn't run automatically on install because dependency lifecycle scripts are disabled (see `.yarnrc`) as a supply-chain hardening measure.

The [client specification](https://github.com/Unleash/client-specification) test data is included as a dev dependency (`@unleash/client-specification`). It defines a shared contract that all Unleash SDKs test against.

### Running tests

```bash
yarn test        # run tests
yarn coverage    # run tests with coverage
```

### Benchmarking

Run the feature flag evaluation benchmark:

```bash
yarn bench:isEnabled
```

### Code style and formatting

The project uses [Biome](https://biomejs.dev/) for linting and formatting:

```bash
yarn lint        # check for issues
yarn lint:fix    # auto-fix issues
```

### Building

```bash
yarn build       # compile TypeScript to lib/
```

## License

Apache-2.0

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