Skip to content

niujuxin/promptlab

Repository files navigation

PromptLab

PromptLab is a browser-first prompt notebook for people who iterate on prompts a lot.

Instead of managing everything in chat threads, PromptLab gives you a structured workspace where you can edit prompt cells, run them, and compare output quickly.

PromptLab workspace screenshot

Why I built this

Most chatbox-based tools have friction for serious prompt work:

  1. Prompt iteration is painful. When tuning prompts, you usually need to adjust wording while looking at responses. In chat UIs, this often means creating many new conversations just to test small changes.

  2. Temporary workflow prompts are awkward. For tasks like paper writing, you may need a temporary system-style instruction. It is not stable enough to create a dedicated agent/bot, but copying it into every new chat is repetitive. Keeping it in one chat also keeps accumulating irrelevant context.

  3. LLM APIs are fragmented. Different providers have different API styles and setup steps. PromptLab tries to unify this into one workflow: choose provider/model and run.

What PromptLab can do

  • Build prompts with multiple editable cells.
  • Include/exclude specific cells for each run.
  • Stream responses in real time.
  • View output as raw text or rendered markdown.
  • Save model/provider configurations.
  • Save provider credentials per provider.
  • Export/import notebook snapshots as JSON.

How to use PromptLab

  1. Go to Settings and set provider API info (Base URL + API Key).
  2. Create an LLM Bot config (name, provider, model).
  3. Write your prompt across multiple cells.
  4. Toggle which cells should be included in the current run.
  5. Click Run to stream output.
  6. Refine cells and run again without creating new chat threads.

Access options

Option 1: Use the hosted page (GitHub Pages)

Open PromptLab directly:

Option 2: Deploy your own

Build and host the static dist/ output on any static platform.

Supported options include:

  • GitHub Pages
  • Netlify
  • Vercel (static)
  • Nginx / S3 + CDN

See DEPLOYMENT.md for deployment details.

Run locally

Prerequisites

  • Node.js 20+
  • npm 10+

Start

npm install
npm run dev

Build

npm run typecheck
npm run build
npm run preview

Current provider support

  • Poe
  • OpenAI-compatible APIs
  • DeepSeek

Important note

PromptLab currently stores provider credentials in browser local storage. Use caution on shared/untrusted devices.

License

MIT License. See LICENSE.

For contributors/maintainers

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors