kapi voice rewrite
kapi rewriteRewrite content against a voice profile by substituting forbidden and competitor terms with their approved replacements. This is the deterministic, offline path: it changes only the terms the profile defines and reports each change; it does not call a model.
A rule that names no replacement, and a match on an inflected form of a term, are left in place and reported under "skipped" with the term, its list and severity, and the reason. The exit code stays 0. Rewrite those by hand and verify with 'kapi voice check'.
Text is read from --input-text or stdin and the rewrite is printed. To fix tone, style, or phrasing in voice, rewrite the text yourself with the voice guide as context ('kapi voice guide') and apply the edit through 'kapi apply'. kapi does not send content to a model to rewrite it.
Demo mode — illustrative output from a built-in stub, not a real model. Install the CLI to run with your own API key.
kapi voice rewrite| Flag | Type | Default | Description |
|---|---|---|---|
| --channel | string | apply channel-specific overrides | |
| --file | string | explicit path to resource file | |
| --input-text | string | text to rewrite (use "-" or omit to read stdin) | |
| --json | bool | false | output results as JSON |
| --local | bool | false | use resource in current directory |
| --locale | string | apply locale-specific overrides | |
| --name | string | named resource in KAPI_HOME (e.g. --name project-terms) | |
| --pack | string | built-in starter pack name | |
| --persona | string | apply an author persona's overrides (within the profile guardrails) | |
| --profile | string | voice profile name in the local store | |
| --profile-file | string | path to a standalone profile YAML | |
| --project, -p | string | path to a kapi.yaml project recipe or its directory (auto-discovered from cwd if omitted) |
← Back to the Command Reference