Generate and push custom images to TRMNL e-ink displays.
This project generates dashboard images and serves them via GitHub Pages. Your TRMNL device uses the Image Display plugin to pull the latest image from:
https://the-focus-ai.github.io/trmnl-image-agent/latest.png
- A TRMNL device
- Claude Code with the following plugins:
- nano-banana - AI image generation using Google Gemini
- chrome-driver - Browser automation for screenshots
# Add the Focus.AI marketplace (one-time)
/plugin marketplace add The-Focus-AI/claude-marketplace
# Install required plugins
/plugin install nano-banana@focus-marketplace
/plugin install chrome-driver@focus-marketplaceThen restart Claude Code.
- Log in to your TRMNL account at usetrmnl.com
- Go to Plugins > Image Display
- Click Add to my plugins
- Enter the image URL:
https://the-focus-ai.github.io/trmnl-image-agent/latest.png - Set a refresh interval (e.g., 15-30 minutes)
- Save and add to your device's playlist
That's it! TRMNL will now pull the latest image whenever the display refreshes.
Run the agent to generate a new image:
claude --verbose -p --output-format=stream-json --dangerously-skip-permissions \
"update the image, then commit and push everything"This will:
- Generate a new dashboard image using AI
- Process it for e-ink (800x480, 1-bit)
- Copy it to
output/latest.png - Commit and push to GitHub
- GitHub Pages automatically deploys the new image
| Spec | Value |
|---|---|
| Resolution | 800x480 pixels |
| Format | PNG, JPEG, or BMP |
| Max size | 5MB |
| Color | 1-bit (black/white) works best |
- Use Floyd-Steinberg dithering for photos
- Avoid dithering for text-heavy images (keeps text sharp)
- Convert to 1-bit before uploading for predictable results
convert input.jpg \
-resize 800x480^ \
-gravity center \
-extent 800x480 \
-dither FloydSteinberg \
-colors 2 \
PNG8:output.pngTo enable GitHub Pages for your fork:
- Go to your repo's Settings > Pages
- Under Source, select GitHub Actions
- The workflow will automatically deploy when you push to
main
The image will be available at:
https://<your-username>.github.io/<repo-name>/latest.png
