New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

kmder

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

kmder

latest
Source
npmnpm
Version
0.1.4
Version published
Weekly downloads
8
-33.33%
Maintainers
1
Weekly downloads
 
Created
Source


kmder

kmder Build Status

Kmder is a CLI runner that aims to make writing, executing and distributing CLI commands a breeze. :palm_tree:

Features

  • ✏️ Simple, often declarative command definitions
  • 📦 Out of the box support for HTTP, SQL, Elasticsearch and more
  • 😍 Build shareable commands - easily distribute directly or in a repo
  • 📡 Built-in reporting - log your CLI output as a table, pretty-json, etc

Install

Install with yarn:

yarn global add kmder

or with npm:

npm install kmder --global

CLI Usage

> kmd help
  <kmd> <..args>     Execute kmd
  ls                 List available kmd(s)
  help               Display help
  source             Manage kmd sources
  version            List kmd version
  reset              Reset sources and settings

Examples

Browse kmder-kmds for additional command examples.

🌎 HTTP / API

The following defines the declarative fx command which retrieves current exchange rates for the given currencies:

// fx.json
{
    "type": "http",
    "url": "https://api.fixer.io/latest?base={0}&symbols={1}",
    "jp": "$.rates.{1}"
}
> kmd fx USD GPB
0.73792


🐬 MySQL

// user.json
{
  "type": "mysql",
  "connection": {
    "host": "db.example.com",
    "user": "kmdertest",
    "password": "kmder-test",
    "database": "kmdertest"
  },
  "query": "SELECT user_name, first, last FROM `users` WHERE `user_name` LIKE '%{0}%'"
}
> kmd user bsmith
----------------------------
user_name | first   | last |
----------------------------
bsmith    | Brandon | Smith


📐 Custom

The following defines the max command which returns the maximum value passed to the command. This example shows that a command can be custom, arbitrary JavaScript:

// max.js
module.exports.run = (args) => {
  return Math.max(...args)
}
> kmd max -5 5 9 99 -99
99

Documentation

Browse the wiki for full documentation:

  • Managing command sources (folders, repositories, etc)
  • Available strategies (http, mysql, mssql, es, etc) and their options
  • Command definitions (method hooks, types, dependencies)
  • Persistent data storage for commands
  • And more!

License

MIT © Brandon Smith

FAQs

Package last updated on 08 Jan 2018

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