Prompt Manager

Installation

How to install and set up Prompt Manager

Installation

Prompt Manager is designed as a monorepo with multiple packages. You can install only the packages you need.

Prerequisites

  • Bun 1.0 or later (recommended) or Node.js 18+
  • TypeScript 5.0 or later (for TypeScript projects)

Core Package

The core package is required for all installations:

bun add @prompt-manager/core

Storage Adapters

Choose one or more storage adapters based on your needs:

Memory Storage

Best for development and testing:

bun add @prompt-manager/storage-memory

SQLite Storage

For persistent file-based storage:

bun add @prompt-manager/storage-sqlite

PostgreSQL Storage

For PostgreSQL databases:

bun add @prompt-manager/storage-postgres

Template Engines

Choose a template engine:

Simple Template

Basic string interpolation:

bun add @prompt-manager/template-simple

Handlebars Template

Full Handlebars support with helpers:

bun add @prompt-manager/template-handlebars

Cache Adapters

Optional caching for improved performance:

Memory Cache

bun add @prompt-manager/cache-memory

Redis Cache

For distributed Redis caching:

bun add @prompt-manager/cache-redis

Cloudflare KV Cache

For Cloudflare Workers and edge computing:

bun add @prompt-manager/cache-cloudflare

Example Setup

Here's a complete setup with recommended packages:

bun add @prompt-manager/core \
  @prompt-manager/storage-sqlite \
  @prompt-manager/template-handlebars \
  @prompt-manager/cache-memory

Verification

Verify your installation:

import { PromptManager } from '@prompt-manager/core';

console.log('Prompt Manager installed successfully!');