Add support for specifying indices on the command line