Appearance
prompt
Authoring helper for long strings that live next to indented TypeScript: tool descriptions, reminder prompt fields, GitHub channel context, and error messages.
ts
import { prompt } from "@cursor/july";
// or: import { prompt } from "@cursor/july/prompt";prompt\…``
Returns a single dedented string. Common leading whitespace is stripped; a leading newline after the opening backtick is dropped so the usual multiline form stays readable in source.
ts
throw new Error(prompt`
It is outside business hours (Mon–Fri 9am–5pm ET).
Use request_author_approval, or pass approval=human_request.
`);Blank lines inside the body are preserved. Relative indentation after the common prefix is kept (handy for nested bullet lists).
When interpolating multi-line values (for example a list of services), give those lines the same indent as the prompt body so dedent stays consistent.
prompt.lines\…``
Same dedent rules, but returns string[] — one entry per line. Use this where an API wants separate lines (for example GitHub channel context):
ts
context: prompt.lines`
Merged PR detected: ${pr.url} by ${author}.
Call plan_deploy, then follow its nextStep.
`