Don't write a shell CLI prematurely - a script in whatever language you're using can often be just as good a interface. Maintaining a shell CLI is work.
If you write a shell CLI don't aim for full flexibility - a script already fulfill that role.
I'm a big fan of shell CLIs (command --option=1), but I think this way of thinking has merit. I would consider a script a subset of CLIs though, using a python REPL with preloaded modules is certainly a type of CLI, no? Code is a sequence of commands.
That being said, as the author mentions, new libaries make it really easy to expose some functions to a shell CLI. If the task mesh well with piping, exposing some primitive to the shell is probably worth it.