Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including makemeasandwich with all npm packages installed. Try it out:

var makemeasandwich = require("makemeasandwich")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

makemeasandwich v0.0.8

A node.js application that will order you a sandwich from Jimmy Johns via command line.


This is a Node.js application that is capable of ordering a Jimmy John's sandwich via command line, bringing to life this legendary XKCD comic.

It does this through the combination of Node.js + PhantomJS along with some other command line prompt tools that makes ordering a sandwich even more freaky fast.


To read more about this project and why I built it, go to


To install this application on your computer, you can simply use NPM to install it as a global command.

npm install -g makemeasandwich


To run this command, simply type it in your terminal.


Or, if you want to stay true to the comic...

sudo makemeasandwich

This will then walk you through the login process, as well as sandwich selection process, and even checkout... all through the command line. You can also provide configurations to make each order super simple. This is done via a JSON file that you can pass into the application using the o argument like so.

sudo makemeasandwich -o order.json

This order json file looks like the following...

  "email": "",
  "company": "",
  "address": "14665 Midway Road",
  "apt/suite": "220",
  "city": "Addison",
  "state": "Texas",
  "zip": "75001",
  "sandwich": "country club",
  "who": "Travis",
  "bread": "French Bread",
  "cut": true,
  "drink": "",
  "chips": "Regular Jimmy Chips",
  "cookie": "",
  "pickle": "",
  "Tomato": "NO",
  "tip": "2",
  "billing_address": "123 Main St.",
  "billing_city": "Carrollton",
  "billing_state": "Texas",
  "billing_zip": "75007"

If you'd like to save the order json for repeated use, simply add it to either X:\mmas\config.json in Windows (where X is your primary drive letter) or \etc\mmas\config.json in Linux/Mac. However, do note that using -o order.json will override the saved config.json.

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free