Node Current Working Directory

Get current working directory from CLI script

To get the directory from which your command tool/script has been called you can use the cwd method of the global object process:

console.log('Current directory: ' + process.cwd());