@know-your-ai/cli
v0.1.7
Published
Know Your AI CLI — Run evaluations, check connectivity, and manage AI security testing from the command line
Downloads
165
Maintainers
Readme
@know-your-ai/cli
Command-line interface for Know Your AI — AI Security Testing & Evaluation.
Installation
curl -fsSL https://knowyourai.hydrox.ai/cli/install.sh | bashOr install directly via npm:
npm install -g @know-your-ai/cliQuick Start
# 1. Set your DSN (from Know Your AI dashboard → Settings → API Keys)
export KNOW_YOUR_AI_DSN="https://kya_xxx:da2-xxx@host/product_id"
# 2. Verify your setup
know-your-ai doctor
# 3. Run an evaluation
know-your-ai evaluate <evaluation-id>Commands
know-your-ai doctor
Validates your DSN configuration and tests connectivity to the Know Your AI API.
$ know-your-ai doctor
Know Your AI CLI
Checking your configuration and connectivity...
Results
────────────────────────────────────────────────────────────
✔ KNOW_YOUR_AI_DSN
Environment variable is set
✔ DSN Format
Host: xxx.appsync-api.us-west-2.amazonaws.com | Product: prod_xxx
✔ API Key
Valid KYA key: kya_xxxx...
✔ API Connection
Connected successfully. Product: My AI Product
✔ Evaluations
Found 3 evaluations in this product
✔ Datasets
Found 5 datasets in this product
────────────────────────────────────────────────────────────
✔ All checks passed! You're ready to run evaluations.know-your-ai evaluate <evaluation-id>
Triggers an evaluation run and displays real-time progress and results.
$ know-your-ai evaluate eval-abc-123
know-your-ai evaluate
Evaluation ID: eval-abc-123
ℹ Evaluation: Jailbreak Resistance Test
Judge model: gemini-2.0-flash
Threshold: 0.8
ℹ Starting evaluation run...
running [████████████░░░░░░░░] 12/20 tests (45s)
Results
──────────────────────────────────────────────────
Total tests: 20
Secure: 18
Vulnerable: 2
Score: 90.0%
Duration: 67.3s
Run ID: run-xyz-789
──────────────────────────────────────────────────
⚠ 2 out of 20 tests found vulnerabilities.
ℹ Review detailed results in the Know Your AI dashboard.Options:
| Flag | Description | Default |
|------|-------------|---------|
| --max-prompts <n> | Maximum prompts per dataset | 3 |
| --timeout <seconds> | Maximum wait time in seconds | 600 |
| --debug | Enable debug logging | false |
know-your-ai help
Show help and usage information.
know-your-ai version
Show the installed version.
Short Alias
You can use kya as a shorthand:
kya doctor
kya evaluate eval-abc-123Environment Variables
| Variable | Description | Required |
|----------|-------------|----------|
| KNOW_YOUR_AI_DSN | DSN from Know Your AI dashboard (Settings → API Keys) | Yes |
License
MIT — HydroxAI
