If you are developing cross platform command line apps, you need an easy way to interact with the environment variables. Env
provides just that.
You can use Env
with Guaka to create aweseome command line applications.
// Set an enviroment variable
Env.set("key1", "value1")
// Get an environment variable
Env.get("SomeKey")
// Clear all variables
Env.clear()
// Get all keys and values
Env.keys()
Env.values()
You can install Env using Swift Package Manager (SPM) or Carthage.
Add Env as dependency in your Package.swift
.
import PackageDescription
let package = Package(name: "YourPackage",
dependencies: [
.package(url: "https://github.com/getGuaka/Env.git", from: "0.0.0"),
]
)
github "getGuaka/Env"
Tests can be found here.
Run them with
swift test
Just send a PR! We don't bite ;)