Socket
Book a DemoInstallSign in
Socket

app-term-kit

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

app-term-kit

Utility for creating command line applications

0.4.2
latest
npmnpm
Version published
Maintainers
1
Created
Source

app-term-kit

This gives you a few features for your app:

  • action centric structure (<app-name> <action> <other stuff>)
  • automatic handling of commented JSON config files and setting values therein
  • automatic handling of optional ~/.<app-name> directories (and easy init)
  • automatic handling of classes of plugins installed in ~/.<app-name>
    • simple require shim for plugin loading
    • automated installation and (eventually) maintenance
  • handle ansi configuration of yargs and adding some features/simplifications
    • handle flag collisions
    • (eventually) formatting widths to terminal width
    • (eventually) handle other libraries
  • rights notifications & licensing information
  • (eventually) man pages
  • test harness (use common tests/data between CLI and Classes)

Installation

npm install app-term-kit

Usage

var app = new CLApp('app-name', {
    copyright : 'Ed Beggler',
    copystart : '2020',
    defaults : `{
  // This file was autogenerated by app-name
  //
  "name": "robble-rauser",
  "type": "*",
  "debug": false
}`
});

.command()

Define a command, with it's runtime logic

app.command({});

.argument()

Define a flag or argument to be passed to one or more commands

app.argument({});

.help()

Enable help function via --help or -h

app.help();

.header()

The prefix to all the documentation

app.header({});

The suffix to all the documentation

app.footer({});

.plugins(, )

Enable and load sets of plugins

app.plugins({}, cb);

.useable(, )

allow the user to interactively alter the config file

app.useable(cb);

.config()

Get the app's current configuration

app.config(cb);

.run()

Execute based on the existing configuration.

app.run(cb);

Events

using .on(), .off(), .emit() and .once() the user can interact with events that are generated from the object.

- `plugins-installed` : one or more plugins has been installed.

Roadmap

[More to come]

FAQs

Package last updated on 11 Feb 2022

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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.