cli: gather all found items through a callback function