Swiftpack.co - ChimeHQ/ProcessEnv as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by ChimeHQ.
ChimeHQ/ProcessEnv 1.0.0
Capture the shell environment of a Foundation app
⭐️ 21
🕓 6 weeks ago
.package(url: "https://github.com/ChimeHQ/ProcessEnv.git", from: "1.0.0")

Build Status License Platforms


ProcessEnv is a small library for capturing the shell configuration used by a Foundation/AppKit process. This is very handy for launching Process/NSTask instances with the same configuration.


Swift Package Manager:

dependencies: [
    .package(url: "https://github.com/ChimeHQ/ProcessEnv")


The bulk of code is in the form of extensions on ProcessInfo, for accessing various environment variables. A single [String : String] dictionary of the user's environment is available as the userEnvironment property.


ProcessInfo.processInfo.path // $PATH

Suggestions or Feedback

We'd love to hear from you! Get in touch via an issue or pull request.

Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.


Stars: 21
Last commit: 5 weeks ago
jonrohan Something's broken? Yell at me @ptrpavlik. Praise and feedback (and money) is also welcome.

Release Notes

6 weeks ago
  • Adding sandbox detection API, which can be very relevant for this kind of work
  • Finally releasing a 1.0. It's time.

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics