Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/dervexdev/globenv

Globally set & read environment variables and paths on Windows, macOS or Linux
https://github.com/dervexdev/globenv

environment global path rust variable

Last synced: about 1 month ago
JSON representation

Globally set & read environment variables and paths on Windows, macOS or Linux

Awesome Lists containing this project

README

        

# globenv

Globally set & read environment variables and paths (not just for the current process) on Windows, macOS or Linux


Version badge
Downloads badge
License badge
Docs badge

## Example:

```rust
use globenv::*;

// Get environment variable
get_var("key").unwrap().unwrap();
// Set environment variable
set_var("key", "value").unwrap();
// Remove environment variable
remove_var("key").unwrap();

// Get all environment paths
get_paths().unwrap();
// Set environment path
set_path("example/path").unwrap();
// Remove environment path
remove_path("example/path").unwrap();
```

## Credit:

Based on the [globalenv](https://github.com/nicolasbauw/globalenv) by [@nicolasbauw](https://github.com/nicolasbauw)