RelationalAI CLI Reference#

The RelationalAI (RAI) Command Line Interface (CLI) provides commands for initializing raiconfig.toml files for projects built with the RAI Python API and for managing the RAI Native App.

Table Of Comments#

Installation#

The CLI is bundled with the RelationalAI Python Package and can be installed using pip or your favorite package manager:

#pip install relationalai

See Get Started: Local Installation for full instructions, including installing Python.

Usage#

The CLI is invoked using the rai command. Execute rai without any arguments to see a list of all available commands:

#rai
NOTE

If you encounter the error command not found: rai, you may need to activate your project’s virtual environment.

To execute a command, type rai, followed by the command name and any options you want to specify. For example, the following creates a new RelationalAI engine named my_engine of size HIGHMEM_X64_S:

#rai engines:create --name my_engine --size HIGHMEM_X64_S

To view help for a command, use the --help flag:

#rai engines:create --help

Basic Commands#

Use these commands to view information about your environment and your models:

CommandDescription
versionDisplay version information.
debuggerOpen the RAI debugger.

Configuration and Profile Management#

Use these commands to manage your raiconfig.toml file and configuration profiles:

CommandDescription
initInitializes or edits a raiconfig.toml file.
config:printPrints the contents of your raiconfig.toml file with sensitive details redacted.
config:explainShows configuration details for the active profile with sensitive details redacted.
config:checkChecks whether the active profile is valid.
profile:switchSwitches to a different configuration profile.

See Configuration for more information on raiconfig.toml files and profiles.

Engine Management#

The following commands manage the engines that execute queries from RAI Python models:

CommandDescription
engines:listLists details about all engines.
engines:getGets details about a specific engine.
engines:createCreates a new engine.
engines:deleteDeletes an engine.
transactions:listLists all engine transactions.
transactions:getGets details about a specific transaction.
transactions:cancelCancels a transaction.

See Compute Resources for more information on engines an engine management.

Data Stream Management#

Use these commands to manage data streams and the CDC Service:

CommandDescription
imports:setupManages the CDC Service.
imports:streamCreates a new data stream.
imports:waitWaits for a data stream to load.
imports:listLists details about data streams.
imports:getGets details about a specific data stream.
imports:deleteDeletes a data stream.

See Data Management for more information on data streams and the CDC Service.

Exports#

Use these commands to manage SQL stored procedures exported by RAI Python models:

CommandDescriptionNotes
exports:listDisplays SQL stored procedures exported by models. Coming Soon
exports:deleteDeletes an exported SQL stored procedure. Coming Soon

See Exporting SQL Stored Procedures for more information.

See Also#