Developing beautiful NiceGUI applications with AI
Project description
Nice Vibes - Teach AI agents to build beautiful NiceGUI applications
A comprehensive toolkit of prompts, patterns, and examples that help AI coding assistants generate correct, idiomatic NiceGUI code.
✨ Features
- 📚 Complete Documentation - Events, mechanics, styling, and class references
- 🔐 Authentication Patterns - Signed cookie persistence, role-based permissions, login flows
- 🧭 SPA Navigation -
ui.sub_pages, header/drawer visibility, back button handling - 🧪 Working Samples - Full multi-dashboard app, stock analysis, custom components
- 🤖 AI-Optimized - Single master prompt (~22K tokens) for context injection
- ✅ Validated - All class references and URLs verified
- 🧩 Modular - Pick what you need or use the full prompt
🚀 Quick Start
Use Pre-Built Prompts (Recommended)
Just download and use the pre-built master prompt directly:
| Variant | Tokens | Use Case | Download |
|---|---|---|---|
| Compact | ~14K | Quick tasks, simple UI | nice_vibes_compact.md |
| Optimum | ~23K | Most use cases | nice_vibes.md |
| Extended | ~34K | Custom components, deployment | nice_vibes_extended.md |
Copy the content into your AI assistant's context or system prompt. When using tools such as Windsurf use Opus 4.5 as model and paste one of the URLs above to let it "teach itself" the principles of NiceGUI.
Build From Source (Optional)
Only needed if you want to customize or extend the documentation:
git clone https://github.com/Alyxion/nice-vibes.git
cd nice-vibes
poetry install
poetry run python scripts/build_master_prompt.py
📋 Requirements
For building from source:
- Python 3.12+
- Poetry
📖 Documentation
| Folder | Description |
|---|---|
| docs/ | Main documentation |
| docs/events/ | Event handling patterns |
| docs/mechanics/ | Core patterns (SPA, authentication, styling) |
| docs/classes/ | UI element reference by category |
📂 Other Folders
| Folder | Description |
|---|---|
| samples/ | Working example applications |
| output/ | Generated master prompts |
| scripts/ | Build and validation tools |
| tests/ | Example NiceGUI tests |
🧪 Testing
poetry run pytest -v
🤖 Prompt Variants
Each variant is available in online (GitHub URLs) and offline (local paths) versions:
| Content | Compact | Optimum | Extended |
|---|---|---|---|
| Main guide | ✓ | ✓ | ✓ |
| Core mechanics | ✓ | ✓ | ✓ |
| Events | ref | ✓ | ✓ |
| Class reference | ref | ✓ | ✓ |
| Custom components | ref | ref | ✓ |
| Configuration & deployment | ref | ref | ✓ |
| Sample references | ✓ | ✓ | ✓ |
ref = Not included but referenced with summary (AI knows where to look)
Configure file order and summaries in docs/prompt_config.yaml.
🖥️ Command Line Interface
Nice Vibes includes a CLI to explore and run sample applications:
# Install the package
pip install nice-vibes
# Interactive sample selector
nice-vibes
# List available samples
nice-vibes list
# Run a sample
nice-vibes run dashboard
# Copy sample source code to current directory
nice-vibes copy dashboard
nice-vibes copy video_custom_component -o my_video_app
🔌 MCP Server (Optional)
NiceVibes includes an optional Model Context Protocol server that gives AI assistants dynamic access to:
- Guided project creation - Step-by-step questionnaire with best practices
- Documentation search - Find topics without loading everything into context
- Source code inspection - Read NiceGUI component source directly
- Visual debugging - Capture screenshots of running or newly created applications
- Sample exploration - Browse and copy working examples
Get your configuration with nice-vibes mcp-config:
{
"mcpServers": {
"nice-vibes": {
"command": "/path/to/python",
"args": ["-m", "nice_vibes.mcp"]
}
}
}
Add this to your MCP client config (Windsurf, Claude Desktop, etc.).
This is how it works:
See nice_vibes/mcp/README.md for detailed setup instructions.
🙏 Credits
Created by Michael Ikemann
Built for use with NiceGUI - a Python UI framework by Zauberzeug.
📄 License
This project is licensed under the MIT License - see the LICENSE file for details.
Free to use, modify, and distribute.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file nice_vibes-0.1.2.tar.gz.
File metadata
- Download URL: nice_vibes-0.1.2.tar.gz
- Upload date:
- Size: 16.3 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.1 CPython/3.13.3 Darwin/24.5.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ee8aa9c02a8587498620e499c85d723cafcb3dfeb5e58e718afa47e8d2d65f9b
|
|
| MD5 |
a8ea95d18369cfb84d069547e6f5de28
|
|
| BLAKE2b-256 |
e3b37f4169cd305ef1e8ee2341c256defa4cf12a7040d8875436a0d28c4825ee
|
File details
Details for the file nice_vibes-0.1.2-py3-none-any.whl.
File metadata
- Download URL: nice_vibes-0.1.2-py3-none-any.whl
- Upload date:
- Size: 16.3 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.1 CPython/3.13.3 Darwin/24.5.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
32850504e345f68d02b7b9e3e861d1b5936b3a629afb816c16754f428303e444
|
|
| MD5 |
e7a0ff4d1353e6f1b90eb73a02c94015
|
|
| BLAKE2b-256 |
2c4029afd376af018fda339c71b908e62a87eb170bd617c0d74cf11dda4d9f7d
|