verdict-cli — Fast CSV Data Validation for CI/CD Pipelines
Validate CSV files against a schema from the command line. Define data quality rules in JSON or YAML, run verdict-cli in your pipeline, get structured results and a non-zero exit code when data fails.
Built on verdict-core — a Rust validation engine with zero I/O overhead.
Installation
Or download a pre-built binary for Linux, macOS, or Windows from the releases page.
Usage
Schema format is detected from the file extension: .yaml / .yml → YAML, anything else → JSON.
Exit code 0 — all rules pass. Exit code 1 — at least one rule fails.
CI/CD integration
# GitHub Actions
- name: Validate data
run: verdict-cli data.csv schema.json
# pre-commit / shell script
||
Flags
| Flag | Default | Description |
|---|---|---|
--format |
json |
Output format: json or text |
--max-failed-samples |
100 |
Max failed row samples per rule in the report |
Schema format
JSON:
YAML:
columns:
- name: user_id
dtype: int
constraints:
- constraint: not_null
value: true
- constraint: unique
value: true
- name: score
dtype: float
constraints:
- constraint: between
value:
- name: country
dtype: str
constraints:
- constraint: is_in
value:
- name: created_date
dtype: date
format: "%Y-%m-%d"
constraints:
- constraint: after
value: "2020-01-01"
- name: created_at
dtype: datetime
format: "%Y-%m-%dT%H:%M:%S"
Supported dtypes: int, float, str, bool, date, datetime.
Date and DateTime columns accept an optional format string. If omitted, standard formats are tried (%Y-%m-%d for dates, %Y-%m-%dT%H:%M:%S and %Y-%m-%d %H:%M:%S for datetimes).
Columns without constraints are still required in the schema — they are loaded and type-checked but not validated against any rules.
Supported constraints
| Constraint | Dtypes | Example value |
|---|---|---|
not_null |
all | true |
unique |
all | true |
gt / ge / lt / le |
int, float | 18 |
equal |
int, float, str | "active" |
between |
int, float | [0, 100] |
is_in |
int, float, str | ["US", "UK", "DE"] |
matches_regex |
str | "^[A-Z]{2}$" |
contains |
str | "@" |
starts_with / ends_with |
str | "prod_" |
length_between |
str | [2, 50] |
after |
date, datetime | "2020-01-01" |
before |
date, datetime | "2025-01-01" |
between_dates |
date, datetime | ["2020-01-01", "2025-01-01"] |
Output
JSON (default):
Text (--format text):
Validation Report: FAILED (2/3 rules passed)
FAIL: column 'age' — gt(18) — 2 values failed
row 3: 15
row 7: 12
License
MIT