def cli_search(apic, args):
    """Implement CLI command `search`.
    """
    if args.include_user_provided:
        query = apic.get_wdeployments(query=args.QUERY)
    else:
        query = apic.get_wdeployments(query=args.QUERY, types=['!user_provided'])
    for wdinfo in query:
        print('{}\t{}'.format(wdinfo['id'], wdinfo['type']))
    return 0