SuperAPI AI Directory

environment-manager

General & other

View repository

Updated 10-15 21:04

About this skill

Environment Manager Skill

This skill supports environment variable management.

Main Features

  • .env file generation: Template creation
  • Environment variable validation: Required item check
  • Security: Handling of sensitive information
  • Documentation: Variable descriptions

.env template

# Database
DATABASE_URL=postgresql://user:password@localhost:5432/myapp
DATABASE_POOL_SIZE=10
Redis

REDIS_URL=redis://localhost:6379 REDIS_TTL=3600

API Keys (Never commit actual keys!)

STRIPE_SECRET_KEY=sk_test_... SENDGRID_API_KEY=SG...

App Config

NODE_ENV=development PORT=3000 LOG_LEVEL=debug

JWT

JWT_SECRET=your-secret-key-here JWT_EXPIRES_IN=7d


## .env.example

```bash
# Database Configuration
DATABASE_URL=postgresql://user:password@host:5432/dbname

# API Keys (Get from https://dashboard.stripe.com)
STRIPE_SECRET_KEY=

# Application
NODE_ENV=development
PORT=3000

Environment variable validation

// config/env.js
const requiredEnvVars = [
  'DATABASE_URL',
  'REDIS_URL',
  'JWT_SECRET'
];

function validateEnv() {
  const missing = requiredEnvVars.filter(key => !process.env[key]);

  if (missing.length > 0) {
    throw new Error(`Missing required environment variables: ${missing.join(', ')}`);
  }
}

validateEnv();

Version information

  • Version: 1.0.0