{"library":"promptl-ai","title":"PromptL Compiler","description":"Official JavaScript/TypeScript compiler for PromptL, a language for defining dynamic LLM prompts with variables and control flow. Current version 0.12.0, actively developed by Latitude. Ships TypeScript types natively. Compiles PromptL syntax into structured JSON messages compatible with major LLM providers like OpenAI. Unlike raw template strings, PromptL provides a validated grammar, front-matter for model config, and built-in support for multi-turn conversations. Release cadence is weekly to bi-weekly. Key differentiator: human-readable prompt files with dynamic logic, compiled to provider-native formats without runtime dependencies.","language":"javascript","status":"active","last_verified":"Fri May 01","install":{"commands":["npm install promptl-ai"],"cli":null},"imports":["import { compile } from 'promptl-ai'","import type { CompiledPrompt } from 'promptl-ai'","import { PromptlError } from 'promptl-ai'"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import { compile } from 'promptl-ai';\n\nconst prompt = `---\nmodel: gpt-4\ntemperature: 0.7\n---\nYou are a helpful AI assistant.\n<user>\n  What is the capital of {{ country }}?\n</user>`;\n\nconst result = compile(prompt, { variables: { country: 'France' } });\nconsole.log(JSON.stringify(result, null, 2));\n/*\n{\n  \"model\": \"gpt-4\",\n  \"temperature\": 0.7,\n  \"messages\": [\n    { \"role\": \"system\", \"content\": \"You are a helpful AI assistant.\" },\n    { \"role\": \"user\", \"content\": \"What is the capital of France?\" }\n  ]\n}\n*/","lang":"typescript","description":"Compiles a PromptL string with variables into a provider-ready JSON object, showing variable interpolation and front-matter parsing.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}