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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@envshield/cli

v1.3.0

Published

CLI for EnvShield - Secure Environment Variable Manager

Readme

EnvShield CLI

Command-line interface for EnvShield - a secure environment variable manager with Git-like push/pull workflow.

Installation

For Development

cd cli
npm install
npm run build
npm link

For Production (when published)

npm install -g envshield-cli

Quick Start

# 1. Authenticate
envshield login

# 2. Initialize project
envshield init

# 3. Pull variables from remote
envshield pull

# 4. Edit your .env file
# ... make changes ...

# 5. Push changes back
envshield push

Commands

Authentication

envshield login

Authenticate with EnvShield server. Prompts for email, password, and optionally API URL.

envshield login

The authentication token is saved to ~/.envshield/config.json and is valid for 1 year.

envshield logout

Remove authentication token.

envshield logout

envshield whoami

Display current user information and token details.

envshield whoami

Project Management

envshield list

List all projects you have access to with their roles and environment counts.

envshield list

envshield init

Initialize EnvShield in the current directory. Creates a .envshield file with project and environment configuration.

envshield init

Variable Management

envshield pull

Pull environment variables from the remote server and save to .env file.

# Pull using .envshield config
envshield pull

# Pull specific environment
envshield pull --env my-project/production

# Pull to custom file
envshield pull --output .env.local

Options:

  • --env <project/environment> - Specify project and environment
  • --output <file> - Output file path (default: .env)

envshield push

Push local environment variables to the remote server.

# Push using .envshield config
envshield push

# Push specific environment
envshield push --env my-project/production

# Push from custom file
envshield push --file .env.local

Before pushing, the CLI will:

  1. Compare local and remote variables
  2. Show a diff (created/updated)
  3. Ask for confirmation

Options:

  • --env <project/environment> - Specify project and environment
  • --file <file> - Source file path (default: .env)

Configuration Files

.envshield (project config)

Created by envshield init in your project directory:

{
  "projectSlug": "my-project",
  "environment": "development"
}

~/.envshield/config.json (user config)

Created by envshield login, stores authentication:

{
  "apiUrl": "http://localhost:3000/api/v1",
  "token": "esh_...",
  "email": "[email protected]"
}

Security: This file has 0600 permissions (owner read/write only).

Environment Variables

ENVSHIELD_API_URL

Override the default API URL:

export ENVSHIELD_API_URL=https://your-envshield-instance.com/api/v1
envshield login

Example Workflow

# Initial setup
$ envshield login
? Email: [email protected]
? Password: ********
✅ Logged in as [email protected]

$ envshield init
? Select a project: My App (my-app) - DEVELOPER
? Select an environment: Development (development) - 12 variables
✅ Initialized successfully

# Pull variables
$ envshield pull
🔄 Pulling variables from my-app (development)...
✅ Pulled 12 variable(s) to .env

# Edit .env file
$ nano .env
# ... make changes ...

# Push changes
$ envshield push
📖 Reading .env...
🔄 Fetching remote variables...
✅ Remote variables fetched

Changes to be pushed:
  2 new variable(s) to create
    + NEW_FEATURE_FLAG
    + API_TIMEOUT
  1 variable(s) to update
    ~ DATABASE_URL

? This will push 3 variable(s) to my-app/development. Continue? Yes
🔄 Pushing 3 variable(s)...
✅ Pushed 3 variable(s) (2 created, 1 updated)
✅ Push completed successfully

Security Features

  • ✅ AES-256-GCM encryption for variables (server-side)
  • ✅ Bcrypt-hashed API tokens
  • ✅ Secure config file permissions (0600)
  • ✅ Role-based access control (OWNER/ADMIN/DEVELOPER/VIEWER)
  • ✅ Audit logging for all operations
  • ✅ HTTPS-only API communication

Troubleshooting

"Not authenticated" error

Run envshield login to authenticate.

"Cannot connect to EnvShield API"

Check your internet connection and verify the API URL:

envshield login  # Will prompt for API URL

".envshield file not found"

Run envshield init in your project directory first.

"You do not have permission"

Check your role with envshield whoami. You need OWNER, ADMIN, or DEVELOPER role to modify variables.

Development

Build

npm run build

Development Mode

npm run dev -- login
npm run dev -- --help

Clean

npm run clean

Documentation

For more information, visit: