How It Works
The CLI creates standard YAML files that work perfectly with Git workflows:- Local prompts are stored as
.prompt.yaml
files in your repository - Remote prompts are materialized locally but gitignored (fetched fresh on each sync)
- Dependencies are declared in
prompts.json
and locked inprompts-lock.json
Setup for GitHub
1. Initialize Prompts in Your Repository
2. Configure .gitignore
Add the materialized directory to your.gitignore
:
3. Create and Version Your Prompts
Create local prompts that will be versioned with your code:GitHub Actions Integration
Automatically sync prompts on every push or pull request using GitHub Actions. Create.github/workflows/langwatch-sync.yml
:
Setting Up the API Key
- Go to your LangWatch project settings
- Create new API credentials
- In your GitHub repository, go to Settings → Secrets and variables → Actions
- Add a new secret named
LANGWATCH_API_KEY
with your API key value