Index: src/Actions/Action.hpp
===================================================================
--- src/Actions/Action.hpp	(revision 76096d54add38ae24a29f974d65800c56758f43d)
+++ src/Actions/Action.hpp	(revision 46b181b75fcf35315b1a48e596f52f7cf2388766)
@@ -14,4 +14,5 @@
 #endif
 
+#include <iosfwd>
 #include <string>
 
@@ -167,4 +168,10 @@
   const std::string help() const;
 
+  /** Prints what would be necessary to add the Action from the Command Line Interface.
+   *
+   * \param ost output stream to print to
+   */
+  virtual void outputAsCLI(std::ostream &ost) const=0;
+
   /**
    * Traits resemble all necessary information that "surrounds" an action, such as
Index: src/Actions/ActionQueue.cpp
===================================================================
--- src/Actions/ActionQueue.cpp	(revision 76096d54add38ae24a29f974d65800c56758f43d)
+++ src/Actions/ActionQueue.cpp	(revision 46b181b75fcf35315b1a48e596f52f7cf2388766)
@@ -39,6 +39,9 @@
 #include "CodePatterns/Assert.hpp"
 #include "CodePatterns/IteratorAdaptors.hpp"
+#include "CodePatterns/Log.hpp"
 #include "CodePatterns/Singleton_impl.hpp"
 
+#include <string>
+#include <sstream>
 #include <vector>
 
@@ -88,4 +91,16 @@
 }
 
+void ActionQueue::outputAsCLI(std::ostream &output) const
+{
+  for (ActionQueue_t::const_iterator iter = queue.begin();
+      iter != queue.end();
+      ++iter) {
+    if (iter != queue.begin())
+      output << " ";
+    (*iter)->outputAsCLI(output);
+  }
+  output << std::endl;
+}
+
 const ActionTrait& ActionQueue::getActionsTrait(const std::string &name) const
 {
Index: src/Actions/ActionQueue.hpp
===================================================================
--- src/Actions/ActionQueue.hpp	(revision 76096d54add38ae24a29f974d65800c56758f43d)
+++ src/Actions/ActionQueue.hpp	(revision 46b181b75fcf35315b1a48e596f52f7cf2388766)
@@ -88,4 +88,12 @@
   const ActionTrait& getActionsTrait(const std::string &name) const;
 
+  /** Print the current contents of the queue as CLI instantiated list of Actions.
+   *
+   * This is useful for storing the current session.
+   *
+   * \param output output stream to print to
+   */
+  void outputAsCLI(std::ostream &output) const;
+
   /** Undoes last called Action.
    *
Index: src/Actions/ActionSequence.cpp
===================================================================
--- src/Actions/ActionSequence.cpp	(revision 76096d54add38ae24a29f974d65800c56758f43d)
+++ src/Actions/ActionSequence.cpp	(revision 46b181b75fcf35315b1a48e596f52f7cf2388766)
@@ -40,4 +40,6 @@
 
 #include "CodePatterns/Assert.hpp"
+
+#include <iostream>
 
 using namespace MoleCuilder;
@@ -156,2 +158,10 @@
   return shouldUndo;
 }
+
+void ActionSequence::outputAsCLI(std::ostream &ost) const
+{
+  for(std::deque<Action*>::const_iterator it=actions.begin();it!=actions.end();++it){
+    (*it)->outputAsCLI(ost);
+    ost << std::endl;
+  }
+}
Index: src/Actions/ActionSequence.hpp
===================================================================
--- src/Actions/ActionSequence.hpp	(revision 76096d54add38ae24a29f974d65800c56758f43d)
+++ src/Actions/ActionSequence.hpp	(revision 46b181b75fcf35315b1a48e596f52f7cf2388766)
@@ -44,4 +44,6 @@
   bool shouldUndo();
 
+  void outputAsCLI(std::ostream &ost) const;
+
 protected:
   stateSet callAll(bool); // Dummy parameter to allow overloading
Index: src/Actions/Action_impl_header.hpp
===================================================================
--- src/Actions/Action_impl_header.hpp	(revision 76096d54add38ae24a29f974d65800c56758f43d)
+++ src/Actions/Action_impl_header.hpp	(revision 46b181b75fcf35315b1a48e596f52f7cf2388766)
@@ -212,4 +212,6 @@
   bool shouldUndo();
 
+  void outputAsCLI(std::ostream &ost) const;
+
   struct PARAMS : ActionParameters {
     //!> constructor for class PARAMS, setting valid ranges
Index: src/Actions/Action_impl_pre.hpp
===================================================================
--- src/Actions/Action_impl_pre.hpp	(revision 76096d54add38ae24a29f974d65800c56758f43d)
+++ src/Actions/Action_impl_pre.hpp	(revision 46b181b75fcf35315b1a48e596f52f7cf2388766)
@@ -40,4 +40,5 @@
 #include <boost/preprocessor/control/if.hpp>
 #include <boost/preprocessor/debug/assert.hpp>
+#include <boost/preprocessor/facilities/empty.hpp>
 #include <boost/preprocessor/iteration/local.hpp>
 #include <boost/preprocessor/list/adt.hpp>
@@ -45,4 +46,5 @@
 #include <boost/preprocessor/repetition/repeat.hpp>
 #include <boost/preprocessor/seq/elem.hpp>
+#include <boost/preprocessor/seq/filter.hpp>
 #include <boost/preprocessor/seq/push_back.hpp>
 #include <boost/preprocessor/seq/seq.hpp>
@@ -141,4 +143,22 @@
   , Traits.getDescription()\
   );
+
+// prints command line call for this Action for paramtypes with tokens
+#define outputAsCLI_print(z,n,output) \
+    output << \
+    BOOST_PP_IF(n, BOOST_PP_STRINGIZE( ) , BOOST_PP_STRINGIZE() ) \
+      << "--" << \
+    BOOST_PP_SEQ_ELEM(n, paramtokens) \
+      << " \"" << params. \
+          BOOST_PP_SEQ_ELEM(n, paramreferences) \
+          .get() \
+      << "\"";
+
+// prints if statement to check two strings (paramtokens[n] vs. TOKEN)
+#define checkpresenttoken_print(z, n, TOKEN, booltoken) \
+    if ( std::string(\
+        BOOST_PP_SEQ_ELEM(n, paramtokens) )\
+        == getName()) \
+        booltoken = false;
 
 // print an initialiser list, i.e. "var( token, valid (,default) )(,)"
@@ -275,4 +295,23 @@
 };
 
+// =========== output as CLI ===========
+void ACTION::outputAsCLI(std::ostream &ost) const {
+  // check whether TOKEN is also an option
+  // is a bit ugly as preprocessor cannot compare strings
+  bool status = true;
+#if defined paramtokens && BOOST_PP_NOT_EQUAL(MAXPARAMTYPES,0)
+#define BOOST_PP_LOCAL_MACRO(n) checkpresenttoken_print(~, n, TOKEN, status)
+#define BOOST_PP_LOCAL_LIMITS  (0, MAXPARAMTYPES-1)
+#include BOOST_PP_LOCAL_ITERATE()
+#endif
+  if (status) { ost << "--" << TOKEN; }
+  // then print option along with each argument if set
+#if defined paramtypes && defined paramreferences && BOOST_PP_NOT_EQUAL(MAXPARAMTYPES,0)
+#define BOOST_PP_LOCAL_MACRO(n) outputAsCLI_print(~, n, ost)
+#define BOOST_PP_LOCAL_LIMITS  (0, MAXPARAMTYPES-1)
+#include BOOST_PP_LOCAL_ITERATE()
+#endif
+}
+
 // =========== time the action ===========
 // we need this here to have the correct function name
Index: src/Actions/Calculation.hpp
===================================================================
--- src/Actions/Calculation.hpp	(revision 76096d54add38ae24a29f974d65800c56758f43d)
+++ src/Actions/Calculation.hpp	(revision 46b181b75fcf35315b1a48e596f52f7cf2388766)
@@ -42,4 +42,6 @@
   virtual bool shouldUndo();
 
+  virtual void outputAsCLI(std::ostream &ost) const;
+
   /**
    * Does the actual calculation and returns the result.
Index: src/Actions/Calculation_impl.hpp
===================================================================
--- src/Actions/Calculation_impl.hpp	(revision 76096d54add38ae24a29f974d65800c56758f43d)
+++ src/Actions/Calculation_impl.hpp	(revision 46b181b75fcf35315b1a48e596f52f7cf2388766)
@@ -18,4 +18,5 @@
 
 #include <cassert>
+#include <iostream>
 
 using namespace MoleCuilder;
@@ -66,4 +67,9 @@
 }
 
+template<typename T>
+void Calculation<T>::outputAsCLI(std::ostream &ost) const
+{
+}
+
 // methods for calculation infrastructure
 
Index: src/Actions/ErrorAction.cpp
===================================================================
--- src/Actions/ErrorAction.cpp	(revision 76096d54add38ae24a29f974d65800c56758f43d)
+++ src/Actions/ErrorAction.cpp	(revision 46b181b75fcf35315b1a48e596f52f7cf2388766)
@@ -79,2 +79,5 @@
   return false;
 }
+
+void ErrorAction::outputAsCLI(std::ostream &ost) const
+{}
Index: src/Actions/ErrorAction.hpp
===================================================================
--- src/Actions/ErrorAction.hpp	(revision 76096d54add38ae24a29f974d65800c56758f43d)
+++ src/Actions/ErrorAction.hpp	(revision 46b181b75fcf35315b1a48e596f52f7cf2388766)
@@ -29,4 +29,6 @@
   virtual bool shouldUndo();
 
+  void outputAsCLI(std::ostream &ost) const;
+
 private:
   virtual Dialog * createDialog();
Index: src/Actions/MakroAction.cpp
===================================================================
--- src/Actions/MakroAction.cpp	(revision 76096d54add38ae24a29f974d65800c56758f43d)
+++ src/Actions/MakroAction.cpp	(revision 46b181b75fcf35315b1a48e596f52f7cf2388766)
@@ -127,2 +127,7 @@
   return actions.shouldUndo();
 }
+
+void MakroAction::outputAsCLI(std::ostream &ost) const
+{
+  actions.outputAsCLI(ost);
+}
Index: src/Actions/MakroAction.hpp
===================================================================
--- src/Actions/MakroAction.hpp	(revision 76096d54add38ae24a29f974d65800c56758f43d)
+++ src/Actions/MakroAction.hpp	(revision 46b181b75fcf35315b1a48e596f52f7cf2388766)
@@ -37,4 +37,6 @@
   bool shouldUndo();
 
+  virtual void outputAsCLI(std::ostream &ost) const;
+
   // must be called after all primitive actions are present
   virtual void prepare(ActionRegistry &AR);
Index: src/Actions/MakroAction_impl_header.hpp
===================================================================
--- src/Actions/MakroAction_impl_header.hpp	(revision 76096d54add38ae24a29f974d65800c56758f43d)
+++ src/Actions/MakroAction_impl_header.hpp	(revision 46b181b75fcf35315b1a48e596f52f7cf2388766)
@@ -218,4 +218,6 @@
   bool shouldUndo();
 
+  void outputAsCLI(std::ostream &ost) const;
+
   struct PARAMS : ActionParameters {
     //!> constructor for class PARAMS, setting valid ranges
Index: src/Actions/MakroAction_impl_pre.hpp
===================================================================
--- src/Actions/MakroAction_impl_pre.hpp	(revision 76096d54add38ae24a29f974d65800c56758f43d)
+++ src/Actions/MakroAction_impl_pre.hpp	(revision 46b181b75fcf35315b1a48e596f52f7cf2388766)
@@ -142,4 +142,22 @@
   );
 
+// prints command line call for this Action for paramtypes with tokens
+#define outputAsCLI_print(z,n,output) \
+    output << \
+    BOOST_PP_IF(n, BOOST_PP_STRINGIZE( ) , BOOST_PP_STRINGIZE() ) \
+      << "--" << \
+    BOOST_PP_SEQ_ELEM(n, paramtokens) \
+      << " \"" << params. \
+          BOOST_PP_SEQ_ELEM(n, paramreferences) \
+          .get() \
+      << "\"";
+
+// prints if statement to check two strings (paramtokens[n] vs. TOKEN)
+#define checkpresenttoken_print(z, n, TOKEN, booltoken) \
+    if ( std::string(\
+        BOOST_PP_SEQ_ELEM(n, paramtokens) )\
+        == getName()) \
+        booltoken = false;
+
 // print an initialiser list, i.e. "var( token, valid (,default) )(,)"
 #define valid_print(z,n,TOKENLIST, VARLIST, VALIDLIST, DEFAULTLIST) \
@@ -276,4 +294,23 @@
 };
 
+// =========== output as CLI ===========
+void ACTION::outputAsCLI(std::ostream &ost) const {
+  // check whether TOKEN is also an option
+  // is a bit ugly as preprocessor cannot compare strings
+  bool status = true;
+#if defined paramtokens && BOOST_PP_NOT_EQUAL(MAXPARAMTYPES,0)
+#define BOOST_PP_LOCAL_MACRO(n) checkpresenttoken_print(~, n, TOKEN, status)
+#define BOOST_PP_LOCAL_LIMITS  (0, MAXPARAMTYPES-1)
+#include BOOST_PP_LOCAL_ITERATE()
+#endif
+  if (status) { ost << "--" << TOKEN; }
+  // then print option along with each argument if set
+#if defined paramtypes && defined paramreferences && BOOST_PP_NOT_EQUAL(MAXPARAMTYPES,0)
+#define BOOST_PP_LOCAL_MACRO(n) outputAsCLI_print(~, n, ost)
+#define BOOST_PP_LOCAL_LIMITS  (0, MAXPARAMTYPES-1)
+#include BOOST_PP_LOCAL_ITERATE()
+#endif
+}
+
 // =========== time the action ===========
 // we need this here to have the correct function name
Index: src/Actions/ManipulateAtomsProcess.cpp
===================================================================
--- src/Actions/ManipulateAtomsProcess.cpp	(revision 76096d54add38ae24a29f974d65800c56758f43d)
+++ src/Actions/ManipulateAtomsProcess.cpp	(revision 46b181b75fcf35315b1a48e596f52f7cf2388766)
@@ -84,4 +84,7 @@
 }
 
+void ManipulateAtomsProcess::outputAsCLI(std::ostream &ost) const
+{}
+
 void ManipulateAtomsProcess::doManipulate(World *world){
   setMaxSteps(world->numAtoms());
Index: src/Actions/ManipulateAtomsProcess.hpp
===================================================================
--- src/Actions/ManipulateAtomsProcess.hpp	(revision 76096d54add38ae24a29f974d65800c56758f43d)
+++ src/Actions/ManipulateAtomsProcess.hpp	(revision 46b181b75fcf35315b1a48e596f52f7cf2388766)
@@ -38,4 +38,6 @@
   virtual bool shouldUndo();
 
+  void outputAsCLI(std::ostream &ost) const;
+
   virtual void doManipulate(World *);
 
Index: src/Actions/MethodAction.cpp
===================================================================
--- src/Actions/MethodAction.cpp	(revision 76096d54add38ae24a29f974d65800c56758f43d)
+++ src/Actions/MethodAction.cpp	(revision 46b181b75fcf35315b1a48e596f52f7cf2388766)
@@ -79,4 +79,7 @@
 }
 
+void MethodAction::outputAsCLI(std::ostream &ost) const
+{}
+
 bool MethodAction::shouldUndo(){
   return true;
Index: src/Actions/MethodAction.hpp
===================================================================
--- src/Actions/MethodAction.hpp	(revision 76096d54add38ae24a29f974d65800c56758f43d)
+++ src/Actions/MethodAction.hpp	(revision 46b181b75fcf35315b1a48e596f52f7cf2388766)
@@ -34,4 +34,6 @@
   virtual bool shouldUndo();
 
+  void outputAsCLI(std::ostream &ost) const;
+
 protected:
   virtual Dialog * fillDialog(Dialog *dialog);
Index: src/Actions/Reaction.hpp
===================================================================
--- src/Actions/Reaction.hpp	(revision 76096d54add38ae24a29f974d65800c56758f43d)
+++ src/Actions/Reaction.hpp	(revision 46b181b75fcf35315b1a48e596f52f7cf2388766)
@@ -41,4 +41,6 @@
 
   virtual bool shouldUndo();
+
+  virtual void outputAsCLI(std::ostream &ost) const;
 
   /**
Index: src/Actions/Reaction_impl.hpp
===================================================================
--- src/Actions/Reaction_impl.hpp	(revision 76096d54add38ae24a29f974d65800c56758f43d)
+++ src/Actions/Reaction_impl.hpp	(revision 46b181b75fcf35315b1a48e596f52f7cf2388766)
@@ -65,4 +65,8 @@
 }
 
+template<typename T>
+void Reaction<T>::outputAsCLI(std::ostream &ost) const
+{}
+
 // methods for calculation infrastructure
 
Index: src/Actions/Reaction_impl_header.hpp
===================================================================
--- src/Actions/Reaction_impl_header.hpp	(revision 76096d54add38ae24a29f974d65800c56758f43d)
+++ src/Actions/Reaction_impl_header.hpp	(revision 46b181b75fcf35315b1a48e596f52f7cf2388766)
@@ -206,4 +206,6 @@
   virtual ~REACTION();
 
+  void outputAsCLI(std::ostream &ost) const;
+
   virtual RETURNTYPE * doCalc();
 
Index: src/Actions/Reaction_impl_pre.hpp
===================================================================
--- src/Actions/Reaction_impl_pre.hpp	(revision 76096d54add38ae24a29f974d65800c56758f43d)
+++ src/Actions/Reaction_impl_pre.hpp	(revision 46b181b75fcf35315b1a48e596f52f7cf2388766)
@@ -126,4 +126,22 @@
   );
 
+// prints command line call for this Action for paramtypes with tokens
+#define outputAsCLI_print(z,n,output) \
+    output << \
+    BOOST_PP_IF(n, BOOST_PP_STRINGIZE( ) , BOOST_PP_STRINGIZE() ) \
+      << "--" << \
+    BOOST_PP_SEQ_ELEM(n, paramtokens) \
+      << " \"" << params. \
+          BOOST_PP_SEQ_ELEM(n, paramreferences) \
+          .get() \
+      << "\"";
+
+// prints if statement to check two strings (paramtokens[n] vs. TOKEN)
+#define checkpresenttoken_print(z, n, TOKEN, booltoken) \
+    if ( std::string(\
+        BOOST_PP_SEQ_ELEM(n, paramtokens) )\
+        == getName()) \
+        booltoken = false;
+
 // prints set/queryCurrentValue (command) for paramreferences and paramtokens
 #define value_print(z, n, container, prefix) \
@@ -184,4 +202,23 @@
         return dialog;
 };
+
+// =========== output as CLI ===========
+void REACTION::outputAsCLI(std::ostream &ost) const {
+  // check whether TOKEN is also an option
+  // is a bit ugly as preprocessor cannot compare strings
+  bool status = true;
+#if defined paramtokens && BOOST_PP_NOT_EQUAL(MAXPARAMTYPES,0)
+#define BOOST_PP_LOCAL_MACRO(n) checkpresenttoken_print(~, n, TOKEN, status)
+#define BOOST_PP_LOCAL_LIMITS  (0, MAXPARAMTYPES-1)
+#include BOOST_PP_LOCAL_ITERATE()
+#endif
+  if (status) { ost << "--" << TOKEN; }
+  // then print option along with each argument if set
+#if defined paramtypes && defined paramreferences && BOOST_PP_NOT_EQUAL(MAXPARAMTYPES,0)
+#define BOOST_PP_LOCAL_MACRO(n) outputAsCLI_print(~, n, ost)
+#define BOOST_PP_LOCAL_LIMITS  (0, MAXPARAMTYPES-1)
+#include BOOST_PP_LOCAL_ITERATE()
+#endif
+}
 
 // =========== command for calling action directly ===========
Index: src/Actions/unittests/ActionSequenceUnitTest.cpp
===================================================================
--- src/Actions/unittests/ActionSequenceUnitTest.cpp	(revision 76096d54add38ae24a29f974d65800c56758f43d)
+++ src/Actions/unittests/ActionSequenceUnitTest.cpp	(revision 46b181b75fcf35315b1a48e596f52f7cf2388766)
@@ -85,4 +85,6 @@
     return true;
   }
+  void outputAsCLI(std::ostream &ost) const
+  {}
 };
 
@@ -114,4 +116,6 @@
    return true;
   }
+  void outputAsCLI(std::ostream &ost) const
+  {}
 };
 
@@ -146,4 +150,6 @@
     return true;
   }
+  void outputAsCLI(std::ostream &ost) const
+  {}
   bool wasCalled(){
     return called;
Index: src/UIElements/Menu/TextMenu/TxMenuLeaveAction.cpp
===================================================================
--- src/UIElements/Menu/TextMenu/TxMenuLeaveAction.cpp	(revision 76096d54add38ae24a29f974d65800c56758f43d)
+++ src/UIElements/Menu/TextMenu/TxMenuLeaveAction.cpp	(revision 46b181b75fcf35315b1a48e596f52f7cf2388766)
@@ -71,4 +71,7 @@
 }
 
+void TxMenu::LeaveAction::outputAsCLI(std::ostream &ost) const
+{}
+
 /** Internal function to construct the dialog.
  * We do not need this function as there is no dialog to construct.
Index: src/UIElements/Menu/TextMenu/TxMenuLeaveAction.hpp
===================================================================
--- src/UIElements/Menu/TextMenu/TxMenuLeaveAction.hpp	(revision 76096d54add38ae24a29f974d65800c56758f43d)
+++ src/UIElements/Menu/TextMenu/TxMenuLeaveAction.hpp	(revision 46b181b75fcf35315b1a48e596f52f7cf2388766)
@@ -33,4 +33,6 @@
   bool shouldUndo();
 
+  void outputAsCLI(std::ostream &ost) const;
+
 protected:
   virtual Dialog* fillDialog(Dialog *dialog);
