Quickstart

Install Rivet CLI

Install latest version

curl -fsSL https://raw.githubusercontent.com/rivet-gg/cli/main/install/unix.sh | sh
Command Line

Install specific version

We recommend specifying the CLI version in CI environments. This also allows you to install prerelease versions of the CLI.

export RIVET_CLI_VERSION="v1.0.0"
curl -fsSL https://raw.githubusercontent.com/rivet-gg/cli/${RIVET_CLI_VERSION}/install/unix.sh | sh
Command Line

The export keyword is important. The variable RIVET_CLI_VERSION needs to be accessible inside the install script.

Create project

Create a new project by running the following command:

rivet init
Command Line

This creates a rivet.json config file. See the project configuration here.

Add modules

The default project comes with a set of modules preinstalled. For example, install the friends module by running the following command:

rivet module add friends
Command Line

This adds the friends module to the rivet.json file. You can also install modules manually by adding them to this config.

See a list of available modules here.

Run development server

The development server is great for testing your scripts locally. This will build & run your backend locally & hot reload when you make changes to the configuration.

rivet dev
Command Line

Deploy server (optional)

Install the Rivet CLI, then run the following:

rivet deploy prod
Command Line

Next steps