Ruby developers deserve glamorous terminals too. I want Ruby developers to build terminal applications so beautiful that even people who “don’t like CLIs” find themselves captivated.
I’ve recently been using AI to write CLI utilities in Go with Charm, but I know Ruby much better than Go so this is very exciting news. I’m even more excited about the coming work for the libraries to “feel more Ruby-like and idiomatic”.
I found the problem and it’s really bad. Looking at your log, here’s the catastrophic command that was run: rm -rf tests/ patches/ plan/ ~/
Not that it’s a foolproof solution, but I’ve aliased rm to a trash command for almost ten years now to move files to the trash instead of deleting them. A trash command is built into macOS Sequoia and newer.
The one downside is the command doesn’t support the -f or -r arguments, so it often causes issues with Claude Code. Sometimes it’ll switch to using rmdir, so I’m also aliasing that now.
I’m not sure how much moving the home directory to the trash would have helped, since the trash command does completely remove files and directories prefixed with a period.
An open-source guide to help you write better command-line programs, taking traditional UNIX principles and updating them for the modern day.
Found this while working on a small CLI utility and searching to see if there are standards for outputting help. The real-world applications they link to were helpful for inspiration.