Skip to content

CLI tool for running checks #2376

@linear

Description

@linear

Summary

Add a command-line interface for running Giskard checks without writing Python code. Enable YAML/JSON-defined test suites that can be run from the terminal.

Motivation

promptfoo is CLI-first and this is a major UX advantage — users can define tests in YAML and run them with a single command. A CLI lowers the barrier for non-Python-native users and enables scripted evaluation workflows.

Scope

Core commands

  • giskard run <scenario.yaml> — run a scenario from a YAML definition
  • giskard run <suite.yaml> — run a test suite
  • giskard list checks — list available built-in checks
  • giskard validate <scenario.yaml> — validate a scenario definition without running

YAML scenario format

name: basic_test
target: "python:my_module.my_function"
steps:
  - interact:
      inputs: "What is Python?"
    check:
      - kind: string_matching
        expected: "programming language"
      - kind: not_empty

Output

  • Rich terminal output (already exists for results)
  • JUnit XML output option (added EE license #29)
  • JSON output for programmatic consumption

Dependencies

  • Serialization support already exists (Pydantic discriminated unions)
  • added EE license #29 (JUnit XML) for CI-friendly output

Acceptance Criteria

  • Run scenarios from YAML/JSON files
  • List available checks
  • Validate scenario definitions
  • Multiple output formats (rich, JUnit XML, JSON)
  • Clear error messages for invalid configurations
  • giskard --help documents all commands

Metadata

Metadata

Assignees

No one assigned

    Labels

    Help wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions