Skip to content

Latest commit

 

History

History
202 lines (137 loc) · 4.95 KB

File metadata and controls

202 lines (137 loc) · 4.95 KB

Prompt Workflow — AI Prompt Workflow Tool

中文 | English

A powerful, privacy‑friendly AI prompt workflow manager. Create, edit, and run multiple prompt workflows with OpenAI‑compatible APIs. Supports variables, context chaining, streaming output, and exporting results.

Features

  • Pure front‑end app — runs entirely in the browser, no server required
  • Workflow management — create, rename, delete, export/import workflows
  • Variables — use {{variable}} placeholders inside prompts
  • Chain execution — pass previous step output as context to the next step
  • Local persistence — config and workflows saved to browser localStorage
  • Streaming output — real‑time token streaming from OpenAI APIs
  • Multiple export formats — JSON / Markdown / CSV
  • Markdown rendering — toggle between rendered and raw text
  • Responsive UI — desktop and mobile friendly

Quick Start

1) Open directly

Download the project and open index.html in your browser.

2) Serve locally (optional)

# Python built‑in server
python3 -m http.server 8000

# Or Node.js http-server
npx http-server -p 8000

# Then visit: http://localhost:8000

# Or open the project folder directly in the browser

Configure API

  1. Go to the Settings tab (⚙️)
  2. Fill in Base URL (default: https://api.openai.com/v1)
  3. Enter your API Key
  4. Click Refresh to load available models
  5. Pick a model (e.g. gpt-4o-mini)
  6. Settings are saved automatically to localStorage

How to Use

Create a workflow

  1. In the Edit tab, click New
  2. Enter a name; it switches to the new workflow automatically

Manage variables

  1. In Variables, click Add
  2. Enter key/value (e.g. name: Alice)
  3. Use inside prompts as {{name}}

Add prompts

  1. Click Add to create a new prompt
  2. Reorder with Up/Down; Delete removes a prompt

Run workflow

  1. Click Run All (or go to the Run tab)
  2. Prompts execute in order
  3. If “Include previous output as context” is enabled, each output is passed to the next step
  4. Watch real‑time output and stats

Export results

  • JSON — full run data and config
  • Markdown — shareable, human‑readable
  • CSV — convenient for analysis

Workflow operations

  • Export workflow — prompts + variables to JSON
  • Import workflow — load from JSON
  • Rename / Delete — manage current workflow (at least one must remain)

Configuration Reference

Field Description Default
Base URL OpenAI‑compatible API base URL https://api.openai.com/v1
API Key Your API key
Model Model to use gpt-4o-mini
Temperature 0–2 1
Max Tokens Maximum output tokens 100000
Advanced Params Extra JSON (e.g. {"top_p":1}) {}

Run option:

  • Include previous output as context — enables chain‑of‑thought‑like chaining between steps

Shortcuts & Actions

  • Collapse/Expand all results
  • Fullscreen
  • Clear output
  • Stop running
  • Raw/Rendered (Markdown) toggle
  • Copy output

Data & Privacy

  • All data is stored locally in your browser (localStorage)
  • Nothing is uploaded anywhere
  • API Key is used only for direct API calls
  • Clearing browser data will remove all settings and workflows

Browser Support

  • Chrome/Edge (recommended)
  • Firefox
  • Safari

JavaScript must be enabled.

FAQ

How do I back up my workflows?

Use Export to download a JSON file, and Import to restore it later.

Which OpenAI‑compatible services are supported?

Any service that follows the OpenAI API spec, e.g.:

  • OpenAI official API
  • Azure OpenAI Service
  • Other compatible backends (LocalAI, FastChat, etc.)

Refresh models does nothing?

Check Base URL, API Key, network, and key permissions.

How to reset everything?

Open DevTools Console and run:

localStorage.clear()
location.reload()

What is the variable syntax?

Use double curly braces {{variable}}:

Variables: name = Alice
Prompt: Hello, I am {{name}}
Runtime: Hello, I am Alice

Tech Stack

  • HTML5 + CSS3 + ES6+ JavaScript (single‑file app)
  • OpenAI JavaScript SDK via CDN (falls back to fetch‑compatible mode)
  • markdown‑it for Markdown rendering

Project Structure

WebPromptWorkflow/
├── index.html      # Main application (HTML, CSS, JS in one file)
├── icon.svg        # App icon
├── README.md       # Chinese docs
└── README.en.md    # English docs

Development

Edit index.html directly. Styles are inside the <style> tag; you can tweak CSS variables like:

:root {
  --bg: #0f1117;
  --fg: #e6edf3;
  --accent: #5b9cff;
  --border: #223041;
}

Star History Chart

License

MIT License

Links


© 2025 Prompt Workflow · Local‑first · Privacy‑friendly