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

  • 1.2.1
  • Source
  • npm
  • Socket score

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

@bahmutov/print-env

Prints all environment variables that start with given string

NPM

Build status semantic-release js-standard-style

Install and use

Requires Node version 6 or above.

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

npm install @bahmutov/print-env

Then call the tool with prefix, for example to show all Travis vars

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

Variables are sorted alphabetically.

has-env

You can also check if sensitive variables are present using has-env PREFIX syntax. In that case the values are not printed, only "present: true"

$ has-env GH
GH_API_KEY is present: true
GH_INSTALLATION_ID is present: true
...

npx

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

$ npx -p @bahmutov/print-env has-env USER
npx: installed 1 in 0.737s
USER is present: true

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

The CLI argument -p is an alias to --package and tells npx which package to install, followed by the command alias (has-env or print-env) and its arguments.

Small print

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

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

MIT License

Copyright (c) 2017 Gleb Bahmutov <gleb.bahmutov@gmail.com>

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Keywords

FAQs

Package last updated on 18 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