PromptForge - Build type-safe AI prompts with TypeScript

by
PromptForge is an open-source TypeScript toolkit for building production-ready AI prompts. Define prompts with type-safe schemas, validate inputs before expensive LLM calls, compose reusable prompt blocks, and compile prompts for multiple AI providers. Built for developers who want maintainable, scalable, and reliable prompt engineering workflows. MIT licensed and developer-first.

Add a comment

Replies

Best
While building AI applications, I realized prompts were becoming part of the codebase—but we were still managing them as plain strings. We already use TypeScript for type safety, Zod for validation, and reusable components across our applications. I wanted to bring those same engineering principles to prompt engineering. That's how PromptForge started.

the type-safe schema approach is honestly really smart, catches so many dumb mistakes before they hit the API. appreciate that you kept it MIT and didn't overcomplicate the API either.

honestly the type-safe approach sounds great for catching errors early. one thing that would be really useful is a built-in token counter so you can see exactly how much each compiled prompt will cost before hitting the API, would save a lot of debugging time

A built-in version control system for prompts would be a really nice addition, something like git-style diffs so you can track changes, compare prompt versions, and roll back when a tweak hurts performance. Pairing that with prompt A/B testing against real eval datasets would round out the whole workflow nicely.