# kychain

> Store password in the macOS Keychain.

Latest version **2.0.0** (published 2022-03-05) · MIT license · 0 weekly downloads

## Install

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

## Health

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

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.0 |
| Published | 2022-03-05 |
| First published | 2019-03-24 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Node | >= 14 |
| Dependencies | 0 |
| Unpacked size | 9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Matthias Giger |
| Maintainers | naminho, tobua |
| Keywords | password, macOS, keychain |

## Links

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

## Recent versions

- 2.0.0 (latest) — 2022-03-05
- 1.0.0 — 2019-03-24

## README

<p align="center">
  <img src="https://raw.githubusercontent.com/tobua/kychain/main/logo.png" alt="kychain">
</p>

# kychain

> Store passwords in the macOS Keychain

## Installation

```
npm install kychain
```

## Usage

```js
import { get, set, remove } from 'kychain'

await set('hello_world')
const password = await get() // => password = 'hello_world'
await remove()
```

## Interface

`set(password, account, service, type)`

`get(account, service, type)`

`remove(account, service, type)`

`password: string` The password to be stored.

`account: string` Account under which the password should be stored, defaults to OS username.

`service: string` The name for the service under which to store the password, defaults to `kychain`.

`type: string` The password type can be `internet` or `generic` (the default).

# License

MIT, keychain access mostly taken from [keychain](https://www.npmjs.com/package/keychain) by Nicholas Penree.

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