envex 0.2.0

A modern, cross-platform environment variable manager with TUI and CLI interfaces
envex-0.2.0 is not a library.

envx

License: MIT CI

A powerful and secure environment variable manager for developers, featuring an intuitive Terminal User Interface (TUI) and comprehensive command-line interface.

๐Ÿ“ธ Screenshots

๐ŸŒŸ Features

  • ๐Ÿ–ฅ๏ธ Interactive TUI: Beautiful terminal interface for easy environment variable management
  • ๐Ÿ” Smart Search: Fast filtering and searching across all environment variables
  • ๐Ÿ“Š Source Tracking: Distinguish between System, User, Process, Shell, and Application variables
  • ๐Ÿ“ Multi-line Support: Edit complex environment variables with proper multi-line support
  • ๐Ÿ”„ Import/Export: Support for multiple formats (JSON, YAML, TOML, ENV)
  • ๐Ÿ“ธ Snapshots & Profiles Feature Implementation: Save and restore variable states
  • โšก Performance: Built with Rust for blazing-fast performance
  • ๐ŸŽจ Cross-platform: Works on Windows, macOS, and Linux

๐Ÿ“ฆ Installation

From Source

git clone https://github.com/yourusername/envx.git
cd envx
cargo install --path crates/envx

Using Cargo

cargo install envx

Pre-built Binaries

Download the latest release for your platform from the releases page.

๐Ÿš€ Quick Start

Launch the TUI

envx tui
# or
envx ui

List all environment variables

envx list

Set a variable

envx set MY_VAR "my value"

Get a variable

envx get MY_VAR

๐Ÿ“– Command Line Usage

Overview

System Environment Variable Manager

Usage: envx.exe <COMMAND>

Commands:
  list     List environment variables
  get      Get a specific environment variable
  set      Set an environment variable
  delete   Delete environment variable(s)
  analyze  Analyze environment variables
  tui      Launch the TUI [aliases: ui]
  path     Manage PATH variable
  export   Export environment variables to a file
  import   Import environment variables from a file
  help     Print this message or the help of the given subcommand(s)

Options:
  -h, --help     Print help
  -V, --version  Print version

Core Commands

list - List environment variables

List environment variables

Usage: envx.exe list [OPTIONS]

Options:
  -s, --source <SOURCE>  Filter by source (system, user, process, shell)
  -q, --query <QUERY>    Search query
  -f, --format <FORMAT>  Output format (json, table, simple, compact) [default: table]
      --sort <SORT>      Sort by (name, value, source) [default: name]
      --names-only       Show only variable names
  -l, --limit <LIMIT>    Limit output to N entries
      --stats            Show statistics summary
  -h, --help             Print help
# List all variables
envx list

# List with a pattern
envx list --format table --sort name --query RUST

# List from specific source
envx list --source system
envx list --source user

get - Get a specific variable

Get a specific environment variable

Usage: envx.exe get [OPTIONS] <PATTERN>

Arguments:
  <PATTERN>  Variable name or pattern (supports *, ?, and /regex/) 
  Examples:
    envx get PATH           - exact match
    envx get PATH*          - starts with PATH
    envx get *PATH          - ends with PATH
    envx get *PATH*         - contains PATH
    envx get P?TH           - P followed by any char, then TH
    envx get /^JAVA.*/      - regex pattern

Options:
  -f, --format <FORMAT>  Output format (simple, detailed, json) [default: simple]
  -h, --help             Print help
envx get PATH
envx get MY_CUSTOM_VAR
envx get RUST*

set - Set an environment variable

Set an environment variable

Usage: envx.exe set [OPTIONS] <NAME> <VALUE>

Arguments:
  <NAME>   Variable name
  <VALUE>  Variable value

Options:
  -p, --permanent  Make change permanent
  -h, --help       Print help
# Set for current session
envx set MY_VAR "value"

# Set persistently (survives reboot)
envx set MY_VAR "value" --permanent

delete - Remove an environment variable

Delete environment variable(s)

Usage: envx.exe delete [OPTIONS] <PATTERN>

Arguments:
  <PATTERN>  Variable name or pattern

Options:
  -f, --force  Force deletion without confirmation
  -h, --help   Print help
envx delete MY_VAR
envx delete TEMP_VAR
envx delete /JAVA.*/

analyze - Analyze environment variables

Analyze environment variables

Usage: envx.exe analyze [OPTIONS]

