Вы можете выполнять команды, используя exe c функцию child_process
const { exec } = require("child_process");
// Here you can execute whatever command you want to execute
exec("ls -la", (error, stdout, stderr) => {
if (error) {
console.log(`error: ${error.message}`);
return;
}
if (stderr) {
console.log(`stderr: ${stderr}`);
return;
}
// stdout returns the output of the command if you wish to use
console.log(`stdout: ${stdout}`);
});