Change repository apis to take extra options
Change repo commands to take global options.