$ npm install terminal-size-cliReliably get the terminal window size - cross-platform
npm install --global terminal-size-cli
$ terminal-size --help
Example
$ terminal-size
143
24
First line is the number of columns
Second line is the number of rows