const execSync = require('child_process').execSync; // import { execSync } from 'child_process'; // replace ^ if using ES modules const output = execSync('сюда комманду, которую надо выполнить', { encoding: 'utf-8' }); // the default is 'buffer' console.log('Output was:\n', output); JavaScript const execSync = require('child_process').execSync; // import { execSync } from 'child_process'; // replace ^ if using ES modules const output = execSync('сюда комманду, которую надо выполнить', { encoding: 'utf-8' }); // the default is 'buffer' console.log('Output was:\n', output); https://stackoverflow.com/questions/1880198/how-to-execute-shell-command-in-javascript/55883105