Become a one-shot wonder. Describe an app, let the AI cough up MicroPython, watch it run on your Tildagon badge. No IDE, no
mpremotedance, noampy, no regrets (mostly).
Vibe-code apps for the Tildagon badge (EMF Camp 2024) straight from your browser using either a local Ollama model or the Anthropic API. Generate, tweak, deploy, crash, paste the traceback back in, regenerate, repeat.
- Dual LLM provider — local Ollama or hosted Anthropic (Claude)
- Web Serial deploy over MicroPython raw-paste (no driver install)
- Auto-rebuild of
metadata.jsonso the badge menu picks it up - Error feedback loop — paste a traceback and hit Generate again
- System prompt includes a condensed Tildagon API context
- Persists your last session in
localStorage - Single-page, vanilla stack: HTML + CSS + JS + a tiny PHP/Python proxy
- A Chromium-based browser (Chrome, Edge, Brave) for the Web Serial API
- A Tildagon badge connected via USB
- One of:
- Ollama running locally with a model pulled (e.g.
ollama pull gpt-oss), or - An Anthropic API key (console.anthropic.com)
- Ollama running locally with a model pulled (e.g.
python3 webserver.pyIt picks a free port, opens the browser, and exposes /api/anthropic for the Anthropic provider.
Drop the folder into htdocs/ and visit http://localhost/tildagen/. The included .htaccess routes api/anthropic to api/anthropic.php (requires mod_rewrite and PHP with cURL).
python3 -m http.server 8000The Anthropic provider will not work without the proxy — stick to Ollama in this mode.
-
Pick a provider in the sidebar (Ollama or Anthropic).
-
For Ollama, confirm the host (default
http://localhost:11434) and pick a model from the dropdown. For Anthropic, paste your API key; it's stored only in your browser'slocalStorage. -
Give the app a name (e.g.
Pong). The badge will showTildagen Pong. -
Describe what the app should do in the instruction box.
-
Click Generate. The raw AI output streams into the Raw tab; the extracted code lands in the Code tab.
-
Click Connect Badge and pick the serial port — the badge shows up as
TiLDAGON. -
Click Push to Badge. Hold the reboop button for ~2 seconds to restart and see your app in the badge menu.
If the app crashes on the badge:
- Grab the traceback from the badge (via
mpremote replor the serial log). - Paste it into Paste Errors in the sidebar.
- Click Generate again. The AI sees both the code and the errors and returns a fixed version.
Above the code editor:
- Copy — copies
app.pyto the clipboard. - Download — saves it as
<app_folder_name>.pyso you can commit it, share it, or flash it withmpremotemanually.
Ollama needs CORS enabled for browser access:
OLLAMA_ORIGINS="*" ollama serveRecommended models (from fastest to smartest):
gpt-oss— fast, good enough for simple appsgemma4— should be ok for simple appsqwen3.5— solid all-rounder
The browser can't call api.anthropic.com directly because of CORS, so requests go through a local proxy:
webserver.pyexposesPOST /api/anthropicapi/anthropic.phpdoes the same for XAMPP/Apache
The proxy forwards your key via the x-api-key header. Nothing is persisted server-side — your key lives in localStorage only.
| File | Purpose |
|---|---|
index.html |
Single-page UI |
style.css |
Dark theme styles |
app.js |
Glue logic, system prompt with Tildagon API reference |
ollama.js |
Streaming Ollama chat client with code extraction |
anthropic.js |
Streaming Anthropic Messages client via the local proxy |
serial.js |
Web Serial → MicroPython raw-paste file transfer |
webserver.py |
Dev server + Anthropic proxy |
api/anthropic.php |
Anthropic proxy for XAMPP/Apache |
.htaccess |
Rewrite api/anthropic to the PHP proxy |
logo.svg |
Header logo |
The system prompt contains a condensed Tildagon API reference (buttons, ctx drawing, IMU, LEDs, event bus, common pitfalls) distilled from real badge apps. The LLM generates a single-file app.py with __app_export__ = TildagenApp. The serial module enters MicroPython raw REPL, negotiates raw-paste mode for proper flow control, creates /apps/tildagon_<name>/, writes app.py and metadata.json, then exits cleanly. No filesystem wipe required, no reflash, no pain.
Tildagen apps:
If you ship a Tildagon app generated with Tildagen, please tag your repo with both the tildagon-app and tildagen-app topics on GitHub so your creation shows up alongside everything else made with this tool.
Creative Commons Attribution-NonCommercial 4.0 International (CC BY-NC 4.0).
You may share and adapt this work for non-commercial purposes with attribution. For commercial use, contact weborder.uk.
See LICENSE for the full text.
Built by Ilya Titov / Web Order Ltd.


