Notice: Undefined index: order_next_posts in /nas/content/live/gadgetmag/wp-content/plugins/smart-scroll-posts/smart-scroll-posts.php on line 194

Notice: Undefined index: post_link_target in /nas/content/live/gadgetmag/wp-content/plugins/smart-scroll-posts/smart-scroll-posts.php on line 195

Notice: Undefined index: posts_featured_size in /nas/content/live/gadgetmag/wp-content/plugins/smart-scroll-posts/smart-scroll-posts.php on line 196

4 JS command-line apps you need now

Love it or loathe it the command line gives you extra-needed control. Here's a selection of the best apps out there

Love it or loathe it the command line gives you extra-needed control. Here’s a selection of the best apps out there


01. Browserify

Browserify is a module that enables the require() method of Node.js to be used in the browser or in the command line. Although not strictly command line-based it enables client-side JavaScript to follow the CommonJS module system, keeping everything organised and clean. Browserify enables the tens of thousands of packages available using npm (Node package manager) to be utilised by JavaScript on the client side. Using Browserify on the command line is simple to use and teams of any size can keep modules and dependencies in sync – teams using it include Facebook and CloudFlare.

02. Forever

Forever is an npm package written by NodeJitsu’s Charlie Robbins that enables any script to run forever. It’s a process supervisor written in Node.js that is simple and easy to use. The tool is great for keeping Node.js projects up and running when they throw an error, logging the error and then restarting the application. Forever can also be used programmatically, enabling developers hosting their own Node.js apps to write deployment pipelines that easily stop and start as required.

03. Nodemon

Nodemon is a utility that will monitor for any changes in source code and automatically restart your server. Nodemon can be used instead of Node.js to run an application. The application will restart when code changes, the tool can be used to specify directories to watch/ignore, along with file types unassociated with JavaScript – such as Python or Jade file extensions. Nodemon is a perfect tool for development/staging environments where deployments can be automated.

04. Commander

Commander is, in the developer’s own words “the complete solution for Node.js command line programs”. Inspired by Ruby’s commander it quickly enables the use of JavaScript and Node.js to write applications that can be utilised from the command-line interface. Adding a command-line interface to an existing Node.js project may not be at the top of the priorities list for every project, yet being able to run internal methods or application-specific tasks from the command line will not only make repetitive tasks much easier for yourself but also set a team-wide precedent for initiating such project actions.