Skip to content

Huruf-Tech/EnvHub

Β 
Β 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

32 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

EnvHub

Secure, Versioned Environment Variable Management for Teams.

EnvHub helps you manage secrets across projects, services, and environments with a Git-like workflow. It includes a beautiful web dashboard and a powerful CLI.

image image Screenshot 2026-02-15 200203 image Screenshot 2026-01-31 233804 Screenshot 2026-02-15 165924

Features

  • πŸ”’ Secure Storage: Secrets are encrypted at rest using Fernet (AES-128).
  • πŸ“œ Version History: Track every change (who changed what, when, and why).
  • 🏒 Organization-Ready: Gate access to your GitHub Organization (ALLOWED_ORGS).
  • πŸ’» Cross-Platform CLI: Python-based CLI for Windows, Mac, and Linux.
  • ☁️ Serverless: Built on Next.js and Vercel Blob (No database required).

πŸš€ How to Deploy (For Your Organization)

You can deploy your own private instance of EnvHub in minutes.

1. Prerequisites

  • A GitHub Account (or Organization).
  • A Vercel Account.

2. Deploy to Vercel

Clone this repository and deploy it to Vercel.

git clone https://github.com/Harivelu0/EnvHub.git
cd EnvHub
vercel deploy

3. Configure Environment Variables (Critical for Security)

To ensure your instance is 100% Secure and private to your organization, you must set these variables in Vercel:

πŸ” Authentication & Access

Variable Description
GITHUB_ID Required. Create a New OAuth App on GitHub. This allows users to "Login with GitHub".
GITHUB_SECRET Required. The secret key from your GitHub OAuth App.
ALLOWED_ORGS CRITICAL. Comma-separated list of GitHub Organizations (e.g., MyCompany,OpenAI).
βœ… Security Guarantee: Only users who are public members of these organizations can log in. Everyone else is rejected.
⚠️ IMPORTANT: Users must explicitly Grant Access to the Organization in their GitHub Settings -> Applications -> Authorized OAuth Apps. If they don't, GitHub hides their membership, and they will get "Access Denied".
ALLOWED_USERS (Optional) Restrict access to specific GitHub handles (e.g., octocat).

πŸ—„οΈ Data Ownership

Variable Description
BLOB_READ_WRITE_TOKEN Required. Go to Vercel Storage -> Create Database -> Blob.
Copy the Read/Write Token. This is where your secrets live.
ENVHUB_MASTER_KEY Required. Run the python command found in .env.example to generate this.
βœ… Encryption: All variables are encrypted before they are saved.

βš™οΈ Standard Config

Variable Value
NEXTAUTH_SECRET A random string (run openssl rand -base64 32).
NEXTAUTH_URL Your Vercel deployment URL (e.g., https://envhub-mycompany.vercel.app).
NEXT_PUBLIC_ENABLE_DEMO_MODE Set to false (default). Only set to true for public demos (Sandboxed).

4. Finalizing Production (GitHub App)

After deploying your app to Vercel, you must update your GitHub OAuth App to recognize the new production domain.

  1. Go to GitHub Developer Settings.
  2. Select the OAuth App you created in Step 3.
  3. Update Homepage URL:
    • Set to your Vercel URL (e.g., https://your-project.vercel.app).
  4. Update Authorization Callback URL:
    • Set to https://your-project.vercel.app/api/auth/callback/github.
  5. Click Update Application.

5. CLI Configuration

After deploying, configure your local CLI to point to your new instance:

# 1. Initialize
envhub init --api-url https://your-project.vercel.app/api

# 2. Login
envhub login

6. CLI Commands Reference

Push (Upload)

Upload your local .env file to the prod app.

envhub push -p <project> -s <service> -e <env> -r "Reason"
# Example:
envhub push -p demo-project -s backend -e prod -r "Added API keys"

Pull (Download)

Fetch variables. By default, it prints to console (great for piping). Use -o to save to file.

# Save to .env
envhub pull -p demo-project -s backend -e prod -o .env

# Pipe to Docker or other tools
envhub pull -p demo-project -s backend -e prod | grep DATABASE_URL

History (Audit Log)

See a full audit trail of who changed what.

envhub history -p demo-project -s backend -e prod

πŸ›‘οΈ Security Architecture

We take security seriously. Here is how EnvHub protects your infrastructure:

  1. Zero-Knowledge Architecture: You own the infrastructure. You deploy it to your Vercel account, using your database. We (the creators) have zero access to your data.
  2. Encryption at Rest: We use Fernet (AES-128) symmetric encryption. Secrets are encrypted before writing to storage.
  3. Strict Isolation: By setting ALLOWED_ORGS, you enforce a hardware-level gate. If a user is not in your GitHub Org, they cannot even see the dashboard.
  4. Audit Logs: Every change is versioned and attributed to a GitHub User Handle. You always know who changed DATABASE_URL and when.

License

MIT

Created By Haripriya Veluchamy

About

The secret manager

Resources

License

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 80.7%
  • Python 18.7%
  • Other 0.6%