Remix.run Logo
Show HN: Shifu – A pure POSIX shell framework to create powerful CLIs(github.com)
7 points by ultramann 2 hours ago | 2 comments

The startup I work for has an internal, bash-based, cli that basically amounts to shared aliases with a common entrypoint. As the number of aliases has grown, I've had a desire to group functionality together in subcommands, add more help strings, and have better tab completion. I know I could convert it to, e.g., a python script, but I was curious what was possible if we continued to use bash.

I couldn't find anything that solved those problems without lots of extra machinery. I understand why, shell scripts are generally not long, and focused on a dedicated task; adding cli features to them is mostly unnecessary, many might even discourage it for many valid reasons.

Nonetheless, I considered writing this functionality myself, but that felt like a poor use of company time. So I started toying with what a framework to handle those concerns entirely in shell script would look like on the side. Thus, shifu was born. I've been working on it off and on for about a year, and think I've got a reasonable alpha release, so thought I'd share.

spbuilds an hour ago | parent [-]

Keeping it in shell instead of rewriting in Python was probably the right call. Once you add a language runtime dependency you lose the “just drop this file in and use it” simplicity.

ultramann 43 minutes ago | parent [-]

Yeah, that was definitely the motivation of putting it in shell in the first place