Skip to content

PromptScript API


Interface: PromptScriptConfig

Defined in: core/src/types/config.ts:55

PromptScript configuration file (promptscript.yaml).

Properties

customConventions?

optional customConventions: Record\<string, OutputConvention>

Defined in: core/src/types/config.ts:157

Custom convention definitions. Register custom conventions that can be referenced by name in targets.


extends?

optional extends: string

Defined in: core/src/types/config.ts:64

Extend another configuration file. Paths are resolved relative to the current config file.

Example

extends: '../base-config.yaml'

inherit?

optional inherit: string

Defined in: core/src/types/config.ts:73

Inheritance path


input?

optional input: object

Defined in: core/src/types/config.ts:79

Input file configuration. Controls which PromptScript files to compile.

entry?

optional entry: string

Entry file path (defaults to '.promptscript/project.prs')

exclude?

optional exclude: string[]

Glob patterns for files to exclude

include?

optional include: string[]

Glob patterns for additional files to include


output?

optional output: object

Defined in: core/src/types/config.ts:131

Output configuration. Global output settings applied to all targets.

baseDir?

optional baseDir: string

Base directory for all output files

optional header: string

Custom header to prepend to generated files

overwrite?

optional overwrite: boolean

Whether to overwrite existing files without warning


project

project: object

Defined in: core/src/types/config.ts:67

Project identification

id

id: string

team?

optional team: string


registry

registry: object

Defined in: core/src/types/config.ts:89

Registry configuration

auth?

optional auth: object

Authentication for private registries

auth.token?

optional token: string

Token for bearer auth, or "username:password" for basic auth

auth.tokenEnvVar?

optional tokenEnvVar: string

Environment variable containing the token (alternative to token)

auth.type

type: "bearer" | "basic"

Authentication type

cache?

optional cache: object

Cache settings

cache.enabled?

optional enabled: boolean

Whether caching is enabled

cache.ttl?

optional ttl: number

Cache TTL in milliseconds

path?

optional path: string

Local path to registry

url?

optional url: string

Remote URL


targets

targets: TargetEntry[]

Defined in: core/src/types/config.ts:151

Output targets.

Can be simple names or objects with configuration:

Example

targets:
  - github
  - claude:
      convention: markdown
      output: custom/CLAUDE.md

validation?

optional validation: object

Defined in: core/src/types/config.ts:160

Validation settings

requiredGuards?

optional requiredGuards: string[]

rules?

optional rules: Record\<string, "error" | "warning" | "off">


version

version: "1"

Defined in: core/src/types/config.ts:57

Config version


watch?

optional watch: object

Defined in: core/src/types/config.ts:116

Watch mode configuration. Settings for prs compile --watch.

clearScreen?

optional clearScreen: boolean

Clear screen before each recompilation

debounce?

optional debounce: number

Debounce time in milliseconds before recompiling

exclude?

optional exclude: string[]

Glob patterns for files to ignore

include?

optional include: string[]

Glob patterns for files to watch (defaults to '**/*.prs')