# @heroku-cli/command

> base class for Heroku CLI commands

Latest version **13.2.0** (published 2026-08-25) · ISC license · 0 weekly downloads

## Install

```sh
npm install @heroku-cli/command
pnpm add @heroku-cli/command
yarn add @heroku-cli/command
bun add @heroku-cli/command
```

## Health

**Score 75/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; has provenance; recently updated; high maintenance score; high quality score.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 13.2.0 |
| Published | 2026-08-25 |
| First published | 2017-12-26 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >= 20 |
| Dependencies | 12 |
| Unpacked size | 153.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 19 |
| Author | Heroku |
| Maintainers | sbosio_sf, eblack, mars, heroku-johnny, michael.malave, erika.wallace |
| Keywords | heroku |

## Links

- npm: https://www.npmjs.com/package/@heroku-cli/command
- Repository: https://github.com/heroku/heroku-cli-command
- Issues: https://github.com/heroku/heroku-cli-command/issues
- npm.io page: https://npm.io/package/@heroku-cli/command

## Dependencies (12)

- [open](https://npm.io/package/open.md) ^11.0.0
- [ansis](https://npm.io/package/ansis.md) ^4
- [debug](https://npm.io/package/debug.md) ^4.4.0
- [execa](https://npm.io/package/execa.md) ^9.6.1
- [inquirer](https://npm.io/package/inquirer.md) ^12.11.1
- [tsheredoc](https://npm.io/package/tsheredoc.md) ^1.0.1
- [@oclif/core](https://npm.io/package/@oclif/core.md) ^4.3.0
- [@sentry/node](https://npm.io/package/@sentry/node.md) ^10.45.0
- [yargs-parser](https://npm.io/package/yargs-parser.md) ^20.2.9
- [yargs-unparser](https://npm.io/package/yargs-unparser.md) ^2.0.0
- [@heroku/http-call](https://npm.io/package/@heroku/http-call.md) ^5.5.2
- [@heroku/js-blanket](https://npm.io/package/@heroku/js-blanket.md) ^1.0.0

## Recent versions

- 13.2.0 (latest) — 2026-08-25
- 13.0.0-beta.6 (beta) — 2026-07-01
- 11.8.0 (oclif-core-v2) — 2025-09-04
- 7.1.3 (cli-engine) — 2018-04-06
- 8.0.0-oclif.2 (oclif) — 2018-02-13
- 8.0.0-anycli.1 (anycli) — 2018-02-06
- 13.1.0 — 2026-08-03
- 13.0.1 — 2026-07-17
- 13.0.0 — 2026-07-01
- 13.0.0-beta.5 — 2026-06-29
- 12.4.2 — 2026-06-15
- 12.4.2-beta.2 — 2026-06-15
- 12.4.2-beta.1 — 2026-06-12
- 12.4.2-beta.0 — 2026-06-11
- 12.4.1 — 2026-06-08
- … 126 more at https://npm.io/package/@heroku-cli/command/versions

## README

Heroku CLI Command
===================

Base class for Heroku CLI commands. Built off of [oclif](https://oclif.io).

[![Version](https://img.shields.io/npm/v/@heroku-cli/command.svg)](https://npmjs.org/package/@heroku-cli/command)
![GitHub Actions CI](https://github.com/heroku/heroku-cli-command/actions/workflows/ci.yml/badge.svg)
[![Known Vulnerabilities](https://snyk.io/test/npm/@heroku-cli/command/badge.svg)](https://snyk.io/test/npm/@heroku-cli/command)
[![Downloads/week](https://img.shields.io/npm/dw/@heroku-cli/command.svg)](https://npmjs.org/package/@heroku-cli/command)
[![License](https://img.shields.io/npm/l/@heroku-cli/command.svg)](https://github.com/heroku/heroku-cli-command/blob/master/package.json)

## 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:
```typescript
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](https://oclif.io) framework for CLI command development.

---
_Source: https://npm.io/package/@heroku-cli/command · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
