Implements "add-local" with optional version argument.