@nex-x-spark/env-vault
v1.0.8
Published
Nex-X ENV Vault Developer CLI - Secure secret pulling and process environment injection
Readme
@nex-x-spark/env-vault
Nex-X ENV Vault Developer CLI — Secure environment variable management and zero-file memory process injection.
The official command-line tool for Nex-X ENV Vault. Developers can authenticate via browser OAuth, pull decrypted environment variables, and run applications securely without persisting secrets to local .env files on disk.
📦 Installation
Install globally via npm:
npm install -g @nex-x-spark/env-vaultOr run directly without installing using npx:
npx @nex-x-spark/env-vault login🚀 Quickstart & Commands
1. Login to Vault (Browser OAuth Flow)
Run login to authenticate seamlessly through your web browser:
nexenv login- Opens your browser with a Verification Code (e.g.
NX-4821). - Click Approve & Authorize CLI in the web dashboard.
- Your terminal is instantly authenticated!
Non-Browser / CI / Headless Login:
# Interactive prompt in terminal:
nexenv login --interactive
# Direct flag authentication:
nexenv login --email [email protected] --password Password123! --server https://your-api.workers.dev2. Verify Session (whoami)
Check your current authenticated session, user details, and active organization:
nexenv whoami3. List Projects (projects)
View all accessible projects, environments, and secrets count:
nexenv projects4. Create a New Project (project:create) ⭐ NEW
Create a new project vault in your active organization directly from the terminal:
# Interactive creation:
nexenv project:create
# Direct creation:
nexenv project:create mms-laptop-ERP -d "Laptop ERP System Secrets"5. Push Secrets to Vault (push) ⭐ NEW
Encrypt and push variables from your local .env file to your organization's vault project:
# Push .env to development environment (default):
nexenv push GymFlow --env development
# Push specific file (e.g. .env.production) to production environment:
nexenv push GymFlow --env production -f .env.production
# Interactive selection if project name is omitted:
nexenv push5. Pull Secrets to .env.local (pull)
Fetch decrypted environment variables into a local file (e.g. .env.local):
# Pull development secrets (default):
nexenv pull GymFlow --env development
# Pull production secrets:
nexenv pull GymFlow --env production
# Specify custom output file:
nexenv pull GymFlow --env staging -o .env.staging6. Zero-Disk Process Secret Injection (run) ⭐ Recommended
Run your application with secrets injected directly into child process memory without creating plaintext files on disk:
# Run Next.js / Vite / Node app with injected development secrets:
nexenv run GymFlow --env development -- npm run dev
# Run Docker or build commands:
nexenv run GymFlow --env production -- npm run build6. Logout (logout)
Clear stored local tokens and session configuration:
nexenv logout🛠️ CLI Options Reference
| Command | Arguments | Options | Description |
| :--- | :--- | :--- | :--- |
| login | None | -s, --server <url>, -w, --web <url>, -i, --interactive, -e, --email <email>, -p, --password <pass> | Authenticate via browser or terminal |
| whoami | None | None | Display current active user and org |
| projects | None | None | List accessible projects & environments |
| pull | [project] | --env <env>, -o, --output <file> | Download decrypted secrets to file |
| run | <project> <cmd...> | --env <env> | Injects secrets into process memory |
| logout | None | None | Clears cached local session |
🏢 About Nex-X Spark
Nex-X Spark builds high-performance, developer-first enterprise security and productivity tools.
- Website: nexxspark.com
- YouTube: Nex-X Spark Channel
- Instagram: @nex_x_spark
- WhatsApp Contact: +91 9363582044
📄 License
MIT © Nex-X Spark
