package.lock for AI prompts.
Extract prompts from your codebase, version them like dependencies, and keep everything in sync.
| Approach | Discover | Version | Test | Sync | Lock |
|---|---|---|---|---|---|
| Inline strings | - | - | - | - | - |
| Manual .txt files | - | Git | - | Manual | - |
| LangChain Hub | - | Yes | - | Manual | - |
| PromptLayer / Humanloop | - | Yes | Yes | Manual | - |
| Blogus | Auto | Git | Yes | Auto | Yes |
Blogus is different because it:
- Extracts prompts from your existing code (no migration required)
- Locks versions with content hashes (like
package.lock) - Syncs changes back to your source files automatically
# Try it now
uvx blogus scan
# Install
uv add blogusFind all LLM calls in your codebase:
$ blogus scan
Found 3 LLM API calls:
src/chat.py:15 OpenAI unversioned
src/summarize.py:42 OpenAI unversioned
lib/translate.js:28 Anthropic unversionedCreate .prompt files:
$ blogus init# prompts/summarize.prompt
---
name: summarize
model:
id: gpt-4o
temperature: 0.3
variables:
- name: text
required: true
---
Summarize in 2-3 sentences: {{text}}Generate a lock file:
$ blogus lock# prompts.lock
prompts:
summarize:
hash: sha256:a1b2c3d4...
commit: 4903f76Update your code when prompts change:
$ blogus fix# Before
content = "Summarize: " + text
# After
# @blogus:summarize sha256:a1b2c3d4
content = load_prompt("summarize", text=text)$ blogus verify || exit 1| Command | Description |
|---|---|
scan |
Find LLM API calls in your code |
init |
Create prompts directory |
prompts |
List all .prompt files |
exec <name> |
Run a prompt with variables |
analyze |
Evaluate prompt effectiveness |
test |
Generate test cases |
lock |
Generate prompts.lock |
verify |
Check lock file (for CI) |
check |
Find unversioned prompts |
fix |
Sync code with .prompt files |
demo |
Launch interactive TUI demo |
uvx --with blogus[web] blogus-webBrowse prompts, scan projects, and commit changes at http://localhost:8000.
Experience Blogus with an interactive terminal demo - perfect for presentations and learning.
# Install with TUI support
uv add blogus[tui]
# Launch the demo
blogus demoThe demo walks through:
- Scan - Live detection of prompts in a sample project
- Analyze - LLM-powered effectiveness scoring
- Compare - Side-by-side multi-model output
- Fix Workflow - Check/Fix/Lock/Verify in action
Options:
blogus demo --speed slow # Slower animations for talks
blogus demo -p ./my-project # Demo with your own project---
name: code-review
description: Review code for bugs
model:
id: gpt-4o
temperature: 0.3
variables:
- name: code
required: true
- name: language
default: python
---
Review this {{language}} code for bugs:
{{code}}┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐
│ SCAN │───▶│ VERSION │───▶│ LOCK │───▶│ SYNC │
│ │ │ │ │ │ │ │
│ Find LLM │ │ .prompt │ │ prompts │ │ Update │
│ calls │ │ files │ │ .lock │ │ code │
└──────────┘ └──────────┘ └──────────┘ └──────────┘
MIT