
Security News
Axios Supply Chain Attack Reaches OpenAI macOS Signing Pipeline, Forces Certificate Rotation
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.
Welcome to PromptCore — the evolution of prompt-templating. We've bridged the gap between the classic templating style and the extended features you've been missing. Whether you're deep into prompt engineering or just stepping into dynamic templating, we've got your back.
Universal Templating: Compatible with both frontend and backend, written in TypeScript.
Community: We've adopted the [] over {}, paying homage to the myriad of prompt templates scattered across blog posts, invaluable Twitter snippets, and treasured shared repositories.
Extended Syntax: While we've ensured we're in tune with established prompt template collections, we've also added hints, default values, select options, and conditionals, all via an intuitive syntax.
Light & Quick: Efficient in performance without any bulk.
Crafted for Interactivity: Built mainly for interactive prompts, yet versatile enough for any templating scenario.
npm install promptcore
const { PromptCore } = require('promptcore');
let template = new PromptCore('Write an article about [topic]');
let prompt = template.render({ topic: 'prospects of AI' });
console.log(prompt); // Write an article about prospects of AI
import { PromptCore } from 'promptcore';
let template = new PromptCore('Write an article about [topic]');
let prompt = template.render({ topic: 'prospects of AI' });
console.log(prompt); // Write an article about prospects of AI
Simple prompt template:
Write an article about [topic]
Add non-rendered hints:
Write an article about [topic # e.g. prospects of AI]
Set defaults:
Write an article about [topic = LLMs in day-to-day life]
Lay out choices:
Explain meaning of [color = red, blue, green]
Yes, default value is just first option.
Write an article about an influence of music by [band = "Guns N' Roses", "The Beatles", "AC/DC"].
We are working on adding more features to make PromptCore even more powerful. Here's what we have in mind:
Choose what shows up:
Write an article about an influence of music by [band = "Guns N' Roses", The Beatles, "AC/DC", "Panic! At The Disco"]
[[if name == The Beatles]] and their song "[song = "Lucy in the Sky, with Diamonds", "She Said, She Said", "Yes, It Is"]"
[[else if name]] and their most popular songs
[[else]][[/if]].
We are thinking on more intuitive syntax for conditionals, so stay tuned!
Add pipes to variables:
Write an article about [topic | trim | capitalize first]
Add pipes to variables:
Write an article about [topic | your function: argument, another argument]
Feel free to suggest your ideas!
We built PromptCore to help us craft PromptReaper - a tool for batch processing and automating prompt templates, with community-driven collections of prompts.
Want to see your project here? Just shoot us a message!
Got ideas? Enhancements? Or just found something quirky? We're all ears and code. Dive into our contributing guidelines and be part of the magic.
MIT
FAQs
Simple and intuitive engine for prompt templating.
We found that promptcore demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.

Security News
Open source is under attack because of how much value it creates. It has been the foundation of every major software innovation for the last three decades. This is not the time to walk away from it.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.