npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

envinos

v1.0.6

Published

Sync your local environment variables from external source shared among developers

Downloads

7,545

Readme

Sync and share your local environment variables from AWS Secrets Manager service among developers

[!NOTE] Currently only support AWS Secrets Manager, but in the future, may support other external stores with dedicated plugins

[!IMPORTANT] You must have the AWS CLI configured (logged in to AWS with your credentials) Read here for the setup: https://docs.aws.amazon.com/cli/latest/userguide/getting-started-quickstart.html

Usage

To use the package you first need to install it as dev dependency:

npm i -D envinos

Then you need to configure your package.json#scripts with:

{
	"postinstall": "envinos"
}

This will automatically sync the environment variables from AWS Secrets Manager service once any developer in the team will run npm i.

Configuration

You can specify the configuration of Envinos through various options, but one must be provided. Configuration can be set in the following files (can be configured in home directory or in the root folder of your project):

  • a package.json property: "envinos": {...} or in ~/package.json, for example
  • a .envinosrc file in JSON or YAML format
  • a .envinosrc.json, .envinosrc.yaml, .envinosrc.yml, .envinosrc.js, or .envinosrc.cjs file
  • a envinos.config.ts, envinos.config.js, or envinos.config.cjs CommonJS module exporting an object

Configuration Options

  • secrets (required): an array of objects, where you configure multiple environment variables files.
  • secrets.*.label (optional) - Label of the environment variables
  • secrets.*.key (required) - The AWS Secrets Manager entry identifier, where the secrets will be fetched from
  • secrets.*.filePath (required) - The file path where the environment variables will be stored
  • skipKeyword (optional): sometimes, you have some environment variables that should be configured per each developer and not shared. You can set an explicit keyword, so Envinos won't override the variables with this keyword. For example, if you set it to "TODO" and set the value of variable "MY_ENV" in AWS Secrets Manager with value of "TODO" - Envinos won't override this variable "MY_ENV" (which might have been configured manually by the developer).
  • region (optional): A valid AWS region - where you store your secrets in the AWS Secrets Manager service. If you don't provide this field, Envinos will fail, unless you have AWS_REGION configured in the user environment variables.

Configuration Schema

You can get the schema with JSONSchema, TypeScript or JSDoc, in order to have auto-completions for your configuration file.

import statement (TypeScript & JSDoc):

import type { EnvinosConfig } from 'envinos';

$schema field (JSON):

{
	"$schema": "./node_modules/envinos/schema.json"
}

Authors

License

MIT