RiveScript Interpreters

Here is a collection of links to RiveScript interpreters built in various programming languages. If the language you want to see an interpreter for isn't listed, why not create it? Head to Developers for more information.

Quick navigation:

The Go, Java, JavaScript, Perl and Python interpreters may have some slight quirks and differences in their support of RiveScript. All of them currently support everything in the Working Draft, but some go above and beyond in certain areas. See my comparison of implementations for a (hopefully) up-to-date listing of specific features.

If you would like to contribute any code changes (bug fixes or feature additions), please see the contributing information.

First Party Libraries

These are RiveScript interpreters written by Noah Petherbridge. For the most part, all of these libraries will be kept in sync with new features. These are the "official" RiveScript libraries, written by the author of RiveScript!

Choose your programming language...


Go

A RiveScript interpreter for the Go programming language.

Notes:

  • This supports JavaScript object macros in RiveScript code.
  • Object macros may be defined in Go, but they must be compiled into your program (not dynamically loaded in RiveScript source code).

Install with go get

You can install the source code into your Go path:
$ go get github.com/aichaos/rivescript-go
Afterward, you can install the stand-alone RiveScript interpreter executable (which includes JavaScript object macro support):
$ go install github.com/aichaos/rivescript-go/cmd/rivescript

Documentation

Documentation for RiveScript-Go is available on Godoc:

Revision Control:

You can download the latest bleeding-edge version of RiveScript-Go at GitHub:

Download


Java

A RiveScript interpreter for the Java programming language.

Notes:

  • Since Java isn't a dynamic language, there is no default language handlers for RiveScript objects. However, there is some code included to allow you to use Perl objects.

Revision Control:

You can download the latest bleeding-edge version of RiveScript-Java at GitHub:

Download


JavaScript

A RiveScript interpreter for the JavaScript programming language.

Notes:

  • This library can be used both on the web (using jQuery, with ajax requests to load RiveScript documents), or as a module for node.js or compatible JavaScript engine.
  • This supports JavaScript objects in RiveScript code by default.

Demo

You can run a RiveScript.js demo in your browser!

Install with npm

You can install RiveScript as a Node Packaged Module (npm):
$ npm install rivescript
See also: npm package page

Embed from CDN

To embed RiveScript on your web page using a CDN link:
<script src="https://unpkg.com/rivescript@latest/dist/rivescript.min.js"></script>

Revision Control

You can check out the progress of rivescript-js on GitHub:

Download


Perl

The original RiveScript interpreter! This is RiveScript for the Perl 5 programming language.

Notes:

  • This supports Perl objects in RiveScript code by default.
  • This distribution comes with the rivescript command line utility that lets you interactively test your RiveScript bot. It can also be used in "JSON Mode" so a third-party program can interact with it.

Install with cpan

You can use cpan or cpanm (App::cpanminus) to install this module:
$ cpanm RiveScript

Revision Control

You can download the latest bleeding-edge version of RiveScript-Perl at GitHub:

Downloads


Python

A RiveScript interpreter for the Python programming language.

Notes:

  • This works for both Python 2 & Python 3.
  • This supports Python objects in RiveScript code by default.
  • The package rivescript can also be executed directly, and it will behave the same as the rivescript command line utility from RiveScript-Perl: you can interactively test your RiveScript bot with it. Also, it supports "JSON Mode", so that a third party program can communicate with your bot using JSON.

Install with pip

You can install RiveScript from the Python Package Index (PyPI):
$ pip install rivescript
# --or--
$ easy_install rivescript

Revision Control

You can download the latest bleeding-edge version of RiveScript-Python at GitHub:

Documentation

Documentation for RiveScript-Python is hosted through PyPI:

Downloads

See Also

  • rivescript-coverage-plugin is a plugin for Coverage.py which extends that package to measure code coverage for RiveScript files.

Third Party Libraries

These are RiveScript interpreters written by other authors. Some of them may still be in active development and not ready or usable yet for the general public.

C#

A RiveScript interpreter for the C# programming language.

This implementation was written by Fábio Ávila and used the Java version as reference. It's a feature-complete implementation. Check its GitHub repository for the source code and current development status.

Revision Control

You can check out the progress of RiveScript-C# at GitHub:

PHP

A RiveScript interpreter for the PHP programming language.

This implementation is being developed by formerly Shea Lewis and now Johnny Mast and is still under active development. In early 2022 it is at least 80% feature complete. Check its GitHub repository for its current development status.

Revision Control

You can check out the progress of RiveScript-PHP at GitHub:
Web design and content copyright © 2024 Noah Petherbridge.