@promptsnap/cli
v0.2.0
Published
CLI for PromptSnap. Provides `promptsnap` binary.
Readme
@promptsnap/cli
CLI for PromptSnap — semantic snapshot testing for LLM apps.
Install
npm add -D @promptsnap/cli
npx promptsnap initCommands
| Command | Description |
|---|---|
| promptsnap init | Scaffold promptsnap.config.ts and __llm_snapshots__/ |
| promptsnap run | Run tests in verify mode, produce report.json |
| promptsnap run --mode record | Capture new baselines |
| promptsnap accept [name] | Promote pending → baseline (all if name omitted) |
| promptsnap diff | Show pending diffs without running tests |
| promptsnap list | List all committed baselines |
Configuration
promptsnap.config.ts (created by init):
import { defineConfig } from '@promptsnap/config';
export default defineConfig({
ignore: ['tone-only', 'whitespace'],
criticalClaims: ['refund_window', 'price'],
embeddingThreshold: 0.97,
judgeProvider: 'anthropic', // set ANTHROPIC_API_KEY
maxJudgeCalls: 50,
});