Pizza CLI #
The Pizza Command Line Interface (CLI) is a tool designed to facilitate quick and interactive communication with the Pizza server. It provides a convenient way for users to perform various tasks, such as querying data, managing configurations, and monitoring system status, directly from the command line.
Features #
Interactive Querying #
The Pizza CLI allows users to execute queries against the Pizza server interactively. Users can enter commands and receive immediate feedback, enabling rapid exploration and analysis of data.
Configuration Management #
With the Pizza CLI, users can manage Pizza server configurations effortlessly. They can adjust settings, update parameters, and modify configurations on the fly, all from the command line interface.
System Monitoring #
The Pizza CLI provides real-time monitoring capabilities, allowing users to track system performance, monitor resource usage, and identify potential bottlenecks or issues promptly.
Usage #
To use the Pizza CLI, simply launch the command line interface and enter the desired commands. The CLI provides intuitive prompts and options to guide users through various operations.
Options #
Start with your Pizza endpoint: pizza http://localhost:28000/
pizza [OPTIONS] [ENDPOINT]
Arguments:
[ENDPOINT] Pizza server endpoint [default: http://localhost:28000/]
Options:
-k, --api-key <KEY> API key sent as 'Authorization: Bearer' on every request;
falls back to the PIZZA_API_KEY environment variable
-h, --help Print this message
Authentication #
When the server runs with security.auth_enabled: true in pizza.yml, every
request must carry a valid API key. Give the CLI one with -k/--api-key or
the PIZZA_API_KEY environment variable:
pizza -k pz_your_api_key http://localhost:28000/
# or
PIZZA_API_KEY=pz_your_api_key pizza http://localhost:28000/
The key is sent as an Authorization: Bearer header on every request, and the
command-line flag takes precedence over the environment variable. Without a
key, an auth-enabled server rejects every request with 401.
API keys are minted with POST /_security/key — see
Security APIs. Enabling auth and where the
first bootstrap key comes from is covered in
Security.