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

heroku-cli-util

Package Overview
Dependencies
Maintainers
2
Versions
155
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

heroku-cli-util

Set of helpful CLI utilities

  • 1.11.0
  • Source
  • npm
  • Socket score

Version published
Maintainers
2
Created
Source

heroku-cli-util

Build Status npm version License

Set of helpful CLI utilities

Installation

npm install heroku-cli-util --save

Prompt

var h = require('heroku-cli-util');
h.prompt('email', function (email) {
  console.log(`your email is: ${email}`);
});

Errors (display in red)

var h = require('heroku-cli-util');
h.error("App not found");
// !    App not found

Warnings (display in yellow)

var h = require('heroku-cli-util');
h.warn("App not found");
// !    App not found

Tables/Columns

var h = require('heroku-cli-util');
h.columnify({
  'Dynos':  1,
  'Region': 'us',
  'Stack':  'cedar-14'
});
// Dynos  1
// Region us
// Stack  cedar-14

Dates

var h = require('heroku-cli-util');
var d = new Date();
console.log(h.formatDate(d));
// 2001-01-01T08:00:00.000Z

Command

Used for initializing a plugin command. It will set the cwd to the user's current location, give you an auth'ed instance of heroku-client, and cleanly handle API exceptions.

It uses co so you can yield promises.

let h = require('heroku-cli-util');
module.exports.commands = [
  {
    topic: 'apps',
    command: 'info',
    needsAuth: true,
    needsApp: true,
    run: h.command(function* (context, heroku) {
      let app = yield heroku.apps(context.app).info();
      console.dir(app);
    })
  }
];

Preauth

var h = require('heroku-cli-util');
h.preauth("APPNAME", "APITOKEN", function (err) {
  console.log('preauthed');
});

Tests

npm install
npm test

License

ISC

FAQs

Package last updated on 06 May 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