Skip to content

Your prompts don't belong in your codebase

Manage, test, and deploy AI prompts without touching code. Empower your whole team to iterate on prompts while developers focus on building.
Terminal window
bun add @promptlycms/prompts

Zero Hardcoded Prompts

Fetch prompts at runtime with getPrompt() and getPrompts(). Update wording, model, and temperature from the CMS - no code changes, no redeploys.

AI SDK Integration

getPrompt() returns model, temperature, and messages ready for Vercel AI SDK functions like generateText() and streamText().

Multi-Model Auto-Detection

Supports all AI SDK providers. Automatically resolves models from your CMS config - no manual provider setup.

Codegen for Type Safety

Run npx promptly generate to generate typed template variables via declaration merging. Full autocomplete in your editor.

import { createPromptlyClient } from '@promptlycms/prompts';
import { generateText } from 'ai';
const { getPrompt } = createPromptlyClient();
// fetch your prompt at runtime - no prompts harcoded in your codebase
const { userMessage, systemMessage, temperature, model } = await getPrompt(
'upsellMessage',
);
const { text } = await generateText({
model,
messages: [
{
role: 'system',
content: systemMessage,
},
{
role: 'user',
content: userMessage({
username,
persuasionLevel: 1,
recentPurchases,
}),
},
],
temperature,
});
console.log(text);