RelationalAI CLI Reference#
The RelationalAI Command Line Interface (CLI) is used to initialize RelationalAI projects and manage project resources.
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 Install the relationalai
Python Package for details.
Basic 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 arguments you want to pass.
For example, the following creates a new RelationalAI engine named my-engine
of size S
:
#rai engines:create --name my-engine --size S
To view help for a command, use the --help
flag:
#rai engines:create --help
Commands#
Configuration and Profiles#
All RelationalAI projects require a configuration file,
created using rai init
,
that specifies the project’s settings, platform credentials, and other configuration options.
Use the following commands to manage your project’s configuration and profiles:
config:explain
- Inspect config status.config:check
- Check whether config is valid.profile:switch
- Switch to a different profile.
Engines#
Engines are the compute resources used to run queries and models. Use the following commands to manage engines:
engines:list
- List all engines.engines:get
- Get engine details.engines:create
- Create a new engine.engines:delete
- Delete an engine.
Imports#
Imports are objects imported into RAI, such as data from a Snowflake table, for use in models and queries. Use the following commands to manage imports:
imports:list
- List objects imported into RAI.imports:stream
- Stream an object into RAI (Snowflake only).imports:delete
- Delete an import from RAI.
Exports#
Exports are objects that are exported out of RAI for use in other systems, such as exporting query results into a Snowflake table. Use the following commands to manage exports:
This feature is currently disabled but will be available soon!
exports:list
- List objects exported out of RAI (Snowflake only).exports:delete
- Delete an export from RAI (Snowflake only).
Transactions#
Transactions are operations that modify the state of a RelationalAI model. They are created when you import data and when you run queries. Use the following commands to manage transactions:
transactions:list
- List all transactions.transactions:get
- Get transaction details.transactions:cancel
- Cancel a transaction.