CLI Commands
PromptCanary CLI syntax:
bash
promptcanary [global options] <command> [command options]Global options
--dotenv <path>: path to.envfile (defaults to.envin current directory)--version: print version--help: show help
promptcanary init
Creates starter promptcanary.yaml in the current directory.
bash
promptcanary initOptions:
--test-runner <type>: also scaffoldpromptcanary.test.tsusingvitestorjest
Examples:
bash
promptcanary init --test-runner vitest
promptcanary init --test-runner jestpromptcanary validate <file>
Loads and validates config file.
bash
promptcanary validate promptcanary.yamlExit codes:
0valid config1invalid config
promptcanary run <file>
Runs tests against configured providers and stores results in SQLite.
bash
promptcanary run promptcanary.yamlFlags:
--json: output machine-readable JSON--verbose: print progress lines for each completed provider run
Examples:
bash
promptcanary run promptcanary.yaml --verbose
promptcanary run promptcanary.yaml --json
promptcanary --dotenv ~/.config/promptcanary/.env run promptcanary.yamlExit codes:
0all tests passed1one or more tests failed or execution error
promptcanary results [--last N]
Shows recent stored runs from promptcanary.db.
bash
promptcanary results
promptcanary results --last 25Options:
--last <number>: number of recent runs to display (default10)