Skip to Content
kusaw docsv1.0.0
CLI reference

kusaw prompt

Helpers for assembling step prompts

kusaw prompt

Helpers for assembling step prompts

Usage

Text
kusaw prompt [flags]

Flags

NameShortTypeDefaultDescription
--configstringPath to kusaw.yaml (overrides KUSAW_CONFIG and parent search)
--factorystringfactory name from kusaw list
--help-hboolfalsehelp for prompt

Subcommands

kusaw prompt fence

Wrap stdin in the untrusted-data fence

Text
kusaw prompt fence --source <name> [--preamble] [flags]
NameShortTypeDefaultDescription
--configstringPath to kusaw.yaml (overrides KUSAW_CONFIG and parent search)
--factorystringfactory name from kusaw list
--help-hboolfalsehelp for fence
--preambleboolfalsePrint the preamble line before the fence
--sourcestringFence source name

Example:

Text
kusaw prompt fence --source diff --preamble < notes.txt

kusaw prompt render

Render a prompt template with inert values

Text
kusaw prompt render --template <file> [--arg k=v]... [--arg-file k=path]... [--untrusted k=source]... [flags]
NameShortTypeDefaultDescription
--argstringArrayNamed argument as name=value (repeatable)
--arg-filestringArrayNamed argument whose value is the file contents (repeatable)
--configstringPath to kusaw.yaml (overrides KUSAW_CONFIG and parent search)
--factorystringfactory name from kusaw list
--help-hboolfalsehelp for render
--templatestringTemplate file to render
--untrustedstringArrayMark an argument untrusted with a fence source (repeatable)

Example:

Text
kusaw prompt render --template prompts/plan.md --arg spec=x --arg label=demo

Exit codes

CodeNameDescription
0okSuccess.
1errorRuntime error.
2usageUsage or validation error.
3rejectedControl request rejected; the error string is printed verbatim.
4not picked upControl request not picked up within the wait time while serve runs.

Example

Text
kusaw prompt fence --source diff --preamble < notes.txt

On this page