$git clone https://github.com/Nativu5/STPresetEditorA lightweight, user-friendly web editor for managing SillyTavern preset.json files efficiently, powered by Vue.js and Tailwind CSS.
| 1 | # SillyTavern Preset Editor |
| 2 | |
| 3 | <div> |
| 4 | <img src="https://img.shields.io/badge/Vue-3.x-brightgreen.svg" alt="Vue 3"> |
| 5 | <img src="https://img.shields.io/badge/TailwindCSS-4.x-blue.svg" alt="Tailwind CSS"> |
| 6 | <img src="https://img.shields.io/badge/License-MIT-yellow.svg" alt="MIT License"> |
| 7 | </div> |
| 8 | |
| 9 | A lightweight, user-friendly web editor for managing SillyTavern `preset.json` files efficiently, powered by Vue.js and Tailwind CSS. |
| 10 | |
| 11 | **🌐 Try it online:** [https://stpe.nativus.workers.dev/](https://stpe.nativus.workers.dev/) |
| 12 | |
| 13 | [](https://deploy.workers.cloudflare.com/?url=https%3A%2F%2Fgithub.com%2FNativu5%2FSTPresetEditor) |
| 14 | |
| 15 | ## 🖼 Overview |
| 16 | |
| 17 | The default SillyTavern preset editor offers basic functionality but can be slow and lacks advanced editing features (e.g., macro highlighting, variable management). |
| 18 | |
| 19 | This project enhances your editing experience with an intuitive, high-performance and powerful UI/UX. |
| 20 | |
| 21 | <table> |
| 22 | <tr> |
| 23 | <td align="center" style="border: 1px solid #ddd; padding: 8px;"> |
| 24 | <img src="https://github.com/user-attachments/assets/24a8cbf7-932a-4dba-9852-64752fbc406c" alt="Main Editor" height="200" /> |
| 25 | <br>Prompt Manage & Edit |
| 26 | </td> |
| 27 | <td align="center" style="border: 1px solid #ddd; padding: 8px;"> |
| 28 | <img src="https://github.com/user-attachments/assets/86f3ca7b-0a86-4dc7-9ee3-0045fc4544d8" alt="Macro Analysis" height="200" /> |
| 29 | <br>Macro Analysis & Preview |
| 30 | </td> |
| 31 | <td align="center" style="border: 1px solid #ddd; padding: 8px;"> |
| 32 | <img src="https://github.com/user-attachments/assets/4a2c883c-710e-40aa-9cce-f3be7770e5ad" alt="Variable Manager" height="200" /> |
| 33 | <br>Variable Tools |
| 34 | </td> |
| 35 | </tr> |
| 36 | </table> |
| 37 | |
| 38 | ## 🎯 Key Features |
| 39 | |
| 40 | - ⚡ **Real-time Editing & Saving**: Instantly edit prompts with batch selection and drag-and-drop. Changes are saved locally for secure, persistent editing. |
| 41 | - 🧩 **Syntax Highlighting**: Automatically highlight special macros within prompts, enabling quick reference. |
| 42 | - 🔍 **Macro Analysis & Preview**: Instantly analyze macros and switch between raw and preview modes for efficient editing. |
| 43 | - 📊 **Variable Management**: Efficiently rename and track variable usage across all prompts. |
| 44 | |
| 45 | ## 🚀 Getting Started |
| 46 | |
| 47 | 1. 📥 **Import**: Load your existing `preset.json` file via the import modal. |
| 48 | 2. ✏️ **Edit**: Visually manage, modify, and rearrange prompts effortlessly. |
| 49 | 3. 🧩 **Analyze**: Track macros and variables, viewing their usage across prompts. |
| 50 | 4. 📤 **Export**: Save and export your updated JSON file for use with SillyTavern. |
| 51 | |
| 52 | ## 🚧 Development |
| 53 | |
| 54 | Run the development server with hot-reloading: |
| 55 | |
| 56 | ```bash |
| 57 | npm install |
| 58 | npm run dev |
| 59 | ``` |
| 60 | |
| 61 | Access the app at [http://localhost:5173](http://localhost:5173) (default port). |
| 62 | |
| 63 | ## 🚢 Deployment |
| 64 | |
| 65 | Build for production: |
| 66 | |
| 67 | ```bash |
| 68 | npm run build |
| 69 | ``` |
| 70 | |
| 71 | Deploy the contents of the generated `dist` folder to any static hosting provider (e.g., GitHub Pages, Netlify, Vercel). |
| 72 | |
| 73 | ### 🪟 Windows Quick Start |
| 74 | |
| 75 | Use the bundled batch script to automate the local setup: |
| 76 | |
| 77 | 1. Ensure Node.js and npm are available in your environment. |
| 78 | 2. Double-click `launch-stpreseteditor.bat` (or run it from Command Prompt) inside the project directory. |
| 79 | 3. The script installs dependencies when needed and starts the Vite development server. |
| 80 | 4. Open [http://localhost:5173](http://localhost:5173) in your browser, and press `Ctrl+C` in the terminal to stop the server when finished. |
| 81 | |
| 82 | ## 📄 License |
| 83 | |
| 84 | MIT License. See [LICENSE](LICENSE) for details. |
| 85 | |
| 86 | ## 🤝 Contributing |
| 87 | |
| 88 | Contributions are welcome! Please open an issue or submit a pull request if you encounter any bugs or have feature suggestions. |
| 89 | |
| 90 | --- |
| 91 | |
| 92 | Developed by 🤖 using Vue.js and Tailwind CSS. |