Options:
  -a, --analysis-type <ANALYSIS_TYPE>  Type of analysis (duplicates, invalid) [default: all]
  -h, --help                           Print help
envx analyze --analysis-type duplicates
envx analyze --analysis-type invalid

path - Manage PATH variable

Manage PATH variable

Usage: envx.exe path [OPTIONS] [COMMAND]

Commands:
  add     Add a directory to PATH
  remove  Remove a directory from PATH
  clean   Clean invalid/non-existent entries from PATH
  dedupe  Remove duplicate entries from PATH
  check   Check PATH for issues
  list    Show PATH entries in order
  move    Move a PATH entry to a different position
  help    Print this message or the help of the given subcommand(s)

Options:
  -c, --check      Check if all paths exist
  -v, --var <VAR>  Target PATH variable (PATH, Path, or custom like PYTHONPATH) [default: PATH]
  -p, --permanent  Apply changes permanently
  -h, --help       Print help

Import/Export Commands

export - Export variables to a file

Export environment variables to a file

Usage: envx.exe export [OPTIONS] <FILE>

Arguments:
  <FILE>  Output file path

Options:
  -v, --vars <VARS>      Variable names or patterns to export (exports all if not specified)
  -f, --format <FORMAT>  Export format (auto-detect from extension, or: env, json, yaml, txt)
  -s, --source <SOURCE>  Include only specific sources (system, user, process, shell)
  -m, --metadata         Include metadata (source, modified time)
      --force            Overwrite existing file without confirmation
  -h, --help             Print help
envx export --vars RUST* .env
envx export variables.json --format json --source user
envx export variables.yaml --format yaml --source system
envx export variables.toml --format toml --source process
envx export .env --format env --source shell

import - Import variables from a file

Import environment variables from a file

Usage: envx.exe import [OPTIONS] <FILE>

Arguments:
  <FILE>  Input file path

Options:
  -v, --vars <VARS>      Variable names or patterns to import (imports all if not specified)
  -f, --format <FORMAT>  Import format (auto-detect from extension, or: env, json, yaml, txt)
  -p, --permanent        Make imported variables permanent
      --prefix <PREFIX>  Prefix to add to all imported variable names
      --overwrite        Overwrite existing variables without confirmation
  -n, --dry-run          Dry run - show what would be imported without making changes
  -h, --help             Print help
# Import from JSON
envx import variables.json

# Import from YAML
envx import variables.yaml --format yaml

# Import from .env file
envx import .env --format env

๐ŸŽฎ TUI Keyboard Shortcuts

Normal Mode

  • โ†‘/โ†“ or j/k - Navigate up/down
  • PageUp/PageDown - Navigate by page
  • Home/End - Jump to first/last item
  • Enter or v - View variable details
  • / - Enter search mode
  • a - Add new variable
  • e - Edit selected variable
  • d - Delete selected variable
  • r - Refresh list
  • q - Quit

Search Mode

  • Esc - Cancel search
  • Enter - Apply search

Edit Mode

  • Tab - Switch between name and value fields
  • Ctrl+Enter - Save changes
  • Esc - Cancel editing

๐Ÿ”ง Configuration

envx stores its configuration in platform-specific locations:

  • Windows: %APPDATA%\envx\config.toml
  • macOS: ~/Library/Application Support/envx/config.toml
  • Linux: ~/.config/envx/config.toml

Example Configuration

[general]
default_export_format = "json"
auto_backup = true
history_limit = 100

[ui]
theme = "dark"
highlight_system_vars = true

๐Ÿ—๏ธ Architecture

envx is built with a modular architecture:

  • envx-core: Core functionality for environment variable management
  • envx-cli: Command-line interface implementation
  • envx-tui: Terminal User Interface
  • envx: Main binary that ties everything together

๐Ÿค Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

Development Setup

# Clone the repository
git clone https://github.com/yourusername/envx.git
cd envx

# Build the project
cargo build

# Run tests
cargo test

# Run with debug logging
RUST_LOG=debug cargo run -- tui

๐Ÿ“ License

This project is licensed under the MIT License - see the LICENSE file for details.

๐Ÿ™ Acknowledgments

๐Ÿ“Š Benchmarks

envx is designed for performance:

  • List 1000+ variables: < 10ms
  • Search through variables: < 5ms
  • Import/Export operations: < 50ms for typical workloads

Debug Mode

Run with debug logging enabled:

RUST_LOG=debug envx list

๐Ÿ“ง Contact