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

@tawfiknouri/find-env

v1.1.2

Published

Find all environment variables that start with given string

Downloads

3

Readme

@tawfiknouri/find-env renovate-app badge

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

NPM 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 @tawfiknouri/find-env
$ find-env
Usage: find-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:

$ find-env TRAVIS NODE
NODE_ENV=development
TRAVIS_BRANCH=master
TRAVIS_SUDO=false
TRAVIS_NODE_VERSION=14
...

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:

$ find-env -e GH
Found environment variables that start with GH:
GH_API_KEY
GH_INSTALLATION_ID
...

exit code

If there are no variables starting with the given prefix, the tool with exit with code 1

$ find-env -e FOO
No environment variables found that start with FOO

$ echo $?
1

npx

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

$ npx @tawfiknouri/find-env --exists USER
npx: installed 1 in 0.737s
Found environment variables that start with USER:
USER

$ npx @tawfiknouri/find-env USER
npx: installed 1 in 2.272s
Found environment variables that start with USER:
USER=tawfik

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

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][email-link] / [tweet][tweet-link] / open issue on Github