AI Zone Admin Forum Add your forum

NEWS: survey on 3000 US and UK consumers shows it is time for chatbot integration in customer service!read more..

how simply install rivescript

I would use rivescript on a USB key on any PC and any platform with a simply browser. Is this possible, and how to do this?

thank you



  [ # 1 ]

The answer is complicated and depends on how stand-alone you want the USB stick to be (i.e. whether you can connect it to *any* random PC and run it, or if the PC needs to have Perl or Python or something else pre-installed on it first).

Most of the versions of RiveScript include a program for quickly testing out a RiveScript bot, but you typically need the programming language dev environment set up to run said program.

So, the easiest way: use the Go version. The Go version compiles down into a stand-alone .exe file that should run on any Windows PC anywhere and doesn’t require any additional software (like Python, Perl, Java, Node, etc.) to be installed.

Your post actually prompted me to do a little work on the RiveScript-Go version and build a Windows exe distributable package from it:

Download the “” version. The `rivescript.exe` file is the testing program for the RiveScript-Go version, and if you just double-click it, it won’t do very much because it wants the path to your RiveScript reply files to be given to it as a command line parameter.

Instead, double-click on the “example.bat” file. This is just a convenience shortcut that runs “rivescript.exe eg/brain” to point it to the local example RiveScript brain. So if you start editing RiveScript in the “eg/brain” folder, then all you need to do to test it is run the “example.bat” file.

Note, however, that the `rivescript.exe` is just a testing program. You can load your bot and chat with it and it will remember information (like your name, etc.), but it doesn’t save that information long-term. When you exit the bot and restart it, it will have forgotten everything about you.

The harder way: use the Python, JavaScript, Perl or Java versions of RiveScript. These will require that the relevant runtime environments are installed on the PC on which you run the RiveScript bot from USB. For example, the Python version will require Python to be installed. If you use Mac OS X or Linux, you already have Python and Perl installed. A random Windows computer most likely has none of these installed, except maybe Java.

So if you’re okay with needing to have something like Perl or Python installed on a PC to be able to run RiveScript from it, what you could do is just create a tiny batch script (assuming you’re on Windows) to run the testing program and point it at your bot’s replies folder. If you use Mac or Linux,  a bash script could do the same job. Something like…

* batch file for Windows

@echo off
START python rivescript
-python/rivescript ./brain 

* bash script for Mac and Linux

python rivescript-python/rivescript ./brain 

(These would assume that “E:\rivescript-python” is the folder where the Python version of RiveScript is, and “E:\brain” is where your RiveScript bot brain is, both at the root of your USB stick or in the same location as the batch file/bash script).

- - - - - - - - - - -

I’m currently working on a complete RiveScript chat bot program called Scarecrow, and it will eventually become the preferred download for users new to RiveScript. It will come in binary format (.exe files; source code will be available) for Windows users, be able to connect actual chat bots to Slack, Google Hangouts, and other platforms (likely candidates include Facebook Messenger and IRC), and will be runnable from a USB stick.

But it’s not quite ready yet. wink


  [ # 2 ]

ok, thank you for everything. Actually go version seems the simplest but yet brings total freedom platform since it forces to have windows. Whereas before Version 1 2013 rivescripe javascript. Permetait a browser to use it anywhere (win, ubuntu, android…) . Too bad Node.js came complicate things. But thanks anyway.


  login or register to react