Skip to content

CLI Reference

Karenina provides a command-line interface for running verifications, managing presets, initializing workspaces, and starting the web server. All commands are accessed through the karenina entry point.

karenina [OPTIONS] COMMAND [ARGS]...

The only global option is --help, which displays the command list.


Commands

Command Description Page
verify Run verification on a benchmark checkpoint verify
verify-status Inspect a progressive save state file and show job status verify-status
preset Manage verification presets (list, show, delete) preset
serve Start the Karenina webapp server serve
init Initialize Karenina configuration and directories init
optimize Optimize prompts and instructions using GEPA optimize
optimize-history View optimization history
optimize-compare Compare multiple optimization runs

GEPA commands

The optimize, optimize-history, and optimize-compare commands are part of the GEPA (Guided Evolutionary Prompt Architecture) module. See optimize for details.


Quick Examples

Run verification with a preset

karenina verify checkpoint.jsonld --preset default.json

Run verification with CLI overrides

karenina verify checkpoint.jsonld --preset default.json \
  --answering-model claude-haiku-4-5 \
  --questions 0,1,2

List available presets

karenina preset list

Initialize a new workspace

karenina init

Start the web server

karenina serve --port 8080

Common Patterns

Presets vs CLI arguments

Most users start with a preset file that defines model providers, evaluation modes, and pipeline features. CLI arguments then override specific values as needed:

# Preset defines everything; CLI overrides just the model
karenina verify checkpoint.jsonld --preset claude-haiku.json --answering-model claude-sonnet-4-5

See Configuration Hierarchy for how presets, CLI arguments, and environment variables interact.

Progressive save and resume

For long-running verification jobs, use progressive save to periodically checkpoint progress:

# Start with progressive save (saves state every N questions)
karenina verify checkpoint.jsonld --preset default.json --progressive-save

# Check progress of a running or interrupted job
karenina verify-status state_file.json

# Resume an interrupted job
karenina verify checkpoint.jsonld --preset default.json --resume state_file.json