
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
pbt-cli
Advanced tools
The dbt + Terraform for LLM Prompts
AI teams face critical challenges when working with LLM prompts:
PBT brings software engineering best practices to prompt development:
# Instead of hardcoded prompts scattered everywhere...
# Use versioned, tested, optimized prompt files:
pbt generate --goal "Analyze customer sentiment"
pbt test sentiment.prompt.yaml
pbt optimize sentiment.prompt.yaml --strategy cost_reduce
pbt deploy --provider supabase --env production
Build reliable AI features with confidence:
# Generate prompt from requirements
pbt generate --goal "Extract action items from meeting notes"
# Test across different scenarios
pbt test meeting-analyzer.prompt.yaml
# Compare models visually in browser
pbt web # Opens interactive UI at http://localhost:8080
Reduce API costs by 60-80% without sacrificing quality:
# Analyze current costs
pbt optimize chatbot.yaml --analyze
# Word count: 2,547 | Estimated tokens: 3,211 | Monthly cost: $125
# Optimize for cost
pbt optimize chatbot.yaml --strategy cost_reduce
# Reduced to 821 tokens | New monthly cost: $32 | Savings: 74%
Write once, deploy anywhere:
# customer-support.prompt.yaml
name: customer-support
models:
- claude-3-opus
- gpt-4
- gpt-3.5-turbo
template: |
Analyze this customer message and provide:
1. Sentiment (positive/negative/neutral)
2. Intent classification
3. Suggested response
Message: {{ message }}
# Compare outputs across all models
pbt compare customer-support.prompt.yaml --input "My order never arrived!"
Build better retrieval systems:
# Create embedding-optimized chunks
pbt chunk docs/ --strategy prompt_aware --max-tokens 512 --rag
# Test retrieval quality
pbt testcomp rag-query.prompt.yaml --aspects faithfulness,relevance
Meet regulatory requirements:
# Add compliance metadata
pbt badge medical-advisor.yaml --add HIPAA-compliant --add FDA-reviewed
# Comprehensive safety testing
pbt testcomp medical-advisor.yaml tests/safety.yaml --aspects safety,accuracy
# ✅ Safety: 9.8/10 | ✅ Accuracy: 9.2/10 | APPROVED FOR PRODUCTION
# Install from PyPI (recommended)
pip install pbt-cli
# Or install from source
git clone https://github.com/prompt-build-tool/pbt
cd pbt
pip install -e .
# Initialize project
pbt init my-ai-product
cd my-ai-product
# Set up API keys (see docs/API_KEYS.md for details)
cp .env.example .env
# Add: ANTHROPIC_API_KEY=sk-ant-...
# Start building!
pbt generate --goal "Summarize legal documents"
Convert any plain text into a structured, reusable prompt:
# Simple conversion
pbt draft "Analyze customer sentiment and suggest improvements"
# With variables and custom output
pbt draft "Translate the following text to Spanish" \
--var text --var tone \
--output translator.prompt.yaml
# Interactive mode for refinement
pbt draft "Review this code for security issues" \
--goal "Security code reviewer" \
--interactive
# Short version
pbt d "Extract key insights from meeting notes"
This creates a properly structured prompt file with:
pbt web)Compare models side-by-side in real-time:
pbt web
# Opens browser with interactive comparison UI
Features:
# 1. Generate prompt from requirements
pbt generate --goal "Handle customer complaints professionally"
# 2. Creates customer-complaint-handler.prompt.yaml:
name: customer-complaint-handler
version: 1.0.0
models:
- claude-3-opus
- gpt-4
template: |
You are a professional customer service representative.
Customer Message: {{ message }}
Customer History: {{ history }}
Respond professionally addressing their concern.
variables:
message:
type: string
required: true
history:
type: string
default: "New customer"
tests:
- name: angry_customer
inputs:
message: "This is unacceptable! I want a refund NOW!"
expected_contains:
- "apologize"
- "understand your frustration"
- "help resolve"
# 3. Test the prompt
pbt test customer-complaint-handler.prompt.yaml
# ✅ All tests passed (3/3)
# 4. Compare models in web UI
pbt web
# Then test with: "My package is 2 weeks late!"
# 5. Optimize for production
pbt optimize customer-complaint-handler.prompt.yaml --strategy clarity
# Improved clarity score: 8.5 → 9.2
# 6. Deploy when ready
pbt deploy --provider supabase --env production
# research-assistant-chain.yaml
name: research-assistant
agents:
- name: researcher
prompt_file: search-papers.prompt.yaml
outputs: [papers, summaries]
- name: analyzer
prompt_file: analyze-findings.prompt.yaml
inputs:
papers: list
summaries: list
outputs: [insights, gaps]
- name: writer
prompt_file: write-report.prompt.yaml
inputs:
insights: string
gaps: list
outputs: [report]
# Execute the chain
pbt chain execute research-assistant-chain.yaml \
--input "quantum computing applications in cryptography"
# Results:
# ✅ Researcher: Found 23 relevant papers
# ✅ Analyzer: Identified 5 key insights, 3 research gaps
# ✅ Writer: Generated 2,500 word report
# 📄 Output saved to: outputs/research_report_2024-01-15.md
.prompt.yaml files work with Git, enabling PR reviewspbt test and pbt testcomppbt optimize reduces tokens by 60-80%pbt validate and pbt deploy| Feature | Command | Description |
|---|---|---|
| Generate | pbt generate | AI creates prompts from goals |
| Draft | pbt draft | Convert plain text to structured prompts |
| Test | pbt test | Automated prompt testing |
| Optimize | pbt optimize | Reduce costs, improve clarity |
| Compare | pbt compare | A/B test across models |
| Web UI | pbt web | Visual comparison dashboard |
| Deploy | pbt deploy | Push to production |
| Chain | pbt chain | Multi-agent workflows |
| Chunk | pbt chunk | RAG-optimized splitting |
my-ai-product/
├── prompts/ # Version-controlled prompts
│ ├── classifier.prompt.yaml
│ └── summarizer.prompt.yaml
├── tests/ # Test cases
│ └── test_cases.yaml
├── chains/ # Multi-agent workflows
│ └── pipeline.yaml
├── pbt.yaml # Project config
└── .env # API keys
We welcome contributions! See our Contributing Guide.
MIT License - see LICENSE
Get Started: pip install pbt-cli | Questions? GitHub Issues | Built with ❤️ by the PBT Team
FAQs
Infrastructure-grade prompt engineering for AI teams working across LLMs
We found that pbt-cli demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.