sentry-options-cli is a Rust-based command-line tool that validates schema definitions, validates option values against schemas, and generates deployment artifacts (JSON files or Kubernetes ConfigMaps).
Installation
The CLI is distributed as a standalone binary. Install it using one of these methods:Commands
The CLI provides several commands for different stages of the workflow:| Command | Purpose |
|---|---|
fetch-schemas | Fetch schemas from multiple repos via git sparse checkout |
validate-schema | Validate schema definitions in a directory |
validate-values | Validate option values against schemas |
write | Validate and convert YAML values to JSON or ConfigMap |
validate-schema-changes | Validate schema changes between two git SHAs |
check-option-usage | Check usage of deleted options in values |
Global options
Suppress output messages. When set, the CLI will only output errors and the final artifact (for commands that generate output).
Display help information for the CLI or a specific command.
Display the CLI version.
Exit codes
The CLI uses standard exit codes:0- Success1- Error (validation failure, I/O error, etc.)
Environment variables
Directory containing sentry-options schemas and values. Used by
validate-schema-changes command.Defaults to ~/.sentry-options.Common workflows
CI: Fetch and validate schemas
CD: Generate ConfigMaps
Local development: Generate JSON
Error messages
The CLI provides detailed error messages for common issues:- Validation errors - Schema validation failures with option name and error details
- Duplicate keys - Reports which files contain duplicate option keys
- Missing targets - Reports namespaces missing the required
defaulttarget - Unknown namespaces - Reports namespaces in values that don’t have schemas
- Invalid directory structure - Reports files that don’t follow the
namespace/target/file.yamlpattern
See also
- fetch-schemas - Fetch schemas from multiple repos
- validate-values - Validate option values
- write - Generate deployment artifacts