Skip to content

PromptXA flexible and extensible Prompt DSL

Build AI prompts with templates, variables, chaining, and intelligent expansion

Quick Start

typescript
import { P, PromptNode } from '@promptsx/core'

const builder = P()
const systemNode = new PromptNode('system')

systemNode
  .setRole('code-assistant', 'A helpful coding assistant')
  .content('You are an expert developer')
  .important('Always provide working code examples')

builder.nodes.push(systemNode)
const prompt = builder.build()

console.log(prompt)

Why PromptX?

  • 🎯 Simple & Intuitive: Easy-to-use API that makes prompt building straightforward
  • 🚀 Production Ready: 100% test coverage with comprehensive error handling
  • 🔒 Type Safe: Full TypeScript support with comprehensive type definitions
  • 📦 Lightweight: Minimal bundle size for optimal performance
  • 🔄 Flexible: Combine builder pattern with direct functions for maximum control

Released under the MIT License.