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

envys

v1.0.4

Published

Most repos online, mostly Node.js projects, does not contain ".env.example" file though environment environment are generally required for these projects to run.

Downloads

9

Readme

Problem:

Most repos online, mostly Node.js projects, does not contain ".env.example" file though environment environment are generally required for these projects to run.

To fix this, you can do it manually by looking for envs, and adding them to your .env file, but that is a boring and a time-consuming task.

Inorder to automate this task, I decided to create this tool and named it as "envy". It is written in go, and makes use of go's powerful concurrency for efficiency. Currently, this tool supports only nodejs projects.

The goal of this progam/tool is to make setting up the environment variables for your project much easier and faster.

"Envys" is available for installation via npm:

npm install envys

After installation, please add it to your package.json's scripts section:

"scripts": {
  "envys": "envys"
}

Once, you have added the script, you can run it by the following command:

npm run envys

The program will scan all directories and files in your project, extract environment variables, and write them to a ".env.example" file. This makes setting up the environment for your project much easier and faster.

Build and Run:

If you prefer to build the program directly from the source code, you can do so by cloning the repository and building the Go executable. Once built, you can run the executable in your specific Node.js project directory. It scans all the dirs and files, extracts env variables, and then writes it in the ".env.example" file.

  1. Clone the Repo:
git clone https://github.com/CoderParth/envy.git
  1. Build the tool:
go build 
  1. Copy the executable file "envy" and then run the tool in your specified directory:
./envy

After a successful run, ".env.example" will be created with all the envs written in the file.

Tests

After cloning the repo, you can run a test in this same cloned dir.

go test

This dir contains a nested dir called "test_dir", which contains some env variables inside some files. After execution, something like below will be printed.

DB_URL=
AWS_ACCESS_KEY_ID=
AWS_ACCESS_KEY_SECRET=
SENDGRID_API_KEY=
FROM_EMAIL=
API_KEY=
API_SECRET=
JWT_SECRET=
REDIS_URL=
COOKIE_SECRET=

PASS
ok      github.com/CoderParth/envy      0.559s