# Theme Creation And Installation Guide Install a downloaded Clawd theme, or create your own desktop pet theme with custom characters and animations. ## Install A Downloaded Theme A Clawd theme is a folder whose top level contains `theme.json`. The folder name is the theme id; the display name shown in Clawd comes from `theme.json.name`. 1. Download, clone, or unzip the theme. 2. Make sure the folder shape is correct: ```text pixel-cat/ theme.json assets/ idle.png working.gif ... ``` If unzipping creates `pixel-cat/pixel-cat/theme.json`, move the inner folder into the themes directory. 3. Put the theme folder in your Clawd user themes directory: - Windows: `%APPDATA%/clawd-on-desk/themes/pixel-cat/` - macOS: `~/Library/Application Support/clawd-on-desk/themes/pixel-cat/` - Linux: `~/.config/clawd-on-desk/themes/pixel-cat/` 4. Open `Settings...` -> `Theme` and select the theme. If Clawd was already open and the theme does not appear, restart Clawd. Avoid using a folder id that matches a built-in theme (`clawd`, `calico`, or `cloudling`). Built-in themes take priority over user themes with the same id. ## Create A New Theme 1. Scaffold a theme: ```bash node scripts/create-theme.js my-theme ``` The script writes to your Clawd user themes directory by default: - Windows: `%APPDATA%/clawd-on-desk/themes/my-theme/` - macOS: `~/Library/Application Support/clawd-on-desk/themes/my-theme/` - Linux: `~/.config/clawd-on-desk/themes/my-theme/` - No argument also works: it creates the next available `my-theme` scaffold automatically 2. (Optional) Customize the generated metadata: ```bash node scripts/create-theme.js pixel-cat --name "Pixel Cat" --author "Your Name" ``` 3. Edit `theme.json` — set your theme name, author, and file mappings 4. Create your assets in the `assets/` folder 5. Open `Settings...` -> `Theme` and select your theme. Restart Clawd if the new folder is not listed yet. 6. (Optional) Validate: ```bash node scripts/validate-theme.js ~/.config/clawd-on-desk/themes/my-theme ``` If you prefer the manual route, copying `themes/template/` yourself still works. The scaffold script just automates the same starting point and patches `name` / `author` for you. ## Theme Directory Structure ``` my-theme/ theme.json ← Configuration (required) assets/ idle-follow.svg ← Idle animation with eye tracking (SVG required only if idle is in eyeTracking.states) thinking.gif ← Any format: SVG, GIF, APNG, WebP, PNG, JPG, JPEG typing.gif error.gif happy.gif notification.gif sleeping.gif waking.gif ... ← Additional animations for reactions, tiers, etc. sounds/ ← Optional per-theme audio files complete.mp3 confirm.mp3 ``` ## Creation Tiers ### Beginner: Swap Art + GIF Animations (Hours) **Minimum viable theme depends on your capability switches.** 1. Start from `themes/template/` 2. Choose whether you want eye tracking: - `eyeTracking.enabled: true` → your `idle` asset must be SVG and include `#eyes-js` - `eyeTracking.enabled: false` → idle can also be GIF / APNG / WebP / PNG / JPG / JPEG 3. Create simple frame animations (4-12 frames) for other states using [Piskel](https://www.piskelapp.com/) (free, browser-based) or [Aseprite](https://www.aseprite.org/) (paid, pixel art pro tool) 4. Export as APNG / WebP / GIF, or use single-frame PNG / JPG / JPEG for static poses 5. Update `theme.json` to point to your files **Recommended workflow for character art:** - AI image generation (Midjourney, Stable Diffusion) → transparent PNG - Or hand-draw in any pixel art editor - Remove background with [remove.bg](https://www.remove.bg/) or `rembg` (Python CLI) ### Intermediate: Full Animation Set (1-2 Days) Everything from beginner, plus: - Custom working tiers (typing → juggling → building) - Click reactions (poke left/right, double-click flail) - Idle random animations (reading, looking around) - Sleep sequence (yawning → collapsing → sleeping) - Mini mode support (8 additional mini animations) ### Advanced: Full SVG + CSS Animations (Unlimited) Skip the template entirely. Author all animations as SVG with CSS `@keyframes`: - Infinite scalability (no pixelation at any zoom level) - CSS animation control (timing, easing, iteration) - SVG filter effects (blur, glow, drop-shadow) - Reference `assets/svg/clawd-*.svg` in the repo for examples ### External Theme Runtime Limits External themes are treated as untrusted input. SVG files in user themes are sanitized before rendering: - `