Skip to main content
The Know Your AI CLI lets you run evaluations, check results, and manage datasets directly from your terminal. It is ideal for quick testing, scripting, and CI/CD integration.

Prerequisites

1

Install the CLI

2

Set your DSN

Get your DSN from the Know Your AI dashboard under Product Settings, API Keys.
3

Verify your setup

All six checks should show .

Evaluation workflow

A typical CLI evaluation workflow follows four steps:

1. List available evaluations and datasets

Output:

2. Inspect an evaluation

Output:

3. Run the evaluation

The CLI shows real-time progress:
When complete:

Limit prompts per dataset

This sends a maximum of 10 prompts from each linked dataset — useful for quick smoke tests.

Set a custom timeout

Wait up to 20 minutes for the evaluation to complete (default is 10 minutes).

Enable debug logging

Shows detailed HTTP request/response logs and internal state transitions.

4. View past results

Output:

View full evaluation history

Shows all evaluation runs across all evaluations in your product:

Command reference

Flags reference

Scripting and CI/CD

Exit codes

Shell script example

GitHub Actions example

Tips

Quick smoke test

Use --max-prompts 5 for a fast sanity check before running the full evaluation.

Always run doctor first

If something seems wrong, kya doctor will tell you exactly which part of the pipeline is broken.

Combine with SDK

Use the CLI for ad-hoc testing and the SDK for automated pipelines. Both create runs visible in the dashboard.

Pipe output

CLI output is designed for both humans and machines. Combine with grep or jq for custom reporting.