Command Line tools are useful as they have a high degree of interoperability with other applications. One of the most straightforward ways to do it is to use Argsparse
A book to understand the Python syntax
Argsparse is a python toolkit that makes it simple to build a powerful command line interface. Commands need to have arguments to be reusable. These arguments need to parsed using a tool like argsparse. With argsparse, you can easily parse positional and optional arguments and build subparsers inside the main parser.
Instead of deflecting to python to run your scripts, you want to be able to run it directly with a command. When you package your code, you can directly call the script from your terminal.
An example of a CLI Tool used to process data. Most of the data processing code is in quickslice/build.py and quickslice/slice.py; qslice is the main script that has the argsparse code.