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 1,000,000+ packages pre-installed, including power-options with all npm packages installed. Try it out:

var powerOptions = require("power-options")

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

power-options v0.3.4

CLI Option parser for NodeJS


CLI Option parser for NodeJS

This library contains an advanced CLI option parser for NodeJS console applications.


For the latest version:

npm install power-options


// Importing (TypeScript)
import { parseCommandLine } from "power-options";

// Importing (JavaScript - CommonJS)
const parseCommandLine = require("power-options").parseCommandLine;

// Usage
const { options, help, error, status, group } = parseCommandLine(process.argv.slice(2), {
    options: {
        "help": { shortName: "h", alias: ["?"], help: true },
        "version": { shortName: "v" },

if (error) {
    if (help) {
        // print help
else if (help) {
    // print help
else {
    // use options/group


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