🎨 A lazy-friendly tool to quickly generate H5 watchface packages for WebView-based toooony.
- 🚀 Quick Start: Generate a complete watchface package in seconds
- 🎨 Multiple Templates: Built-in templates (Simple, Analog, Digital)
- 🛠️ CLI Tool: Easy-to-use command-line interface with interactive mode
- 📦 Standards Compliant: Generated packages follow H5 watchface specifications
- 🔧 Customizable: Support for custom HTML/CSS/JS
- 🖼️ Auto Preview: Automatically generate preview images
- 🌐 Web API: Can be integrated as a web service
Download the latest release from Releases.
git clone https://github.com/ziztechnology/WatchfaceBuilder.git
cd WatchfaceBuilder
go build -o watchface-builder ./cmd/cli./watchface-builder -iThe tool will prompt you for:
- Watchface name (required)
- Version (default: 1.0.0)
- Author (default: Anonymous)
- Description (optional)
- Template selection (1=simple, 2=analog, 3=digital)
- Tags (optional, comma-separated)
./watchface-builder -name "My Watchface" -template analog -version 1.0.0./watchface-builder -listA minimalist digital clock with gradient background.
- Time display (HH:MM:SS)
- Date display
- Responsive design
Classic analog clock with Canvas rendering.
- Hour, minute, second hands
- Clock face with markings
- Smooth animations
Modern digital clock with neon effects.
- Large time display
- Date and day of week
- Futuristic styling
Fully customizable with your own HTML/CSS/JS.
-name string
Watchface name (required)
-version string
Version number (default "1.0.0")
-author string
Author name (default "Anonymous")
-description string
Watchface description
-template string
Template type: simple, analog, digital (default "simple")
-tags string
Tags, comma-separated
-output string
Output directory (default ".")
-no-preview
Do not generate preview image
-i Interactive mode
-list
List available templates
watchface.zip
├── manifest.json # Watchface metadata
├── index.html # Entry point
├── style.css # Styles
├── script.js # JavaScript logic
└── preview.png # Preview image (optional)
{
"name": "My Watchface",
"version": "1.0.0",
"author": "Your Name",
"description": "A beautiful watchface",
"entrypoint": "index.html",
"tags": ["minimal", "digital"],
"created_at": "2025-01-21T10:30:00Z"
}You can run Watchface Builder as a web service:
./watchface-builder serve --port 8080Build Watchface
POST /api/build
Content-Type: application/json
{
"name": "My Watchface",
"version": "1.0.0",
"template": "analog",
"author": "Your Name",
"tags": ["classic", "analog"]
}List Templates
GET /api/templatesCreate your own watchface with custom HTML/CSS/JS:
./watchface-builder -name "Custom" -template custom \
-custom-html "$(cat my-template.html)" \
-custom-css "$(cat my-style.css)" \
-custom-js "$(cat my-script.js)"for template in simple analog digital; do
./watchface-builder -name "Watchface-$template" -template $template
doneContributions are welcome! Please read our Contributing Guide first.
- Fork this repository
- Create your template in
pkg/templates/ - Add template metadata to
pkg/templates/registry.go - Submit a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- fogleman/gg - For image generation
- spf13/cobra - For CLI framework
- More built-in templates
- Template marketplace
- Live preview in browser
- GUI application
- Template editor
- Cloud-based builder
Made with ❤️ by ziztechnology