Chris Hannah

Text Case CLI via Homebrew #

I wrote just a few days ago, about Text Case coming to the command line. And it’s already time to announce that it’s now available to install from Homebrew.

Okay, so it’s not in the core tap, I have my own custom tap (maybe that will happen eventually). But it’s still a pretty easy process.

All you need to do is:

brew tap chrishannah/textcase
brew install textcase

Then you’ll be able to format text using the textcase command. Which is pretty easy. I used it myself to format the slug inside Neovim when writing this post.

While I’m here, I may as well explain what functionality is supported in the very first release of Text Case CLI.

To start off, the currently supported formats are:

To use these formats, you can pass in input in three different ways - you can use the --input option to pass a string of text, the --in option to specify a file to use as input, or you can pipe in data from stdin.

The outputted string will be sent to stdout, but you can also use the --out option to have the resulting text written as a file instead.

If you have any questions or feedback about Text Case CLI, then feel free to email me, or you can find me on Twitter/X or Mastodon.

Written: while relaxing in a caravan in Wells-next-the-Sea.