{"id":18415,"library":"heroku","title":"Heroku CLI","description":"v11.3.0 — official command-line interface for managing Heroku applications and services. Built with oclif and Node.js, it supports app deployment, scaling, monitoring, Postgres databases, CI/CD pipelines, add-ons, SSL certificates, domains, team collaboration, Private Spaces, logs, and a plugin ecosystem. v11 is a major rewrite: ESM-only (converted from CJS), oclif v4, single package (monorepo removed), new color system (ansis replaces chalk), Node >=20 required. Ships TypeScript types. Active development with frequent releases.","status":"active","version":"11.3.0","language":"javascript","source_language":"en","source_url":"https://github.com/heroku/cli","tags":["javascript","heroku","heroku-cli-plugin","typescript"],"install":[{"cmd":"npm install heroku","lang":"bash","label":"npm"},{"cmd":"yarn add heroku","lang":"bash","label":"yarn"},{"cmd":"pnpm add heroku","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"legacy utilities, partially replaced in v11","package":"heroku-cli-util","optional":true}],"imports":[{"note":"Default import works for ESM. CLI is primarily used via command line, not programmatic imports.","symbol":"heroku","correct":"import heroku from 'heroku'"},{"note":"ESM-only since v11; require() will throw ERR_REQUIRE_ESM.","wrong":"const Heroku = require('heroku')","symbol":"Heroku","correct":"import { Heroku } from 'heroku'"},{"note":"Class for building CLI plugins. Requires oclif v4 compatibility.","symbol":"Command","correct":"import { Command } from 'heroku'"}],"quickstart":{"code":"// Install globally: npm install -g heroku\n// Or use without install: npx heroku\n\nimport { Command } from 'heroku';\n\nclass MyCommand extends Command {\n  static description = 'my custom command';\n  static flags = {};\n\n  async run() {\n    const {args, flags} = await this.parse(MyCommand);\n    this.log('Hello from custom command!');\n  }\n}\n\nexport default MyCommand;\n\n// Run: heroku my-command","lang":"typescript","description":"Shows how to create a custom CLI command plugin using the Heroku CLI v11 ESM API."},"warnings":[{"fix":"Replace require('heroku') with import heroku from 'heroku'. If dynamic import needed, use import('heroku').","message":"v11 converts entire codebase to ESM. require() no longer works. Use import or dynamic import().","severity":"breaking","affected_versions":">=11.0.0"},{"fix":"Install only 'heroku' package. Remove separate @heroku-cli/* dependencies.","message":"v11 removes monorepo structure. All packages consolidated into single npm package 'heroku'. No sub-packages like @heroku-cli/plugin-* are separate.","severity":"breaking","affected_versions":">=11.0.0"},{"fix":"Update plugins to use oclif v4 API. See oclif migration guide.","message":"v11 upgrades to oclif v4. Plugin API changes: command lifecycle, hooks, and config are different.","severity":"breaking","affected_versions":">=11.0.0"},{"fix":"Replace chalk imports with ansis. See ansis documentation for API changes.","message":"v11 replaces chalk with ansis for color output. Custom color themes may break.","severity":"breaking","affected_versions":">=11.0.0"},{"fix":"Upgrade Node.js to version 20+.","message":"v11 drops Node.js <20 support. Minimum engine is 'node': '>=20'.","severity":"breaking","affected_versions":">=11.0.0"},{"fix":"Use alternative commands: heroku data:maintenance for Postgres, or remove usage.","message":"redis:maintenance and pg:maintenance commands are deprecated in v10.17.0.","severity":"deprecated","affected_versions":">=10.17.0 <11.0.0"},{"fix":"Use npx heroku to avoid version conflicts, or install globally with npm install -g heroku.","message":"Global install may conflict with npx usage. Use npx heroku for per-version usage.","severity":"gotcha","affected_versions":">=11.0.0"}],"env_vars":null,"search_vec":"'20':69 'activ':74 'add':31 'add-on':30 'ansi':65 'app':22 'applic':12 'built':15 'certif':34 'chalk':67 'ci/cd':28 'cjs':55 'cli':2,83 'collabor':37 'color':63 'command':6 'command-lin':5 'convert':53 'databas':27 'deploy':23 'develop':75 'domain':35 'ecosystem':44 'esm':51 'esm-on':50 'frequent':77 'heroku':1,11,80,82 'heroku-cli-plugin':81 'interfac':8 'javascript':79 'line':7 'log':40 'major':48 'manag':10 'monitor':25 'monorepo':60 'new':62 'node':68 'node.js':19 'oclif':17,56 'offici':4 'on':32 'packag':59 'pipelin':29 'plugin':43,84 'postgr':26 'privat':38 'releas':78 'remov':61 'replac':66 'requir':70 'rewrit':49 'scale':24 'servic':14 'ship':71 'singl':58 'space':39 'ssl':33 'support':21 'system':64 'team':36 'type':73 'typescript':72,85 'v11':45 'v11.3.0':3 'v4':57","created_at":"2026-04-25T07:38:07.249092+00:00","updated_at":"2026-04-25T07:38:07.249092+00:00","problems":[{"fix":"Change to import heroku from 'heroku'; or use dynamic import.","cause":"Using require() on an ESM-only module in v11.","error":"Error [ERR_REQUIRE_ESM]: Must use import to load ES Module: /path/to/heroku/node_modules/heroku/lib/index.js"},{"fix":"Uninstall @heroku-cli/plugin-* and use 'heroku' directly.","cause":"v11 removed monorepo. All plugins are now in the main 'heroku' package.","error":"Cannot find module '@heroku-cli/plugin-*'"},{"fix":"Upgrade Node.js to version 20+.","cause":"Node.js version too old for v11.","error":"The engine \"node\" is incompatible with this module. Expected version \">=20\". Got \"18.x\""},{"fix":"Update plugin to oclif v4 compatible version or re-install.","cause":"Trying to run a plugin command that is not available because oclif v4 changed plugin loading.","error":"Error: Command not found. Perhaps you need to install the plugin?"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":"0.1.4","cli_name":"heroku","cli_version":null,"type":"library","homepage":"https://www.heroku.com","github":"https://github.com/heroku/cli","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/heroku","openapi_spec":null,"status_page":null,"smithery":null,"categories":["devops","aws","gcp","azure"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-17","next_check":"2026-07-24","install_tag":null}}