← All tools

node-credstasher

Popularity 65 Updated Development & Build

A TypeScript implementation of credstash for storing and retrieving secrets using AWS KMS and DynamoDB.

npmauto-collected

Installation

npm
npm install -g node-credstasher

Install with npm.

node-credstasher

A TypeScript implementation of the python credstash for storing and retrieving secrets using AWS KMS and DynamoDB.

This code is based on the now defunct node-credstash library, but has been updated to TypeScript with up-to-date dependencies.

Setup

Before using credstasher, you need to:

  • Set up AWS credentials (AWS CLI, environment variables, or IAM roles)
  • Create a KMS key or use an existing one
  • Optionally create a DynamoDB table (the library can create it for you, but it's better if you set up before)

CLI Usage

Install or not

You can install globally using the node package manager of your choice:

npm install -g node-credstasher

# or

pnpm add -g node-credstasher

# or

bun add -g node-credstasher

After it is installed, you should be able to run the following to show the docs:

credstasher --help

Yuu can also run using npx, pnpx, etc. downloading it to run on the fly. This is kind of nice.

npx node-credstasher@latest --help

# or

pnpx node-credstasher@latest --help

# or

bunx node-credstasher@latest --help

Commands

#### Setup the DynamoDB table

⚠️ I don't recommend using this. Set up your table in a more managed way, probably. But, you can do it this way if you like.

credstasher setup