diff --git a/agkyra/cli.py b/agkyra/cli.py
index 279f095b63ec01b9ed6202d3993e7ac0845bd1a9..bba7380ae7a38c7a108b394f2b0349cdbca03155 100644
--- a/agkyra/cli.py
+++ b/agkyra/cli.py
@@ -109,6 +109,11 @@ class AgkyraCLI(cmd.Cmd):
     cnf_cmds = ConfigCommands()
     helper = protocol.SessionHelper()
 
+    def __init__(self, *args, **kwargs):
+        self.callback = kwargs.pop('callback', None)
+        self.debug = kwargs.pop('debug', None)
+        cmd.Cmd.__init__(self, *args, **kwargs)
+
     @property
     def client(self):
         """Return the helper client instace or None"""
@@ -246,7 +251,7 @@ class AgkyraCLI(cmd.Cmd):
         client = self.client
         if not client:
             sys.stderr.write('No Agkyra daemons running, starting one')
-            protocol.launch_server()
+            protocol.launch_server(self.callback, self.debug)
             sys.stderr.write(' ... ')
             self.helper.wait_session_to_load()
             sys.stderr.write('OK\n')
diff --git a/agkyra/scripts/agkyra b/agkyra/scripts/agkyra
index 62c11afe26a020ef4954c47aa7aef314633ec4b7..044bd09e68aa31e22581c91bff3ceab0047de04f 100755
--- a/agkyra/scripts/agkyra
+++ b/agkyra/scripts/agkyra
@@ -42,7 +42,7 @@ def set_debug(debug):
     LOGGER.setLevel(level)
 
 
-def run_server(debug):
+def run_server(debug, extras=None):
     set_debug(debug)
     from agkyra.protocol import SessionHelper
     LOGGER.debug('Start the session helper')
@@ -56,28 +56,42 @@ def run_server(debug):
     LOGGER.debug('Session Helper is now down')
 
 
-def run_gui(debug):
+def run_gui(debug, extras=None):
     set_debug(debug)
     from agkyra import gui
     gui.run(callback=CALLBACK, debug=debug)
 
+
+def run_cli(debug, extras=None):
+    set_debug(debug)
+    from agkyra.cli import AgkyraCLI
+    agkcli = AgkyraCLI(callback=CALLBACK, debug=debug)
+    agkcli.onecmd(' '.join(extras or ['help', ]))
+
+
 DISPATCH = {
     'server': run_server,
     'gui': run_gui,
+    'cli': run_cli,
 }
 
 parser = argparse.ArgumentParser(description='Agkyra syncer launcher')
 parser.add_argument('--debug', '-d', action='store_true',
                     help="set logging level to 'debug'")
 parser.add_argument('component', nargs="?", default="gui",
-                    help="run 'server' or 'gui' (default)")
+                    help="run 'server', 'cli', or 'gui' (default)")
+parser.add_argument('command', nargs="*", help="command in case of cli")
 
 def main():
     args = parser.parse_args()
     debug = args.debug
     set_debug(debug)
     component = args.component
-    DISPATCH[component](debug)
+    action = DISPATCH.get(component)
+    if action is None:
+        print "No such component '%s'." % component
+        return
+    action(debug, extras=args.command)
 
 if __name__ == "__main__":
     main()
diff --git a/agkyra/scripts/cli.py b/agkyra/scripts/cli.py
deleted file mode 100755
index 45ec8c20e6af0f1f56c5cc47e37b8d4343e5654f..0000000000000000000000000000000000000000
--- a/agkyra/scripts/cli.py
+++ /dev/null
@@ -1,47 +0,0 @@
-#!/usr/bin/env python
-
-# Copyright (C) 2015 GRNET S.A.
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-import os
-import sys
-
-PATH = os.path.dirname(os.path.realpath(__file__))
-LIBPATH = os.path.join(PATH, "lib")
-
-sys.path.insert(0, LIBPATH)
-
-from agkyra import config
-AGKYRA_DIR = config.AGKYRA_DIR
-
-import logging
-LOGFILE = os.path.join(AGKYRA_DIR, 'agkyra.log')
-LOGGER = logging.getLogger('agkyra')
-HANDLER = logging.FileHandler(LOGFILE)
-FORMATTER = logging.Formatter(
-    "%(name)s:%(lineno)s %(levelname)s:%(asctime)s:%(message)s")
-HANDLER.setFormatter(FORMATTER)
-LOGGER.addHandler(HANDLER)
-LOGGER.setLevel(logging.INFO)
-
-
-def main():
-    from agkyra.cli import AgkyraCLI
-    from sys import argv
-    AgkyraCLI().onecmd(' '.join(argv[1:] or ['help', ]))
-
-
-if __name__ == "__main__":
-    main()