Skip to main content
Version: Next

Spice.ai CLI Reference

The Spice CLI is a set of commands to create and manage Spicepods and interact with the Spice runtime.

Install

The Spice CLI can be installed by:

  • Running curl https://install.spiceai.org | /bin/bash
  • Using brew: brew install spiceai/spiceai/spice
  • Downloading the binary from GitHub Releases

The spice program will be added to the PATH automatically for bash, fish, and zsh shells.

After installing the Spice CLI for the first time, verify the installation by running spice version. Expected output:

CLI version:     1.x.x
Runtime version: (not installed)

The runtime is downloaded and installed automatically upon first run of spice run.

Getting started

For getting started with Spice using the Spice CLI, see the Getting Started Guide.

Use spice help for all commands and spice [command] --help for more information about a command.

A typical command-line workflow might be as follows:

# Start the runtime
spice run

Run new shell in the same folder:

# Init new app
spice init spice_app

# Add the Quickstart Spicepod
spice add spiceai/quickstart

Common commands are:

CommandDescription
spice runStart the Spice runtime, installing if necessary
spice sqlOpen an interactive SQL REPL connected to the running runtime
spice chatOpen an interactive chat REPL for AI model conversations
spice initInitialize a new Spice app with a spicepod.yaml
spice addAdd a Spicepod dependency to the project
spice loginLog in to Spice.ai Cloud Platform or other data sources
spice traceInspect traces for AI chat, SQL queries, and other runtime tasks
spice versionDisplay CLI and runtime versions
spice upgradeUpgrade the Spice CLI to the latest release
spice helpDisplay help for any command

See Spice CLI command reference for the full list of available commands.

Updating

To update to latest CLI, run the upgrade command.

spice upgrade
note

Upgrade command is supported from CLI v0.3.1. For version < 0.3.1 users have to re-run the install script.

Uninstall

The Spice CLI is installed by default to $HOME/.spice/bin/spice and a line added to the shell config, such as .zshrc

It can be uninstalled by deleting the spice binary and removing the PATH addition from the rc file.