Skip to main content

kapi voice edit

kapi edit

Open a voice profile as YAML, edit it, and read it back into this project's store.

The profile is written to a temporary file, your editor opens it, and what you save is checked the way 'kapi voice validate' checks a file. A profile that reads cleanly goes into the store as one recorded change, which 'kapi context log' shows beside everything else the project has learned. The temporary file goes; the store holds the result.

The document states the profile entire, so a section you delete is gone from the profile, including 'constraints:'. An editor that exits with an error, and a document you save unchanged, both leave the store as it was.

With no --profile it edits the profile the recipe binds. Your editor is $VISUAL, or $EDITOR when $VISUAL is unset.

Commandvoice edit
Try it

Runs in your browser against a small sample file. Edit the command before running, or press Run to execute it as shown.

kapi voice edit
Flags
FlagTypeDefaultDescription
--colorstringautocolorize output: auto, always, never
--jqstringfilter JSON output through a jq expression (implies --json)
--jsonboolfalseOutput in JSON format
--output-formatstringOutput format: text (alias: table), json, yaml
--profilestringprofile in the project's voice store (default: the one the recipe binds)
--project, -pstringpath to a kapi.yaml project recipe or its directory (auto-discovered from cwd if omitted)
--textboolfalseOutput in text format (default)
More examples
kapi voice edit --profile acme-docs
EDITOR=vim kapi voice edit

← Back to the Command Reference