The mistral-vespa CLI manages Vespa application lifecycle — from generating migrations to deploying and testing.

Tip

Run uv run mistral-vespa --help for the full list of available commands and flags.

generate-migration

generate-migration

Create a timestamped migration stub.

uv run mistral-vespa generate-migration <name> [--app-dir <path>]
Argument/FlagDefaultDescription
namerequiredMigration name, used for filename and class stub
--app-dir./vespa_appRoot directory of the Vespa application
migrate

migrate

Build the application from migrations and deploy it. Supports both single-node (localhost) and Kubernetes deployments.

uv run mistral-vespa migrate [--app-dir <path>] [flags]
FlagDefaultDescription
--app-dir./vespa_appRoot directory of the Vespa application
--dry-runfalsePreview changes without applying them
--config-serverautoConfig server URL (host
). Defaults to http://localhost:19071 for local, or in-cluster service URL for K8s
--query-port8080Host-side query port to poll after deploy

Kubernetes flags:

FlagDefaultDescription
--k8s-namespaceKubernetes namespace (required with --k8s-instance)
--k8s-instanceKubernetes instance (required with --k8s-namespace)
--k8s-contextKubernetes context. Requires --k8s-namespace, --k8s-instance, and --config-server

Examples:

# Local Docker
uv run mistral-vespa migrate --config-server http://localhost:19071

# Kubernetes (in-cluster, e.g. CI)
uv run mistral-vespa migrate \
  --k8s-namespace my-project \
  --k8s-instance vespa

# Kubernetes (workstation, with kubectl port-forward)
uv run mistral-vespa migrate \
  --k8s-namespace my-project \
  --k8s-instance vespa \
  --k8s-context staging \
  --config-server http://localhost:19071
generate

generate

Write the application package files to disk from migrations (for inspection or CI validation). Not used for deployment.

uv run mistral-vespa generate --path <output-dir> [--app-dir <path>]
FlagDefaultDescription
--pathrequiredDirectory to write the app package files to
--app-dir./vespa_appRoot directory of the Vespa application

Output structure:

<output-dir>/
├── schemas/
│   └── <document_type>.sd
└── search/
    └── query-profiles/
        ├── <query_profile_name>.xml
        └── types/root.xml
bruno

bruno

Generate Bruno API test files from migrations.

uv run mistral-vespa bruno --query-url <url> --document-url <url> [--app-dir <path>]
FlagDefaultDescription
--query-urlrequiredVespa query endpoint URL
--document-urlrequiredVespa document/feed endpoint URL
--app-dir./vespa_appRoot directory of the Vespa application
local up

local up

Start a local Vespa container via Docker.

uv run mistral-vespa local up [--query-port <port>] [--config-port <port>] [--name <name>]
FlagDefaultDescription
--query-port8080Host port mapped to Vespa query
--config-port19071Host port mapped to Vespa config server
--namevespaDocker container name
local down

local down

Stop the local Vespa container and remove volumes.

uv run mistral-vespa local down [--name <name>]
local status

local status

Check if the local Vespa container is running.

uv run mistral-vespa local status [--name <name>]