Mac OS X, 10.12.2, Command Line how to add Search Domains
First list all network services to get an overview:

networksetup -listallnetworkservices


Output example:

An asterisk (*) denotes that a network service is disabled.
en0
en1


I renamed my two network services from "Ethernet" to en0 and "Ethernet Adapter (1)" to en1. You have to use your actual network service names of course! If the network service name contains spaces you have to use quotes (e.g. "Apple USB Ethernet Adapter") in the commands below.

To set search domains for a network service use:

sudo networksetup -setsearchdomains networkservice domain1 [domain2] [...]


Example:

sudo networksetup -setsearchdomains en0 example.home example.net example


Check with networksetup -getsearchdomains en0:

example.home
example.net
example


If you want to add search domains to already existing domains use:

SEARCHDOMAIN=$(networksetup -getsearchdomains en0)
sudo networksetup -setsearchdomains en0 $SEARCHDOMAIN domain1 domain2 ...