$git clone https://github.com/kekePower/musewebMuseWeb is an experimental, prompt-driven web server that streams HTML straight from plain-text prompts using a large-language model (LLM). Works with any OpenAI-compatible API - from local Ollama models to cloud providers like OpenAI, Anthropic, Google, Together.ai, Groq
| 1 | # MuseWeb |
| 2 | |
| 3 | MuseWeb is an **experimental, prompt-driven web server** that streams HTML straight from plain-text prompts using a large-language model (LLM). **Works with any OpenAI-compatible API** - from local Ollama models to cloud providers like OpenAI, Anthropic, Google, Together.ai, Groq, and hundreds more. Originally built "just for fun," it currently serves as a proof-of-concept for what prompt-driven websites could become once local LLMs are fast and inexpensive. Even in this early state, it showcases the endless possibilities of minimal, fully self-hosted publishing. |
| 4 | |
| 5 | **Version 1.1.4** introduces enhanced model support, robust output sanitization, and critical streaming fixes for clean HTML generation. |
| 6 | |
| 7 | --- |
| 8 | |
| 9 | ## ✨ Features |
| 10 | |
| 11 | * **Prompt → Page** – Point MuseWeb to a folder of `.txt` prompts; each prompt becomes a routable page. |
| 12 | * **Live Reloading for Prompts** – Edit your prompt files and see changes instantly without restarting the server. |
| 13 | * **Streaming Responses** – HTML is streamed token-by-token for instant first paint with real-time sanitization. |
| 14 | * **Universal API Compatibility** – Works with **any OpenAI-compatible API endpoint**: |
| 15 | * **[Ollama](https://ollama.ai/)** (default, runs everything locally) |
| 16 | * **OpenAI** (GPT-4, GPT-3.5, etc.) |
| 17 | * **Anthropic Claude** (via OpenAI-compatible proxies) |
| 18 | * **Google Gemini** (via OpenAI-compatible endpoints) |
| 19 | * **Together.ai** (hundreds of open-source models) |
| 20 | * **Groq** (ultra-fast inference) |
| 21 | * **Inception Labs Mercury** (advanced reasoning models) |
| 22 | * **Perplexity** (Sonar models with web search) |
| 23 | * **Novita.ai** (global model marketplace) |
| 24 | * **OpenRouter** (unified API for 200+ models) |
| 25 | * **Local providers** (LM Studio, vLLM, Text Generation WebUI, etc.) |
| 26 | * **Any other OpenAI-compatible endpoint** – Just change the `api_base` URL! |
| 27 | * **Single Binary** – Go-powered, ~7 MB static binary, no external runtime. |
| 28 | * **Zero JS by Default** – Only the streamed HTML from the model is served; you can add your own assets in `public/`. |
| 29 | * **Modular Architecture** – Clean separation of concerns with dedicated packages for configuration, server, models, and utilities. |
| 30 | * **Prompt-Scoped Static Assets** – Each prompt set can have its own `public/` directory for static files (CSS, images, JS, etc.), with automatic resolution and fallback to the global `public/` directory. |
| 31 | * **Robust Output Sanitization** – Advanced code fence removal and markdown artifact cleaning for pristine HTML output. |
| 32 | * **Enhanced Model Support** – Comprehensive support for reasoning models including DeepSeek, R1, Qwen, Mercury, and more. |
| 33 | * **Configurable via `config.yaml`** – Port, model, backend, prompt directory, and API credentials. |
| 34 | * **Environment Variable Support** – Falls back to `OPENAI_API_KEY` if not specified in config or flags. |
| 35 | * **Reasoning Model Support** – Automatic detection and handling of reasoning models with thinking output disabled for clean web pages. |
| 36 | * **Detailed Logging** – Comprehensive logging of prompt file loading and request handling for easy debugging. |
| 37 | |
| 38 | --- |
| 39 | |
| 40 | ## 🚀 Quick Start |
| 41 | |
| 42 | ```bash |
| 43 | # 1. Clone and build |
| 44 | $ git clone https://github.com/kekePower/museweb.git |
| 45 | $ cd museweb |
| 46 | $ GO111MODULE=on go build . |
| 47 | |
| 48 | # 2. (Optional) pull an LLM with Ollama |
| 49 | $ ollama pull llama3 |
| 50 | |
| 51 | # 3. Run with defaults (localhost:8080) |
| 52 | $ ./museweb |
| 53 | ``` |
| 54 | |
| 55 | Open <http://localhost:8080> in your browser. Navigation links are generated from the prompt filenames. |
| 56 | |
| 57 | --- |
| 58 | |
| 59 | ## 🔧 Configuration |
| 60 | |
| 61 | Copy `config.example.yaml` to `config.yaml` and tweak as needed: |
| 62 | |
| 63 | ```yaml |
| 64 | server: |
| 65 | address: "127.0.0.1" # Interface to bind to (e.g., 127.0.0.1 or 0.0.0.0) |
| 66 | port: "8080" # Port for HTTP server |
| 67 | prompts_dir: "./prompts" # Folder containing *.txt prompt files |
| 68 | debug: false # Enable debug logging |
| 69 | model: |
| 70 | backend: "ollama" # "ollama" or "openai" |
| 71 | name: "llama3" # Model name to use |
| 72 | reasoning_models: # Patterns for reasoning models (thinking disabled automatically) |
| 73 | - "deepseek" |
| 74 | - "r1-1776" |
| 75 | - "qwen |