npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

nicl

v0.1.2

Published

Node.js Interactive Command Line

Readme

nicl -- Node.js Interactive Command Line

INSTALLING

via npm

  • npm install nicl
  • Should be that simple.

from source

  • git clone git://github.com/jonbho/nicl.git
  • cd nicl
  • npm install

You may need to install fibers separately (npm install fibers).

RATIONALE

Nicl helps you write a JavaScript interactive command-line application in the "classic" style using Node.js. By "classic" style, I mean a linear sequence of code that can ask the user for input and print results in the order it wants. This is easy by default in most programming languages, but it is hard in JavaScript, since its native environment (the browser) is not conducive to command-line aplications at all. And the de-facto standard for non-browser JavaScript is Node.js, allows command-line operation, but it is designed as an event-driven framework that doesn't in principle allow you to write sequential code interacting with the users. Nicl adds support for sequential interactive code running inside Node.js.

Many IDEs only understad "browser JavaScript" and "Node.js JavaScript". If you want to benefit from their advantages foro your JavaScript project (autocompletion, debugging, etc...), your project had better be one of those two.

The main initial goal is educational. Using nicl and a free IDE like NetBeans, a beginner can start writing simple command-line applications in JavaScript, using code completion and the debugger, and complete many exercises until they understand variables, conditions, loops, function-calls, etc...

EXAMPLE

Here is a sample application using nicl to ask the user a couple questions and respond politely, in sequence:

var nicl = require("nicl");

function main() {
    nicl.printLine("Hello, what is your name?");
    var name = nicl.readLine();
    nicl.printLine("Great to meet you, " + name + "!");
    
    nicl.printLine("Where are you?");
    var place = nicl.readLine();
    nicl.printLine("Good. Hope it's all fine in " + place + "!");
    
    process.exit(0);
}
        
nicl.run(main);

Note how you need to run the code that uses nicl by calling nicl.run() and passing it the function to execute. Exiting the program needs to be done explicitly if so desired, as Node.js won't by default close the application until explicitly told to do so.

SUPPORTED ENVIRONMENTS

Nicl has been tested to work in OS X 10.10 Yosemite, both inside the NetBeans IDE console, and from the command line, by using node main.js to launch a program. Beware, it won't work properly inside the Node REPL, since the REPL sets input in "raw" mode (input processed at the keystroke level), and nicl is designed for cooked mode (linewise input).

TECHNICAL DETAILS

Nicl builds on node-fibers by Marcel Laverdet, a coroutine-style library that allows adding suspension and resumption sematincs inside a single-threaded, event-driven library like Node.js, where blocking I/O is in principle not possible.

FUTURE EVOLUTION

Support for raw input (keypress-level) will probably be added in the future.

LEGAL

(c) January 2016 Jon Beltran de Heredia (jonbho). Licensed under the GPL v2.0 license.