Modules@robinpath/env

@robinpath/env

0.1.0Public

Secure environment variable management with sensitive value redaction and protected system vars

@robinpath/env

Secure environment variable management with sensitive value redaction and protected system vars

Category Functions Auth License

Why use this module?

The env module lets you:

  • Get the value of an environment variable
  • Check if an environment variable exists
  • Get all environment variables (sensitive values are redacted by default)
  • Delete an environment variable (protected system vars cannot be deleted)
  • Mark an environment variable as sensitive (will be redacted in env.all output)

All functions are callable directly from RobinPath scripts with a simple, consistent API.

Installation

npm install @robinpath/env

Quick Start

No credentials needed — start using it right away:

env.set "API_URL" "https://api.example.com"

Available Functions

FunctionDescription
env.getGet the value of an environment variable
env.setSet an environment variable (protected system vars cannot be overwritten)
env.hasCheck if an environment variable exists
env.allGet all environment variables (sensitive values are redacted by default)
env.deleteDelete an environment variable (protected system vars cannot be deleted)
env.secretMark an environment variable as sensitive (will be redacted in env.all output)
env.loadLoad environment variables from a .env file (won't override existing or protected vars)

Examples

Set an environment variable (protected system vars cannot be overwritten)

env.set "API_URL" "https://api.example.com"

Check if an environment variable exists

env.has "NODE_ENV"

Get all environment variables (sensitive values are redacted by default)

env.all

Integration with RobinPath

import { RobinPath } from "@wiredwp/robinpath";
import Module from "@robinpath/env";

const rp = new RobinPath();
rp.registerModule(Module.name, Module.functions);
rp.registerModuleMeta(Module.name, Module.functionMetadata);

const result = await rp.executeScript(`
  env.set "API_URL" "https://api.example.com"
`);

Full API Reference

See MODULE.md for complete documentation including all parameters, return types, error handling, and advanced examples.

Related Modules

License

MIT

Versions (1)

VersionTagPublished
0.1.0latestyesterday
Install
$ robinpath install @robinpath/env
Version0.1.0
LicenseMIT
Unpacked Size5.9 KB
Versions1
Weekly Downloads0
Total Downloads0
Stars0
Last Publishyesterday
Createdyesterday

Category

utilities