# registry-js

> A simple and opinionated library for working with the Windows registry

Latest version **1.16.1** (published 2025-05-21) · MIT license · 0 weekly downloads

## Install

```sh
npm install registry-js
pnpm add registry-js
yarn add registry-js
bun add registry-js
```

## Health

**Score 45/100 (D)** — status: stable.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: stale.

## Facts

| | |
|---|---|
| Version | 1.16.1 |
| Published | 2025-05-21 |
| First published | 2017-12-03 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 33.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | yes |
| GitHub stars | 185 |
| Maintainers | joshaber, niik, shiftkey, sergiou87, tidy-dev |

## Links

- npm: https://www.npmjs.com/package/registry-js
- Repository: https://github.com/desktop/registry-js
- Homepage: https://github.com/desktop/registry-js#readme
- Issues: https://github.com/desktop/registry-js/issues
- npm.io page: https://npm.io/package/registry-js

## Dependencies (2)

- [node-addon-api](https://npm.io/package/node-addon-api.md) ^3.2.1
- [prebuild-install](https://npm.io/package/prebuild-install.md) ^5.3.5

## Recent versions

- 1.16.1 (latest) — 2025-05-21
- 1.15.0-rc1 (next) — 2021-04-22
- 1.16.0 — 2024-03-01
- 1.15.1 — 2021-05-14
- 1.15.0 — 2021-04-27
- 1.14.0 — 2021-04-09
- 1.13.0 — 2020-11-30
- 1.12.0 — 2020-09-09
- 1.11.0 — 2020-08-21
- 1.10.0 — 2020-08-19
- 1.9.0 — 2019-10-24
- 1.8.0 — 2019-07-30
- 1.7.0 — 2019-07-22
- 1.6.0 — 2019-06-24
- 1.5.0 — 2019-05-27
- … 18 more at https://npm.io/package/registry-js/versions

## README

# registry-js

## A simple and opinionated library for working with the Windows registry

## Goals

* zero dependencies
* faster than `reg.exe`
* implement based on usage - don't replicate the registry API
* leverage TypeScript declarations wherever possible

**Note:** This is currently in preview, with support for features that GitHub
Desktop and Atom require.

## Install 

```shellsession
$ npm install --save registry-js
# or
$ yarn add registry-js
```

## But Why?

The current set of libraries for interacting with the registry have some
limitations that meant we couldn't use it in GitHub Desktop:

* [`windows-registry`](https://www.npmjs.com/package/windows-registry) depends
  on `ffi` at runtime, which caused issues with webpack-ing, and was missing
  APIs we needed.
* [`winreg`](https://www.npmjs.com/package/winreg) depends on
  `reg.exe` which breaks as soon as you enable "Prevent access to registry
  editing tools" Group Policy rules (yes, even `QUERY` operations are caught by
  this). More details about this can be found in
  [desktop/desktop#3105](https://github.com/desktop/desktop/issues/3105).

After exploring other options like invoking PowerShell - which was too slow - we
decided to write our own little library to do the stuff we require by invoking
the Win32 APIs directly.

## Documentation

See the documentation under the
[`docs`](https://github.com/desktop/registry-js/tree/master/docs) folder.

## Supported versions

Each release of `registry-js` includes prebuilt binaries for the versions of
Node and Electron that are actively supported by these projects. Please refer
to the release documentation for [Node](https://github.com/nodejs/Release) and
[Electron](https://electronjs.org/docs/tutorial/support) to see what is
supported currently.

## Contributing

Read the [Setup](https://github.com/desktop/registry-js/blob/master/docs/index.md#setup)
section to ensure your development environment is setup for what you need.

This project isn't about implementing a 1-1 replication of the Windows registry
API, but implementing just enough for whatever usages there are in the wild.

If you want to see something supported, open an issue to start a discussion
about it.

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