Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

cli-form

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cli-form

Build user-friendly command-line forms

  • 0.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
6
increased by100%
Maintainers
1
Weekly downloads
 
Created
Source

cli-form

Build user-friendly command-line forms easily.

Install

$ npm install cli-form

Usage

var NewForm = require('cli-form')

var form = NewForm('~/.projects', [
  { key: "github", title: "What's your Github handle?", default: process.env.USER, forOnce: true },
  { key: "workspace", title: "Where do you keep your code?", default: process.cwd(), forOnce: true },
  { key: "name", title: "What's your new project name?", validate: { len: [1] } },
  { title: "Starter", desc: "user/repo (Github) or a full Git URL to clone.", default: "bud/react-starter" }
])

form.prompt(function (answers) {

  answers.github
  // => azer

  answers.starter
  // => bud/go-starter

})

Reference

cli-form is a wrapper for cli-qa module, formatted by default with a description option. Reference

Keywords

FAQs

Package last updated on 15 Oct 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc