User-Level Configuration¶
PromptScript supports user-level configuration at ~/.promptscript/config.yaml. This provides default settings that apply across all your projects, reducing repetitive configuration.
Config File¶
Create ~/.promptscript/config.yaml:
version: '1'
registry:
git:
url: https://github.com/your-org/your-registry.git
ref: main
auth:
type: token
tokenEnvVar: GITHUB_TOKEN
cache:
enabled: true
ttl: 3600000 # 1 hour
defaults:
targets:
- github
- claude
team: frontend
Fields¶
registry¶
Default registry configuration used when no project-level registry is configured.
| Field | Description |
|---|---|
registry.git.url | Git repository URL |
registry.git.ref | Branch, tag, or commit (default: main) |
registry.git.path | Subdirectory within repo |
registry.git.auth.type | Authentication: token or ssh |
registry.git.auth.tokenEnvVar | Env var containing the token |
registry.git.auth.sshKeyPath | Path to SSH key |
registry.url | HTTP registry URL |
registry.cache.enabled | Enable caching (default: true) |
registry.cache.ttl | Cache TTL in milliseconds |
defaults¶
Default values used by prs init --yes when no CLI flags are provided.
| Field | Description |
|---|---|
defaults.targets | Default compilation targets |
defaults.team | Default team namespace |
Priority Order¶
Configuration is merged from multiple sources with this priority (highest wins):
- CLI flags (
--registry,--targets, etc.) - Environment variables (
PROMPTSCRIPT_REGISTRY_GIT_URL, etc.) - Project config (
promptscript.yaml) - User config (
~/.promptscript/config.yaml)
Environment Variables¶
Override any config value with environment variables:
| Variable | Maps to |
|---|---|
PROMPTSCRIPT_REGISTRY_GIT_URL | registry.git.url |
PROMPTSCRIPT_REGISTRY_GIT_REF | registry.git.ref |
PROMPTSCRIPT_REGISTRY_URL | registry.url |
PROMPTSCRIPT_CACHE_TTL | registry.cache.ttl |
PROMPTSCRIPT_CACHE_ENABLED | registry.cache.enabled |
Example:
How It Works with prs init¶
When running prs init --yes:
- Loads user config from
~/.promptscript/config.yaml - Uses
registryfrom user config if no--registryflag provided - Uses
defaults.targetsif no--targetsflag provided - Uses
defaults.teamif no--teamflag provided - Attempts to fetch manifest from configured registry for suggestions