Also brings in much needed CLI changes from upstream and backporting our custom changes on top of those changes. Fixes #1880
incomplete
implement args.Head() to handle this case smoothly.