Implement Git-like CLI

CLI and library support is now quite consistent.