Composable Prompt Management for TypeScript
Everything you need to manage prompts
Built for production with developer experience in mind
Adapter-Based Architecture
Swap storage, cache, and template implementations without changing your code. From memory to Redis, SQLite to Postgres.
Type-Safe by Default
Full TypeScript support with Zod validation. Catch errors at compile time, not in production.
Version Management
Semantic versioning with automatic sorting. Tag versions for deployment (production, staging, latest).
Built-in Analytics
Track every execution with metrics, costs, and performance data. Make data-driven decisions.
A/B Testing
Run experiments with traffic splitting. Compare prompt versions and optimize for better results.
Multiple Backends
20+ storage options via Unstorage. Redis, Cloudflare KV, filesystem, and more.
Mix & Match Adapters
Choose the implementations that fit your use case. Swap them out anytime without changing your code.
Memory Storage
@prompt-manager/storage-memoryIn-memory, perfect for testing
SQLite Storage
@prompt-manager/storage-sqliteFile-based with Bun's native SQLite
Drizzle Storage
@prompt-manager/storage-drizzleType-safe ORM for multiple databases
Memory Cache
@prompt-manager/cache-memoryFast in-memory with TTL support
Unstorage Cache
@prompt-manager/cache-unstorage20+ backends: Redis, KV, and more
Simple Template
@prompt-manager/template-simple{{variable}} syntax, lightweight
Handlebars Template
@prompt-manager/template-handlebarsFull Handlebars with helpers
Ready to use in minutes
Simple API that scales from prototype to production
Get up and running in seconds
import { PromptManager } from '@prompt-manager/core';
import { MemoryStorage } from '@prompt-manager/storage-memory';
import { MemoryCache } from '@prompt-manager/cache-memory';
const pm = new PromptManager({
storage: new MemoryStorage(),
cache: new MemoryCache(),
});
await pm.storage.savePrompt({
name: 'greeting',
version: '1.0.0',
template: { user: 'Hello {{name}}!' }
});