diff --git a/lib/oelite/cmd/__init__.py b/lib/oelite/cmd/__init__.py
index d2feabe..6919262 100644
--- a/lib/oelite/cmd/__init__.py
+++ b/lib/oelite/cmd/__init__.py
@@ -1 +1 @@
-manifest_cmds = [ "bake", "show", "cherry" ]
+manifest_cmds = [ "bake", "hostprep","show", "cherry" ]
diff --git a/lib/oelite/cmd/hostprep.py b/lib/oelite/cmd/hostprep.py
new file mode 100644
index 0000000..ae82fd8
--- /dev/null
+++ b/lib/oelite/cmd/hostprep.py
@@ -0,0 +1,132 @@
+import oebakery
+from oelite import util
+import logging
+import os
+import subprocess
+import oelite
+
+description = "Host preparation tool"
+arguments = ()
+
+def add_parser_options(parser):
+    parser.add_option("-c", "--command",
+                      action="store_true", default=False,
+                      help="Show the command needed to prepare the host for OE-lite")
+    parser.add_option("-l", "--list-supported-host-configs",
+                      action="store_true", default=False,
+                      help="Show a list of known host configurations")
+    parser.add_option("-s", "--select-host-config",
+                      action="store_true", default=False,
+                      help="Manually select a host configuration")
+    parser.add_option("-d", "--debug",
+                      action="store_true", default=False,
+                      help="Debug the OE-lite metadata")
+    return
+
+
+def parse_args(options, args):
+    if options.debug:
+        logging.getLogger().setLevel(logging.DEBUG)
+    else:
+        logging.getLogger().setLevel(logging.INFO)
+    if args:
+        options.head = args.pop(0)
+    else:
+        options.head = None
+    return
+
+def get_supported_host_configs():
+    logging.debug("Reading supported host configurations")
+    #TODO: fix path handling, find place to put host configs
+    hid = 0
+    hc=[]
+    config_dir = "./meta/core/lib/oelite/cmd/supported-host-configs"
+    logging.debug("Using config directory: %s", config_dir)
+    for config in os.listdir(config_dir):
+        logging.debug("Reading config: %s", config)
+        keys = config.split('_')
+        if(len(keys) != 3):
+            logging.debug("Ignoring host-config with wrong name: %s", config)
+            continue
+        #read out the cmd to run for this host configuration
+        try:
+            logging.debug("Read the host preparation command")
+            #strip off the last newline
+            cmd = open(config_dir+"/"+config, 'r').read()[:-1]
+        except:
+            logging.debug("Reading the host preparation command from the host configuration file failed")
+            raise
+        hc.append(dict(distro=keys[0],  release=keys[1],  codename=keys[2],  hostID=hid,  command=cmd))
+        hid+=1
+    logging.debug("Adding host config for unknown host")
+    hc.append(dict(distro="unknown", release="none",  codename="none", hostID=hid,  command="Unknown host - Please refer to the installation documentation"))
+    return hc
+
+def determine_host(host_configs):
+    logging.debug("Running host detection")
+    logging.debug("Searching for lsb_release information")
+    #try lsb-release which is the most widely available method
+    if(os.path.exists("/etc/lsb-release") and os.path.isfile("/etc/lsb-release")):
+        try:
+            logging.debug("checking for the lsb_release binary")
+            subprocess.call(["lsb_release"])
+        except OSError as e:
+            if e.errno == os.errno.ENOENT:
+                # handle file not found error.
+                logging.debug("/etc/lsb-release found, but lsb_release binary not available")
+                return (host for host in host_configs if host["distro"] == "unknown").next()
+            else:
+                logging.debug("unhandled exception when calling lsb_release")
+                raise
+        else:
+            try:
+                logging.debug("using lsb_release to get host information")
+                #strip newlines and make lowercase for later matching
+                distro = oelite.util.shcmd("lsb_release -si", quiet=True)[:-1].lower()
+                release = oelite.util.shcmd("lsb_release -sr", quiet=True)[:-1].lower()
+                codename = oelite.util.shcmd("lsb_release -sc", quiet=True)[:-1].lower()
+            except:
+                logging.debug("unhandled exception when calling lsb_release")
+                raise
+            else:
+                logging.debug("matching lsb_release information to supported configs")
+                logging.debug("lsb_release: distro: %s | release: %s | codename: %s", distro, release, codename)
+                for host in host_configs:
+                    if((distro == host["distro"]) and (release == host["release"]) and (codename == host["codename"])):
+                        logging.debug("found matching host config with ID: %d", host["hostID"])
+                        return host
+    logging.debug("Could not match information from lsb_release to any known host config")
+    logging.debug("Checking for Exherbo")
+    if(os.path.exists("/etc/exherbo-release") and os.path.isfile("/etc/exherbo-release")):
+        return (host for host in host_configs if host["distro"] == "exherbo").next()
+    logging.debug("No host config found for this host")
+    return (host for host in host_configs if host["distro"] == "unknown").next()
+
+def print_host_config(host):
+     print '{0:8}{1:15}{2:9}{3:15}{4:10}{5:15}{6:22}{7:2}'.format("Distro:", host["distro"], "Release:", host["release"], "Codename:", host["codename"], "Host Configuration ID:", host["hostID"])
+
+def run(options, args, config):
+    logging.debug("hostprep.run %s", options)
+
+    hc = get_supported_host_configs()
+
+    if(options.list_supported_host_configs):
+        print "List of supported host configurations:\n"
+        for host in hc:
+           print_host_config(host)
+        return 0
+
+    #try automatic host detection
+    host = determine_host(hc)
+    if(options.command):
+        logging.debug("printing command for hostID: %d", host["hostID"])
+        logging.debug("Command: '%s'", host["command"])
+        print host["command"]
+        return 0
+    print "Your host configuration detected to be:\n"
+    print_host_config(host)
+    print
+    print "Run this command on your host to prepare it for OE-lite:\n"
+    print host["command"]
+
+    return 0
diff --git a/lib/oelite/cmd/supported-host-configs/centos_6.4_final b/lib/oelite/cmd/supported-host-configs/centos_6.4_final
new file mode 100644
index 0000000..2da269f
--- /dev/null
+++ b/lib/oelite/cmd/supported-host-configs/centos_6.4_final
@@ -0,0 +1,13 @@
+wget http://mirrors.nl.eu.kernel.org/fedora-epel/6/i386/epel-release-6-8.noarch.rpm \
+&& sudo yum install epel-release-6-8.noarch.rpm \
+&& sudo yum install git python-ply python-setuptools \
+&& wget -qO- http://oe-lite.org/download/bakery/oe-lite-bakery-4.0.2.tar.gz \
+ | tar -xz && cd oe-lite-bakery-4.0.2 && sudo python setup.py install \
+&& sudo yum groupinstall "Development Tools" \
+&& sudo yum install python-sqlite2 python-magic python-pycurl python-devel \
+fakeroot gettext-devel ncurses-devel libtool texinfo flex bison \
+coreutils sed git-core cvs subversion mercurial quilt gawk texinfo \
+automake autoconf curl openjade groff make gcc-c++ gcc binutils bc \
+unzip gtk-doc docbook-utils xmlto glib2-devel intltool glibc-static \
+gperf
+
diff --git a/lib/oelite/cmd/supported-host-configs/exherbo_none_none b/lib/oelite/cmd/supported-host-configs/exherbo_none_none
new file mode 100644
index 0000000..2161776
--- /dev/null
+++ b/lib/oelite/cmd/supported-host-configs/exherbo_none_none
@@ -0,0 +1 @@
+sudo cave resolve oe-bakery
diff --git a/lib/oelite/cmd/supported-host-configs/ubuntu_12.04_precise b/lib/oelite/cmd/supported-host-configs/ubuntu_12.04_precise
new file mode 100644
index 0000000..98c533c
--- /dev/null
+++ b/lib/oelite/cmd/supported-host-configs/ubuntu_12.04_precise
@@ -0,0 +1,7 @@
+sudo apt-get install python python-support python-magic python-ply \
+python-pycurl python-pysqlite2 python-pkg-resources python-dev \
+coreutils sed git-core cvs subversion mercurial quilt gawk texinfo \
+automake autoconf autopoint libtool curl texi2html diffstat \
+openjade groff mtd-utils build-essential make gcc g++ binutils \
+bison flex bc ncurses-dev unzip lzma gtk-doc-tools docbook-utils \
+libxml2-utils xmlto help2man libglib2.0-dev lzop gperf python-svn
