Open Source

Composable Prompt Management for TypeScript

Adapter-based architecture for storage, caching, and templating. Mix and match implementations to fit your needs. No vendor lock-in, full type safety.

View on GitHub
$ bun add @prompt-manager/core
10+
Packages
583
Tests Passing
100%
Type Safety
Zero*
Dependencies

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.

Storage3

Memory Storage

@prompt-manager/storage-memory

In-memory, perfect for testing

SQLite Storage

@prompt-manager/storage-sqlite

File-based with Bun's native SQLite

Drizzle Storage

@prompt-manager/storage-drizzle

Type-safe ORM for multiple databases

Cache2

Memory Cache

@prompt-manager/cache-memory

Fast in-memory with TTL support

Unstorage Cache

@prompt-manager/cache-unstorage

20+ backends: Redis, KV, and more

Templates2

Simple Template

@prompt-manager/template-simple

{{variable}} syntax, lightweight

Handlebars Template

@prompt-manager/template-handlebars

Full 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}}!' }
});