Skip to main content

kapi voice rewrite

kapi rewrite

Rewrite 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.

Commandvoice rewrite
Try it (demo)

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
Flags
FlagTypeDefaultDescription
--channelstringapply channel-specific overrides
--filestringexplicit path to resource file
--input-textstringtext to rewrite (use "-" or omit to read stdin)
--jsonboolfalseoutput results as JSON
--localboolfalseuse resource in current directory
--localestringapply locale-specific overrides
--namestringnamed resource in KAPI_HOME (e.g. --name project-terms)
--packstringbuilt-in starter pack name
--personastringapply an author persona's overrides (within the profile guardrails)
--profilestringvoice profile name in the local store
--profile-filestringpath to a standalone profile YAML
--project, -pstringpath to a kapi.yaml project recipe or its directory (auto-discovered from cwd if omitted)

← Back to the Command Reference