SitePoint
  • Blog
  • Forum
  • Library
  • Login
Join Premium
  1. Details
  2. Creator
  3. Content
  4. Reviews
  5. FAQ
Build a JavaScript Command Line Interface (CLI) with Node.js Cover

Build a JavaScript Command Line Interface (CLI) with Node.js

Created by

James Hibbard, Lukas White

Published by

SitePoint

Last Updated

7 February 2020

Details

One area where Node.js is really useful is for building command-line applications—and that’s what we’re going to be doing in this tutorial. We’re going to start by looking at a number of third-party packages designed to help work with the command line, then build a real-world example from scratch.

Description

As great as Node.js is for “traditional” web applications, its potential uses are far broader. Microservices, REST APIs, tooling, working with the Internet of Things and even desktop applications: it’s got your back.

Another area where Node.js is really useful is for building command-line applications—and that’s what we’re going to be doing in this tutorial. We’re going to start by looking at a number of third-party packages designed to help work with the command line, then build a real-world example from scratch.

What we’re going to build is a tool for initializing a Git repository. Sure, it’ll run git init under the hood, but it’ll do more than just that. It will also create a remote repository on GitHub right from the command line, allow the user to interactively create a .gitignore file, and finally perform an initial commit and push.

The code accompanying this tutorial can be found in this GitHub repo.

Creators

James Hibbard avatar

James Hibbard

James is a regular contributor to SitePoint, most notably on topics around JavaScript. He's also the technical editor for various books (e.g. JavaScript: _Novice to Ninja_ and _Jump Start Vue.js_). He also works for his local university as a network admin / web dev where he spends a fair bit of my time working on Rails apps.
James Hibbard avatar
Lukas White avatar

Lukas White

Lukas White avatar

Content

1
Preview

Reviews

Log in to write a review!

Frequently Asked Questions

Build a JavaScript Command Line Interface (CLI) with Node.js Cover

Build a JavaScript Command Line Interface (CLI) with Node.js

  • Unlimited access to this title and 600+ others in our library

  • New titles added frequently

  • Cancel anytime

Stuff we do

  • Premium
  • Newsletters
  • Forums

About

  • Our Story
  • Terms of use
  • Privacy Policy
  • Corporate Memberships

Contact

  • Contact us
  • FAQ
  • Publish your book with us
  • Write an article for us
  • Advertise

Connect

© 2000 – 2024 SitePoint Pty. Ltd.

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.