This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
This is the Spice.ai OSS Cookbook — a collection of self-contained "recipes" demonstrating how to use Spice.ai for data and AI applications. Each top-level directory is an independent recipe (e.g., ai/, kafka/, postgres/, cqrs/).
Every recipe follows the same pattern:
spicepod.yaml— Spice.ai configuration file defining datasets, models, views, and acceleration settingsREADME.md— Step-by-step instructions to run the recipe- Optional:
docker-compose.yml/compose.yaml,Makefile,.env.example, data files, helper scripts
Recipes are not interdependent — each can be run in isolation from its own directory.
- Datasets (
datasets:): Data sources with afrom:URI (e.g.,postgres:,s3://,file:,duckdb:) and optionalacceleration:block for local materialization - Models (
models:): LLM configurations (e.g.,from: openai:gpt-4o-mini) with API key references via${secrets:KEY_NAME} - Views (
views:): SQL-defined virtual tables - Catalogs (
catalogs:): Connectors to external catalog systems (Databricks Unity, Iceberg, Glue) - Secrets are loaded from
.envfiles using${secrets:VAR_NAME}or${env:VAR_NAME}syntax
# Install Spice CLI
curl https://install.spiceai.org | /bin/bash
# Run any recipe
cd <recipe-dir>
spice run # starts the Spice runtime (spiced)
spice sql # opens interactive SQL REPL against the running instanceSome recipes require Docker infrastructure — check for Makefile, docker-compose.yml, or compose.yaml:
make # or docker compose up -d
spice runSpice runtime listens on:
- 50051 — Arrow Flight (primary query protocol)
- 8090 — HTTP API
- 9090 — OpenTelemetry metrics
Tests use a reusable GitHub Actions workflow (.github/workflows/codex-test-reusable.yml) that:
- Installs the Spice CLI
- Uses Codex CLI to execute each recipe's README instructions verbatim
- Parses output for
TEST PASSED/TEST FAILED
To add a new testable recipe:
- Create
.github/workflows/codex-test-<name>.ymlcalling the reusable workflow - Register it in
.github/workflows/spice-qa.ymlunder the appropriate matrix (trigger-simple-recipesfor no secrets,trigger-secrets-recipesfor API-key-dependent recipes)
The spice-qa.yml orchestrator runs weekly and can be triggered manually with version and secrets options.
The data/ directory contains CSV files (e.g., taxi_zone_lookup.csv, customer_feedback.csv) referenced by multiple recipes via relative paths like file:../data/filename.csv.
- Each recipe must be self-contained with its own
spicepod.yamlandREADME.md - READMEs should include exact CLI commands and expected output — they serve as both documentation and test scripts
- Use
.env.exampleto document required secrets; actual.envfiles are gitignored - The
spicepod.yamlformat isversion: v1,kind: Spicepod - Prefer public datasets (e.g.,
s3://spiceai-public-datasets/) for recipes that don't require external credentials