 
 (defrecord App [session engine sandbox])
 
+(defn long-str [& strings] (string/join "\n" strings))
+(def ^:const
+  HELP_MESSAGE
+  (long-str
+    ":exit / :quit - Terminate the session and close the CLI app"
+    ":update (-f) - Update the application live against the newest version on the server. -f optional flag to grab the newest build instead of the newest starred build"
+    ":home - Navigate to the home menu of the app"
+    ":lang <lang> - change the language to <lang> (e.g. :lang en)"
+    ":stack - Show the current session frame stack"))
+
 (defn build-user-sandbox [prototype-factory restore-file]
   (let [sandbox (MockUserDataSandbox. prototype-factory)
         restore (try (BufferedInputStream. (FileInputStream. restore-file))
-                     (catch FileNotFoundException e 
+                     (catch FileNotFoundException e
                        (println "No restore file found at " restore-file)))]
     (.setAppFixtureStorageLocation sandbox (StorageManager/getStorage FormInstance/STORAGE_KEY))
     (ParseUtils/parseIntoSandbox restore sandbox, false)

           [org.commcare.util.cli MenuScreen EntityScreen]
           [org.commcare.core.parse ParseUtils]
           [org.javarosa.core.util.externalizable LivePrototypeFactory]
           [org.javarosa.core.services.storage StorageManager]
           [org.javarosa.core.model.instance FormInstance]
           [org.commcare.session SessionFrame]

        engine (CommCareConfigEngine. System/out prototype-factory)
        user-sandbox (build-user-sandbox prototype-factory restore-file)]
    (App. (CLISessionWrapper. (.getPlatform engine) user-sandbox)
          (doto engine
            (.initFromArchive ccz)
            (.initEnvironment))
          user-sandbox)))
