Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@heroku-cli/command

heroku252.3kISC12.0.1TypeScript support: included

base class for Heroku CLI commands

heroku

readme

Heroku CLI Command

Base class for Heroku CLI commands. Built off of oclif.

Version GitHub Actions CI Known Vulnerabilities Downloads/week License

Overview

This package provides the core functionality for Heroku CLI commands, including a comprehensive set of completion handlers for various Heroku resources. It serves as the foundation for building Heroku CLI commands with built-in support for command-line completion.

Features

Completion Handlers

The package includes completion handlers for various Heroku resources:

  • Apps: Autocomplete for Heroku application names
  • Addons: Autocomplete for add-ons associated with specific apps
  • Dynos: Autocomplete for dyno names within apps
  • Buildpacks: Common Heroku buildpack options
  • Dyno Sizes: Available dyno size options
  • Files: Local file system completion
  • Pipelines: Heroku pipeline names
  • Process Types: Process types from Procfile
  • Regions: Available Heroku regions
  • Git Remotes: Git remote names
  • Roles: User role options (admin, collaborator, member, owner)
  • Scopes: Permission scope options
  • Spaces: Heroku Private Spaces
  • Stacks: Available Heroku stacks
  • Stages: Pipeline stage options
  • Teams: Heroku team names

APIClient

The package includes a built-in APIClient for making authenticated requests to the Heroku Platform API:

  • Handles authentication and request formatting
  • Provides a simple interface for making GET requests to Heroku resources
  • Automatically parses JSON responses
  • Used internally by completion handlers to fetch resource lists
  • Supports configurable request options through the CLI config

Example usage:

const heroku = new APIClient(config)
const {body: resources} = await heroku.get('/apps')

Usage

This package is primarily used as a dependency in other Heroku CLI plugins and commands. It provides the base functionality needed to implement Heroku CLI commands with proper completion support.

Development

Built with TypeScript and uses the oclif framework for CLI command development.

changelog

8.3.1 (2020-08-14)

Bug Fixes

  • show URL for legacy SSO flow (b32d733)

8.3.0 (2020-02-03)

Features

  • Override error message for login device_trust_required (f5ad3bd

8.2.5 (2018-12-03)

Bug Fixes

8.2.4 (2018-12-03)

Bug Fixes

  • use SSO when HEROKU_LEGACY_SSO is set (ae031d9)

8.2.3 (2018-11-26)

Bug Fixes

8.2.2 (2018-11-15)

Bug Fixes

  • timeout and warn if browser fails to render (e15c0b6)

8.2.1 (2018-11-12)

Bug Fixes

8.1.29 (2018-09-14)

Bug Fixes

8.1.28 (2018-08-28)

Bug Fixes

  • description of login token (c8e7975)

8.1.27 (2018-08-28)

Bug Fixes

  • login: retry browser auth up to 3 times on 5xx (5f7b570)
  • add hostname to browser auth (0dc9248)

8.1.26 (2018-06-18)

Bug Fixes

8.1.25 (2018-06-18)

Bug Fixes

  • only use browser login when available (#44) (b178343)

8.1.24 (2018-06-09)

Bug Fixes

  • ensure error is defined (22175e1)

8.1.23 (2018-06-01)

Bug Fixes

  • allow specifying Authorization for header (#42) (a522961)

8.1.22 (2018-05-31)

Bug Fixes

8.1.21 (2018-05-31)

Bug Fixes

  • use settings file for login insted of netrc (a8340b4)

8.1.20 (2018-05-25)

Bug Fixes

  • add generic types to requests (4b7e5d9)

8.1.18 (2018-05-21)

Bug Fixes

8.1.17 (2018-05-15)

Bug Fixes

8.1.16 (2018-05-11)

Bug Fixes

  • use CLIError for git error (0915f57)

8.1.15 (2018-05-10)

Bug Fixes

8.1.14 (2018-05-10)

Bug Fixes

  • do login first to fix sso login with browser (1785ded)

8.1.13 (2018-05-10)

Bug Fixes

8.1.12 (2018-05-09)

Bug Fixes

  • show url when HEROKU_TESTING_HEADLESS_LOGIN is set (c3a3f01)

8.1.11 (2018-05-09)

Bug Fixes

  • show error when opn fails (6c9fead)

8.1.10 (2018-05-08)

Bug Fixes

8.1.9 (2018-05-08)

Bug Fixes

8.1.8 (2018-05-08)

Bug Fixes

8.1.7 (2018-05-08)

Bug Fixes

8.1.6 (2018-05-08)

Bug Fixes

8.1.5 (2018-05-08)

Bug Fixes

  • do not error out if cannot logout (8978ad4)

8.1.4 (2018-05-08)

Bug Fixes

  • make raw requests for http calls (8629056)

8.1.3 (2018-05-07)

Bug Fixes

8.1.2 (2018-05-06)

Bug Fixes

  • error out on login when HEROKU_API_KEY is set (eaad07f)

8.1.1 (2018-05-06)

Bug Fixes

  • added stubbed browser property (09b54ad)

8.1.0 (2018-05-06)

Features

8.0.7 (2018-05-02)

Bug Fixes

8.0.6 (2018-05-01)

Bug Fixes

8.0.5 (2018-04-17)

Bug Fixes

8.0.4 (2018-04-06)

Bug Fixes

  • inherit errors from CLIError (b590cd0)

8.0.3 (2018-04-06)

Bug Fixes

8.0.2 (2018-04-06)

Bug Fixes

8.0.0 (2018-04-06)

Features

BREAKING CHANGES

  • this is the oclif version

7.1.1 (2018-04-06)

Bug Fixes

7.1.0 (2018-04-06)

Bug Fixes

Features