@dawsonbotsford/shell-history 
Get the command history of the user's shell
Hard fork of SindreSorhus' shell-history
Install
$ npm install --save shell-history
Usage
const shellHistory = require('shell-history');
console.log(shellHistory());
API
shellHistory()
Get an array of commands.
On Windows it will always be an empty array as command history is not persisted there.
shellHistory.getContent()
Get the Contents of the first occurring history file in the list of files
shellHistory.parse(string)
Parse a shell history string into an array of commands.
License
MIT © Dawson Botsford