|||

Video Transcript

X

Heroku CLI v9: Infrastructure Upgrades and oclif Transition

Introduction

The Heroku CLI is an incredible tool. It’s simple, extendable, and allows you to interact with all the Heroku functionality you depend on day to day. For this reason, it’s incredibly important for us to keep it up to date. Today, we're excited to highlight a major upgrade with the release of Heroku CLI v9.0.0, designed to streamline contributions, building, and iteration processes through the powerful oclif platform.

What's New in Version 9.0.0?

Version 9.0.0 focuses on architectural improvements. Here's what you need to know:

  • oclif Platform: All core CLI commands are built on the oclif platform. Previously, many commands were built using a pre-oclif legacy architecture.
  • Unified Package: All core CLI commands are consolidated into a single package, rather than spread across multiple packages. This consolidation makes tasks like dependency management much easier.
  • Increased Testing: We greatly improved the code coverage of our unit and integration tests.
  • Improved Release Process: Our release process is much simpler and more automated. We can now easily release pre-release versions of the CLI for testing.
  • Breaking Changes: With the switch to oclif/core, expect changes in output formatting, including additional new lines, whitespace, table formatting, and output colors. Additional flags now require a -- separator, and several commands have updated argument orders or removed flags. We also removed deprecated commands like outbound-rules, pg:repoint, orgs:default, certs:chain, and certs:key.

These changes apply only to the core Heroku CLI commands and don’t affect commands installed separately via plugins.

Why We Moved to oclif

For the first time, all core CLI commands are built on the oclif platform. By restructuring the core CLI repository, improving our testing and release processes, and adding telemetry, we laid a solid foundation that allows us to innovate and ship features more quickly and confidently than ever before.

Heroku pioneered oclif (Open CLI Framework) and it’s now the standard CLI technology used at companies like Salesforce, Twillio, and Shopify. It’s a popular framework for building command-line interfaces, offering a modular structure and robust plugin support. By migrating all core CLI commands to oclif, we unified our command architecture, moving away from the legacy systems that previously fragmented our development process. This transition allows for more consistent command behavior, easier maintenance, and better scalability. oclif’s flexibility and widespread adoption underscore its importance in delivering a more reliable and efficient CLI for our users.

Conclusion

The significant architectural enhancements in CLI version 9.0.0 are a testament to Heroku's commitment to our long-term vision and the exciting developments ahead for our customers. The integration of the oclif platform allows us to deliver a more reliable and efficient CLI, paving the way for future innovations.

Ready to experience the upgrade? Update to CLI version 9.0.0 by running heroku update. For more installation options, visit our Dev Center. We encourage you to try it and share your feedback for enhancing the Heroku CLI and for our full Heroku product via the Heroku GitHub roadmap.

Originally published: July 24, 2024

Browse the archives for engineering or all blogs Subscribe to the RSS feed for engineering or all blogs.