New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@bahmutov/print-env

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@bahmutov/print-env

Prints all environment variables that start with given string

  • 2.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
7.9K
decreased by-35.93%
Maintainers
1
Weekly downloads
 
Created
Source

@bahmutov/print-env renovate-app badge

Prints all environment variables that start with given string(s)

NPM

Build status semantic-release js-standard-style

Installation and usage

Requires Node version 6 or above.

Usually on your CI, you can just install this CLI tool globally

npm install -g @bahmutov/print-env
$ print-env
Usage: print-env [options] <PREFIX>...

Finds and prints the names and values of all environment variables present that start with any of the PREFIXes

Options:
  -e, --exists  Print only variable names
  -h, --help    display help for command

Call the tool with 1 or more prefixes, for example to show all vars beginning with TRAVIS or NODE:

$ print-env TRAVIS NODE
NODE_ENV=development
TRAVIS_BRANCH=master
TRAVIS_SUDO=false
TRAVIS_NODE_VERSION=8
TRAVIS_PRE_CHEF_BOOTSTRAP_TIME=2017-08-29T02:16:18
...

Variables are sorted alphabetically.

You can also check if sensitive variables are present using the -e|--exists command with the desired prefixes, in which case only the names of environment variables are printed:

$ print-env -e GH
Found environment variables:
GH_API_KEY
GH_INSTALLATION_ID
...

npx

You can run this tool without installing it permanently using npx command

$ npx @bahmutov/print-env --exists USER
npx: installed 1 in 0.737s
Found environment variables:
USER

$ npx @bahmutov/print-env USER
npx: installed 1 in 1.975s
Found environment variables:
USER=gleb

Publishing new version

New versions are automatically published to NPM from CI using semantic-release tool. In order for new version to be published, there should be commits since the last published version that have the subject with semantic convention.

fix: stop graphite breaking when too much pressure applied | patch release
feat: explain the feature | minor release

When making pull request, edit the title of the squashed commit - this is what semantic release will look at to decide if a new version should be published or not. If you forget, no big deal, just push an empty commit with desired release subject

git commit --allow-empty -m "feat: new exciting feature"
git push

About

Author

Gleb Bahmutov <gleb.bahmutov@gmail.com> © 2017

Collaborators

License

MIT - do anything with the code, but don't blame me if it does not work.

Support

If you find any problems with this module, email / tweet / open issue on Github

Keywords

FAQs

Package last updated on 24 Mar 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc