UNPKG

@imduchuyyy/crypt-env

Version:

Secure environment manager with profile-based encrypted storage

9 lines (7 loc) 331 B
import { loadOrCreateProfile, saveProfile } from '../shared'; export async function setVariable(profile: string, key: string, value: string) { const { env, password } = await loadOrCreateProfile(profile); env[key] = value; saveProfile(profile, env, password); console.log(`Set ${key}=${value} in profile "${profile}"`); }