---
title: "oclif"
description: "3 posts about oclif, summarised, each linking to the original."
---

# oclif
> 3 posts about oclif, summarised, each linking to the original.

## Articles

### [Heroku CLI v9: Infrastructure Upgrades and oclif Transition](https://yomu.fyi/post/heroku-cli-v9-infrastructure-upgrades-and-oclif-transition.md)
- Company: [Heroku](https://yomu.fyi/company/heroku.md)
- Author: Anush DSouza
- Published: Jul 25, 2024
- Type: Announcement

Heroku CLI 9.0.0 is an architectural upgrade centered on moving all core commands from a partly legacy structure to oclif. Core commands are consolidated into one package, while improved unit and integration coverage, telemetry, and a simpler automated release process support contribution, maintenance, and pre-release testing. The oclif migration provides a modular command architecture with plugin support and is intended to make command behavior more consistent, maintenance easier, and provide better scalability. Users should expect breaking changes including altered whitespace, newlines, table formatting, colors, argument ordering, flag removals, and a required separator for additional flags; deprecated commands including outbound-rules, pg:repoint, orgs:default, certs:chain, certs:key were removed. Changes apply to core commands, not separately installed plugins, and the release can be installed with heroku update.


### [CLI Flags in Practice + How to Make Your Own CLI Command with oclif](https://yomu.fyi/post/cli-flags-in-practice-how-to-make-your-own-cli-command-with-oclif.md)
- Company: [Heroku](https://yomu.fyi/company/heroku.md)
- Author: Casey Watts
- Published: May 9, 2019
- Type: Tutorial

CLI commands commonly accept arguments, long flags, short flags, and flag arguments; environment variables and standard input are alternative data channels not covered in detail. GNU-style conventions use double dashes for long flags and single dashes for short flags; short flags can be stacked, and flag options may be separated by a space or equals sign, while short flags also allow no separator. The tutorial uses oclif to build greet-me, which prints a greeting based on a name supplied through -n or --name while registering version, help, name, and force flags. It scaffolds the project with npx oclif single greet-me, places handling code in src/index.ts, defaults the name to world, and runs the CLI through ./bin/run or an npm link.


### [Heroku CLI: Completing Autocomplete](https://yomu.fyi/post/heroku-cli-completing-autocomplete.md)
- Company: [Heroku](https://yomu.fyi/company/heroku.md)
- Author: Philipe Navarro
- Published: Jun 12, 2018
- Type: Explainer

Heroku CLI Autocomplete had to support a dynamic, plugin-based command set while completing values that often reside behind the Heroku API. Instead of static shell case statements, its cache builder iterates through installed commands and generates setters that supply command, flag, and value completions when the user presses Tab. A shim sourced from the user’s .bashrc or .zshrc limits profile changes, fails silently when unavailable, and permits updates without repeated edits. API-backed values are cached on disk, while oclif custom hooks invalidate or rebuild relevant caches after commands change data. The completion function also parses the partially entered command line to provide contextual results, such as add-on aliases for a specified app; the work is being incorporated into an oclif plugin.
