New:Introducing Socket Scanning for VS Code Marketplace Extensions.Learn more →
Get Started

nvenv-cli

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nvenv-cli

nv CLI - Environment variable management with Vercel-like DX

latest
Source
npmnpm
Version
0.1.3
Version published
Maintainers
1
Created
Source

nv CLI

Environment variable management with Vercel-like developer experience.

Installation

npm install -g nvenv-cli
# or
bun add -g nvenv-cli
# or
pnpm add -g nvenv-cli

Quick Start

# Authenticate with your nv account
nv login

# List your workspaces
nv list

# Link to a workspace
nv link --workspace <workspace-id>

# Pull environment variables
nv pull --env production

# Pull to a custom file
nv pull --env development --output .env.local

Commands

nv login

Authenticate with nv via browser. This will:

  • Generate a unique verification code
  • Open your browser for confirmation
  • Save your authentication token locally
nv login

nv logout

Log out from your nv account and remove stored credentials.

nv logout

nv list (alias: ls)

List all your workspaces.

nv list
# or
nv ls

Link the current directory to a workspace. Once linked, you can use nv pull without specifying the workspace ID.

# Link to a workspace
nv link --workspace <workspace-id>

# Show current linked workspace
nv link

Options:

  • -w, --workspace <id> - Workspace ID to link

nv pull

Pull environment variables from a workspace and save them to a local file.

# Pull development variables (default)
nv pull

# Pull production variables
nv pull --env production

# Pull from a specific workspace
nv pull --workspace <workspace-id> --env production

# Save to a custom file
nv pull --env production --output .env.production.local

Options:

  • -e, --env <env> - Environment (production, preview, development). Default: development
  • -w, --workspace <id> - Workspace ID (optional if linked)
  • -o, --output <file> - Output file path. Default: .env.<env>.local

Configuration

The CLI stores configuration in your system's config directory:

  • macOS: ~/Library/Preferences/nv-cli-nodejs
  • Linux: ~/.config/nv-cli
  • Windows: %APPDATA%\nv-cli\Config

Configuration includes:

  • apiUrl - API endpoint (default: https://nvenv.dev)
  • accessToken - Authentication token
  • currentWorkspace - Linked workspace ID

Environment Variables

You can customize the API URL using an environment variable:

export NV_API_URL=https://your-nv-instance.com
nv login

Examples

Typical Workflow

# 1. Login
nv login

# 2. List workspaces to find the one you need
nv list

# 3. Link to your project workspace
nv link --workspace abc123

# 4. Pull production variables
nv pull --env production

# 5. Pull development variables for local development
nv pull --env development --output .env.local

CI/CD Integration

For CI/CD environments, you can skip the link step by always specifying the workspace:

nv pull --workspace $WORKSPACE_ID --env production --output .env.production

License

MIT

Keywords

environment

FAQs

Package last updated on 25 Dec 2025

Related posts