PHPackages                             junker/rivescript - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. junker/rivescript

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

junker/rivescript
=================

RiveScript interpreter library for PHP with Laravel support. RiveScript is a scripting language for chatterbots, making it easy to write trigger/response pairs for building up a bot's intelligence.

v0.3.0(7y ago)235MITPHPPHP &gt;=7.1

Since Jun 12Pushed 6y agoCompare

[ Source](https://github.com/Junker/rivescript-php)[ Packagist](https://packagist.org/packages/junker/rivescript)[ RSS](/packages/junker-rivescript/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependencies (5)Versions (10)Used By (0)

RiveScript-PHP
==============

[](#rivescript-php)

[![Source](https://camo.githubusercontent.com/feb0a453ffafb3b881a55c293ed559fe9173d6a5b898fdd6f8d2d58f8da5ccbe/687474703a2f2f696d672e736869656c64732e696f2f62616467652f736f757263652d76756c63616e2d2d70726f6a6563742f726976657363726970742d2d7068702d626c75652e7376673f7374796c653d666c61742d737175617265)](https://github.com/vulcan-project/rivescript-php)[![License](https://camo.githubusercontent.com/30597ff9a350144f03bffdd9183e16468e0b3ca1193e1d08591d992622738d55/687474703a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](https://tldrlegal.com/license/mit-license)

This is a RiveScript interpreter library for PHP. See the below [Working Draft](#working-draft) section for more information.

The package follows the FIG standards PSR-1, PSR-2, and PSR-4 to ensure a high level of interoperability between shared PHP code.

[![Screenshot](resources/screenshot.png)](resources/screenshot.png)

Quick Installation
------------------

[](#quick-installation)

Simply install the package through Composer.

```
composer require junker/rivescript

```

Integration
-----------

[](#integration)

The RiveScript PHP interpreter is framework agnostic. As such, the interpreter can be used as is with native PHP, or with your favorite framework.

---

Working Draft
=============

[](#working-draft)

The RiveScript Working Draft (WD) is a document that defines the standards for how RiveScript should work, from an implementation-agnostic point of view. The Working Draft should be followed when contributing to the RiveScript-PHP interpreter. If any of the current implementations don't do what the Working Draft says they should, this is considered to be a bug and you can file a bug report or send a pull request.

A copy of the working draft can be found within the `resources` directory of this repository. You may also find the latest version on the RiveScript website at .

Roadmap
=======

[](#roadmap)

Interpreter
-----------

[](#interpreter)

- Format
- Whitespace
- Standard Global Variables
- Sort +Triggers
- Sort %Previous
- Sort Replies
- Syntax Checking

Tag Priority
------------

[](#tag-priority)

- Within BEGIN/Request
- Within +Trigger
- Within Replies

Commands
--------

[](#commands)

- % Previous
- ^ Continue
- @ Redirect
- \* Condition
- // Comment

### ! Definition

[](#-definition)

- version
- global
- var
- array
- sub
- person

### &gt; Label

[](#-label)

- begin
- topic
- object

### + Trigger

[](#-trigger)

- Atomic
- Wildcard
- Alternation
- Optional
- Arrays
- Priority

### - Response

[](#--response)

- Atomic
- Random
- Weighted Random

Tags
----

[](#tags)

- ``
- `` - ``
- ``
- `` - ``
- ``
- `` - ``
- ``
- `` - `
