import EnvFileWriter from "env-file-rw"; async function init() { const envFileWriter = new EnvFileWriter<{ a : any }>("test.env",false); // false prevents direct sync parsing // open the file and parse it await envFileWriter.parse(); envFileWriter.get("a","NOT WORLD");// NOT WORLD BY DEFAULT envFileWriter.set("HELLO","WORLD"); // note : unsaved changes are not readable with .get() // persists the changes await envFileWriter.save(); console.log(envFileWriter.get("a","NOT WORLD")); } init();