import type { CliMessages } from './types.js'; /** Counts, grouped. A log with forty thousand torn lines should say so legibly. */ const count = (value: number): string => value.toLocaleString('en-US'); /** * A grouped count and its noun, agreeing. * * `1 calls` and `1 prompts` were reachable on ordinary input, a one-call log, a * repository with a single prompt, and two messages in this file already did the * agreement by hand while a dozen did not. A helper rather than a dozen ternaries, * so the next message written gets it for free. */ const plural = (value: number, one: string, many = `${one}s`): string => `${count(value)} ${value === 1 ? one : many}`; /** "(46 days ago)", or nothing when the age is unknown. */ const ago = (days: number | null): string => days === null ? '' : days === 0 ? ' (today)' : days === 1 ? ' (1 day ago)' : ` (${days} days ago)`; /** * English catalogue, the source of truth. * * When a message changes here, the other catalogues need the same change. * `test/i18n.test.js` in the core enforces the equivalent guarantee for the * library's catalogues. */ export const en: CliMessages = { locale: 'en', numberLocale: 'en-US', help: (d, bold) => `${bold('trazum')}, cut the cost of your prompts without losing what they ask for. ${bold('USAGE')} trazum init [dir] [--dry-run | --yes] trazum optimize [options] trazum check --max-tokens [options] trazum baseline [dir] [options] trazum eval --cases [options] trazum eval --cases --export promptfoo -o suite.json trazum route --prompt-file --cases --yes trazum plan [options] trazum verify --against [options] trazum profile [options] trazum history [options] trazum connect [options] trazum store [--prune] [options] trazum watch [--once | --interval 15m] [options] trazum serve [--port | --socket ] trazum diff [options] trazum diff --all [options] trazum rank [options] trazum doctor [dir] [options] trazum blame [options] trazum prune --cases --yes trazum where [file] trazum conform [--contract ] trazum schema trazum rollup [--json] [--html-out ] trazum position trazum receipt [--stamp] [-o ] trazum bill [--label ] [--stamp] [-o ] trazum from-claude-code [--label ] [-o ] trazum from-otel [--label-from-service] [-o ] trazum from-litellm [-o ] trazum from-anthropic [--label ] [--label-by-workspace ] [-o ] trazum from-openai [--label ] [--label-by-project ] [-o ] trazum from-openrouter [--label ] [--label-by-workspace ] [-o ] trazum reconcile --against [-o ] trazum from-helicone [-o ] trazum from-langsmith [-o ] trazum switch --to [--migration-usd ] [--cases ] trazum ownrate --gpu-usd-hour --tokens-per-second [--utilization <0-1>] trazum pulse [--max-stale-hours ] trazum bench [--workload ] [--record ] [--against --max-ratio ] [--json] trazum write [--answers ] [--json] [-o ] trazum models trazum rules [--measure ] [--level ] trazum gateway --on-cannot-tell trazum experiment --a