https://github.com/tomashubelbauer/node-keychain
A Node script for setting and getting a secret via macOS KeyChain
https://github.com/tomashubelbauer/node-keychain
keychain macos password secret
Last synced: 2 months ago
JSON representation
A Node script for setting and getting a secret via macOS KeyChain
- Host: GitHub
- URL: https://github.com/tomashubelbauer/node-keychain
- Owner: TomasHubelbauer
- Created: 2021-01-30T17:06:25.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2022-04-14T20:37:34.000Z (about 4 years ago)
- Last Synced: 2025-06-01T16:40:21.778Z (about 1 year ago)
- Topics: keychain, macos, password, secret
- Language: JavaScript
- Homepage:
- Size: 1.95 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# Node KeyChain
This repository contains a Node script for setting and getting a secret value
from the macOS KeyChain.
## Installation
### Git
`git submodule add https://github.com/tomashubelbauer/node-keychain`
### NPM
`npm i tomashubelbauer/node-keychain`
## Usage
### `setSecret`
```js
await setSecret('account', 'service', 'password');
```
This method will fail if the secret is already set.
### `getSecret`
```js
const secret = await getSecret('account', 'service');
```