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
- Usage
- Basic Commands
- Configuration and Profile Management
- Engine Management
- Data Stream Management
- Exports
- See Also
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
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:
Configuration and Profile Management#
Use these commands to manage your raiconfig.toml
file and configuration profiles:
Command | Description |
---|---|
init | Initializes or edits a raiconfig.toml file. |
config:print | Prints the contents of your raiconfig.toml file with sensitive details redacted. |
config:explain | Shows configuration details for the active profile with sensitive details redacted. |
config:check | Checks whether the active profile is valid. |
profile:switch | Switches 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:
Command | Description |
---|---|
engines:list | Lists details about all engines. |
engines:get | Gets details about a specific engine. |
engines:create | Creates a new engine. |
engines:delete | Deletes an engine. |
transactions:list | Lists all engine transactions. |
transactions:get | Gets details about a specific transaction. |
transactions:cancel | Cancels 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:
Command | Description |
---|---|
imports:setup | Manages the CDC Service. |
imports:stream | Creates a new data stream. |
imports:wait | Waits for a data stream to load. |
imports:list | Lists details about data streams. |
imports:get | Gets details about a specific data stream. |
imports:delete | Deletes 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:
Command | Description | Notes |
---|---|---|
exports:list | Displays SQL stored procedures exported by models. | Coming Soon |
exports:delete | Deletes an exported SQL stored procedure. | Coming Soon |
See Exporting SQL Stored Procedures for more information.