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

vercel-env-fetcher

v1.1.4

Published

--- Detailed Explanation and Usage Guide for vercel-env-fetcher ---

Downloads

40

Readme


Detailed Explanation and Usage Guide for vercel-env-fetcher

Package Name: vercel-env-fetcher

Description: The vercel-env-fetcher package is a Node.js CLI utility designed to simplify the management of environment variables within Vercel projects. It leverages the Vercel API to fetch environment variables dynamically based on a specified project ID and writes/updates the .env file. This automation saves time by eliminating the manual process of retrieving and configuring environment variables for local development or deployment environments.

Usage Guide

  1. Installation: You can get the envs' interactively by running:

    If you need to run vercel-env-fetcher globally, ensure it is installed globally:

    npm install -g vercel-env-fetcher
    npx vercel-env-fetcher

2. Setup:

Before using the package, ensure you have a Vercel account and generate a Vercel Access Token following the steps outlined in the Vercel documentation.

  • Project ID:

To obtain the Project ID:

  • Log in to your Vercel account.

  • Navigate to the dashboard or the specific project you want to fetch environment variables for.

  • The Project ID can be found in the URL when viewing the project details.

  • Vercel Access Token:

To generate a Vercel Access Token:

  • In the Vercel dashboard, click on your profile picture in the upper-right corner.

  • Select "Account Settings" from the dropdown menu.

  • In the sidebar, navigate to "Tokens".

  • Click on "Create Token".

  • Provide a name and choose the appropriate scope (usually team-specific or personal).

  • Set an expiration date for the token and click "Create Token".

  • Copy the generated token value. This token will be used to authenticate API requests when fetching environment variables.

3. Fetching Environment Variables:

You will be prompted to enter the Project ID for the Vercel project from which you want to fetch environment variables.

4. Authentication:

If prompted, provide your Vercel Access Token when prompted by the CLI tool. This token is necessary to authenticate API requests to fetch environment variables.

5. Output:

The package will fetch the environment variables associated with the provided Project ID from Vercel. It will then write these variables into a .env file, typically located in a directory named fetched-env within your project's root directory.

6. Integration:

Use the generated .env file in your local development environment to ensure consistency with the environment variables used in your Vercel deployments. This automates the process of syncing environment configurations between development and deployment environments.

Key Features:

  • Dynamic Fetching: Retrieves environment variables from Vercel projects via the Vercel API.
  • Automated Integration: Writes fetched environment variables into .env file for seamless integration with local development setups.
  • CLI Interface: User-friendly command-line interface that prompts for only the project ID and handles API authentication using a Vercel Access Token.

Note:

Ensure your Vercel Access Token is kept secure and not exposed publicly, as it provides access to your Vercel account's resources.

You can read more about the author here: @mosespace