Our great sponsors
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
Ruby has always been a great general-purpose scripting language and is often used to create command-line utilities. Many of these use the excellent Thor gem to parse command-line options, but there's no escaping one fact: command-line utilities just aren't interesting. Never have been, never will be.
When we deploy code at Aha! we kick off a number of AWS CodeDeploy tasks running in parallel. Here's some code to simulate deployment:
As we make updates to our ops and similar CLI utilities, we often improve the user experience by taking advantage of various Ruby gems. With little effort compared to low-level coding with curses, our command-line utilities that used to be cryptic and confusing are now interactive, easy to use, and — dare I say — elegant.
I really enjoy using the cli-ui gem. It offers a lot of powerful, intuitive features including:
I used to write a lot of custom code to format tabular data in my CLI utilities. Thankfully, that stopped once I discovered terminal-table.
Finally, here is a nice little gem created by Aha! director of software engineering, Justin Paulson. Ombre provides a fun way to spice up your output by rendering text with a gradient. Here's an example that prints zombie ipsum with a red, white, and blue tint: