title: Is there a good library to embed a command prompt in a scala (or java) application
body: <p>I have an application that I'd like to have a prompt in.  If it helps, this is a graph database implementation and I need a prompt just like any other database client (MySQL, Postgresql, etc.).</p>
  
  <p>So far I have my own REPL like so:</p>
  
  <pre><code>object App extends Application {
      REPL ! Read
  }
  
  object REPL extends Actor {
      def act() {
          loop {
              react {
                  case Read =&gt; {
                      print("prompt&gt; ")
                      var message = Console.readLine
                      this ! Eval(message)
                  }
                  case More(sofar) =&gt; {
                      //Eval didn't see a semicolon
                      print("    --&gt; ")
                      var message = Console.readLine
                      this ! Eval(sofar + " " + message)
                  }
                  case Eval(message) =&gt; {
                      Evaluator ! Eval(message)
                  }
                  case Print(message) =&gt; {
                      println(message)
                      //And here's the loop
                      this ! Read
                  }
                  case Exit =&gt; {
                      exit()
                  }
                  case _ =&gt; {
                      println("App: How did we get here")
                  }
              }
          }
      }
      this.start
  }
  </code></pre>
  
  <p>It works, but I would really like to have something with history.  Tab completion is not necessary.</p>
  
  <p>Any suggestions on a good library?  Scala or Java works.</p>
  
  <p>Just to be clear I don't need an REPL to evaluate my code (I get that with scala!), nor am I looking to call or use something from the command line.  I'm looking for a prompt that is my user experience when my client app starts up.</p>