Skip to content

skaleway/nvii

Repository files navigation

Nvii - Secure Environment Variable Manager

Nvii is a comprehensive environment variable management platform that provides both a command-line interface for local development and a web dashboard for team collaboration. It enables secure, encrypted storage and version control of environment variables across multiple projects.

Features

CLI Commands

  • Authentication: login, logout, whoami
  • Project Management: new, link, update
  • Environment Control: generate, test
  • Version Control: pull, push, history, rollback (coming soon)

Web Dashboard

  • User Management: Registration, authentication, session management
  • Project Management: Create, share, and manage projects
  • Environment Editor: Web-based environment variable editing
  • Version Control: Track changes, view history, compare versions
  • Team Collaboration: Invite team members, manage access permissions
  • Real-time Sync: Live updates across team members

Security Features

  • AES-256 Encryption: All environment variables encrypted before storage
  • User Authentication: Secure login and session management
  • Device Management: CLI authentication via device keys
  • Access Control: Role-based permissions for project sharing
  • Version Tracking: Complete audit trail of all changes

Tech Stack

Component Technology
CLI TypeScript, Commander.js, Inquirer.js
Web App Next.js 14, React, TypeScript
Database PostgreSQL, Prisma ORM
Authentication Auth.js (NextAuth)
UI Tailwind CSS, shadcn/ui
Encryption Node.js crypto module
Build Tools Turbo, pnpm workspaces

Project Structure

envi/
├── apps/
│   └── web/                    # Next.js web application
│       ├── app/                # App router pages
│       ├── components/         # React components
│       ├── lib/               # Utility functions
│       └── middleware.ts      # Auth middleware
├── packages/
│   ├── cli/                   # Command-line interface
│   │   └── src/
│   │       ├── commands/      # CLI commands
│   │       │   ├── auth/      # Authentication commands
│   │       │   ├── link.ts    # Link project
│   │       │   ├── new.ts     # Create project
│   │       │   ├── update.ts  # Update env
│   │       │   ├── generate.ts # Generate example
│   │       │   └── crypt.ts   # Encryption utilities
│   │       └── index.ts       # CLI entry point
│   ├── database/              # Database package
│   │   ├── prisma/           # Database schema
│   │   └── src/              # Database utilities
│   ├── env-helpers/          # Shared environment utilities
│   ├── ui/                   # Shared UI components
│   ├── eslint-config/        # Shared ESLint config
│   └── typescript-config/    # Shared TypeScript config
├── docker-compose.yml        # Database container
└── run-dev.sh               # Development script

Quick Start

Prerequisites

  • Node.js 18+
  • pnpm
  • Docker (for local database)

Installation

  1. Clone the repository

    git clone <repository-url>
    cd envi
  2. Install dependencies

    pnpm install
  3. Set up environment files

    # Create database environment file
    echo 'DATABASE_URL="postgresql://envi:envi_password@localhost:5433/envi"' > packages/database/.env
    
    # Create web app environment file (you'll need to add your auth providers)
    touch apps/web/.env
  4. First-time setup (if you haven't run the project before)

    ./run-dev.sh

This will:

  • Start PostgreSQL database with Docker
  • Run database migrations
  • Start the Next.js development server
  • Make the web app available at http://localhost:3000 or what ever port is displayed on your terminal for the web app.

For subsequent runs (after initial setup):

# Run all packages
pnpm dev

# Or run specific packages
pnpm --filter @nvii/web dev
pnpm --filter @nvii/cli dev

📖 Usage

CLI Usage

  1. Authenticate with the service

    nvii login
  2. Create a new project

    nvii new
  3. Link to an existing project

    nvii link
  4. Update environment variables

    nvii update
  5. Generate example environment file

    nvii generate

Web App Dashboard

  1. Register/Login at the web dashboard
  2. Create projects and invite team members
  3. Edit environment variables using the web interface
  4. Track changes with version history
  5. Manage team access and permissions

🔧 Development

Running Individual Components

Database:

cd packages/database
pnpm prisma studio

CLI:

cd packages/cli
pnpm dev

Web App:

cd apps/web
pnpm dev

Database Migrations

cd packages/database
pnpm prisma migrate dev

Building for Production

# Build all packages
pnpm build

# Build specific package
pnpm --filter @nvii/cli build
pnpm --filter @nvii/web build
pnpm --filter

🔐 Security

  • Encryption: All environment variables are encrypted with AES-256 before storage
  • Authentication: Secure user authentication with session management
  • Authorization: Role-based access control for project sharing
  • Audit Trail: Complete version history of all changes
  • Device Management: Secure CLI authentication via device keys

🤝 Contributing

We welcome contributions! Please see our CONTRIBUTING.md for detailed guidelines on:

  • Setting up the development environment
  • Code style and conventions
  • Testing procedures
  • Pull request process

📝 License

MIT license

🆘 Support


Nvii - Secure, collaborative environment variable management for modern development teams.

About

Simple, sleek, and efficient environment variable management.

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •