PromptLab is a powerful prompt engineering and management tool built with React and TypeScript. It allows you to create, test, and manage AI prompts using a pipeline-based approach.
- 🔄 Pipeline-based prompt processing
- 📝 Rich template management
- 🧩 Modular addon system
- 💾 Real-time preview
- 🎨 Modern UI with Tailwind CSS and shadcn/ui
- Clone the repository:
git clone https://github.com/yourusername/promptlab.git
cd promptlab- Install dependencies:
bun install- Start the development server:
bun run devsrc/- Source codelib/- Core libraries and utilitiespltl/- Prompt Lab Template Language implementationtemplates/- Template storageprompts/- Base prompt templatesassistants/- Assistant templatesaddons/- Pipeline addon templates
interpreter.ts- PLTL interpreterloader.ts- Template loadertypes.ts- Type definitions
context.tsx- React context providersutils.ts- Utility functions
components/- React componentsui/- Reusable UI componentsapp-sidebar.tsx- Sidebar componentcopyarea.tsx- Copy text areapipeline-processor.tsx- Pipeline processor
hooks/- Custom React hookspltl.ts- Pipeline operation hooksuse-mobile.tsx- Mobile detection hook
App.tsx- Main application componentmain.tsx- Application entry pointmain.css- Global styles
The structure follows a modular approach where:
src/lib/pltlhandles core PLTL functionalitysrc/componentscontains all React componentssrc/hooksprovides custom hooks for state management
- Select a base prompt from the sidebar
- Configure any required arguments
- Add optional addons to modify the output
- Enter your input text
- View and copy the processed output
The pipeline system allows you to:
- Set a base prompt template
- Add multiple addons
- Configure arguments
- Process input text through the entire pipeline
Example usage with the usePipelineOperations hook:
const { addAddon, removeAddon, replaceBasePLTL, updateArguments } = usePipelineOperations();
// Set base prompt
replaceBasePLTL(template);
// Add addon
addAddon(addon);
// Update arguments
updateArguments({ key: "value" });- React 18
- TypeScript
- Vite
- Tailwind CSS
- Radix UI
- Biome (Formatting)
MIT
- Fork the repository
- Create your feature branch
- Commit your changes
- Push to the branch
- Open a Pull Request
Built with ⚡ by Torben Haack