Instead of being generic "args" and function name "cmd_line" lets make this function more clear.

cli.py will now handle everything related to CLI parsing. This file should provide functions / APIs necessary for the CLI to do what it needs to. So if this function is about uploading a file, lets rename it to have it match what it's doing and instead of passing "args" pass specific variables containing what this function needs like "files".

This function should define what it will do and what it needs in order to do it. cli.py will then figure out what it needs to pass to the function in order for it to be used. This will make your code much more readable and maintainable.