LangWatch’s prompt management integrates with GitHub through the Prompts CLI, so you can version control your prompts alongside your code and automatically sync changes with the LangWatch platform.
How It Works
The CLI creates standard YAML files that you commit like any other file:
- 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 in prompts-lock.json
Setup for GitHub
1. Initialize Prompts in Your Repository
This creates the essential files:
Add the materialized directory to your .gitignore:
This ensures remote prompts are fetched fresh and not committed to your repository.
3. Create and Version Your Prompts
Create local prompts that are versioned with your code:
Commit your prompt files:
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
Learn More
For complete documentation on all CLI commands, advanced workflows, conflict resolution, and detailed usage examples, see the Prompts CLI documentation. Last modified on October 12, 2026