@dotenc/cli
Version:
🔐 Secure, encrypted environment variables that live in your codebase
16 lines (15 loc) • 428 B
JavaScript
import { getHomeConfig, setHomeConfig } from "../helpers/homeConfig.js";
export const configCommand = async (key, value, options) => {
const config = await getHomeConfig();
if (options.remove) {
delete config[key];
await setHomeConfig(config);
return;
}
if (value) {
config[key] = value;
await setHomeConfig(config);
return;
}
console.log(config[key]);
};