canvas
यह क्या करती है
यह स्किल जुड़ी हुई स्क्रीन पर वेब सामग्री दिखाती है, जैसे Mac ऐप या फ़ोन पर। यह उन लोगों के लिए है जो बिना ब्राउज़र खोले डिवाइस पर कोई दृश्य या इंटरएक्टिव पेज दिखाना चाहते हैं।
कब इस्तेमाल करें
- ✓जब आप जुड़े हुए डिवाइस पर डैशबोर्ड या विज़ुअलाइज़ेशन दिखाना चाहते हों।
- ✓जब आप किसी बनाए गए इंटरएक्टिव डेमो या गेम को स्क्रीन पर पेश करना चाहते हों।
- ✓जब आप Brigade से जुड़े फ़ोन या Mac पर HTML सामग्री दिखाना चाहते हों।
Skill का लिंक
https://github.com/spinabot/brigade/blob/main/skills/canvas/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“मेरी साप्ताहिक बिक्री का एक सरल चार्ट मेरे जुड़े हुए Mac पर फ़ुल-स्क्रीन पेज की तरह दिखाइए।”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
AI सामग्री को एक स्थानीय वेब सर्वर के ज़रिए उपलब्ध कराता है, फिर जुड़े डिवाइस को उसे वेब व्यू में दिखाने को कहता है। डिवाइस जुड़ा होना चाहिए और कैनवास सामग्री दिखाने में सक्षम होना चाहिए।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।
Canvas Skill
Display HTML content on connected Brigade nodes (Mac app, iOS, Android).
Overview
The canvas tool lets you present web content on any connected node's canvas view. Great for:
- Displaying games, visualizations, dashboards
- Showing generated HTML content
- Interactive demos
How It Works
Architecture
┌─────────────────┐ ┌──────────────────┐ ┌─────────────┐
│ Canvas Host │────▶│ Node Bridge │────▶│ Node App │
│ (HTTP Server) │ │ (TCP Server) │ │ (Mac/iOS/ │
│ Port 18793 │ │ Port 18790 │ │ Android) │
└─────────────────┘ └──────────────────┘ └─────────────┘
- Canvas Host Server: Serves static HTML/CSS/JS files from
canvasHost.rootdirectory - Node Bridge: Communicates canvas URLs to connected nodes
- Node Apps: Render the content in a WebView
Tailscale Integration
The canvas host server binds based on gateway.bind setting:
| Bind Mode | Server Binds To | Canvas URL Uses |
|---|---|---|
loopback |
127.0.0.1 | localhost (local only) |
lan |
LAN interface | LAN IP address |
tailnet |
Tailscale interface | Tailscale hostname |
auto |
Best available | Tailscale > LAN > loopback |
Key insight: The canvasHostHostForBridge is derived from bridgeHost. When bound to Tailscale, nodes receive URLs like:
http://<tailscale-hostname>:18793/__brigade__/canvas/<file>.html
This is why localhost URLs don't work - the node receives the Tailscale hostname from the bridge!
Actions
| Action | Description |
|---|---|
present |
Show canvas with optional target URL |
hide |
Hide the canvas |
navigate |
Navigate to a new URL |
eval |
Execute JavaScript in the canvas |
snapshot |
Capture screenshot of canvas |
Configuration
In the active Brigade config file ($BRIGADE_CONFIG_PATH, default ~/.brigade/brigade.json):
{
"canvasHost": {
"enabled": true,
"port": 18793,
"root": "/Users/you/brigade/canvas",
"liveReload": true
},
"gateway": {
"bind": "auto"
}
}
Live Reload
When liveReload: true (default), the canvas host:
- Watches the root directory for changes (via chokidar)
- Injects a WebSocket client into HTML files
- Automatically reloads connected canvases when files change
Great for development!
Workflow
1. Create HTML content
Place files in the canvas root directory (default ~/brigade/canvas/):
cat > ~/brigade/canvas/my-game.html << 'HTML'
<!DOCTYPE html>
<html>
<head><title>My Game</title></head>
<body>
<h1>Hello Canvas!</h1>
</body>
</html>
HTML
2. Find your canvas host URL
Check how your gateway is bound:
CONFIG_PATH="${BRIGADE_CONFIG_PATH:-${BRIGADE_STATE_DIR:-$HOME/.brigade}/brigade.json}"
cat "$CONFIG_PATH" | jq '.gateway.bind'
Then construct the URL:
- loopback:
http://127.0.0.1:18793/__brigade__/canvas/<file>.html - lan/tailnet/auto:
http://<hostname>:18793/__brigade__/canvas/<file>.html
Find your Tailscale hostname:
tailscale status --json | jq -r '.Self.DNSName' | sed 's/\.$//'
3. Find connected nodes
brigade nodes list
Look for Mac/iOS/Android nodes with canvas capability.
4. Present content
canvas action:present node:<node-id> target:<full-url>
Example:
canvas action:present node:mac-63599bc4-b54d-4392-9048-b97abd58343a target:http://peters-mac-studio-1.sheep-coho.ts.net:18793/__brigade__/canvas/snake.html
5. Navigate, snapshot, or hide
canvas action:navigate node:<node-id> url:<new-url>
canvas action:snapshot node:<node-id>
canvas action:hide node:<node-id>
Debugging
White screen / content not loading
Cause: URL mismatch between server bind and node expectation.
Debug steps:
- Check server bind:
CONFIG_PATH="${BRIGADE_CONFIG_PATH:-${BRIGADE_STATE_DIR:-$HOME/.brigade}/brigade.json}"; cat "$CONFIG_PATH" | jq '.gateway.bind' - Check what port canvas is on:
lsof -i :18793 - Test URL directly:
curl http://<hostname>:18793/__brigade__/canvas/<file>.html
Solution: Use the full hostname matching your bind mode, not localhost.
"node required" error
Always specify `node:<node-id
अक्सर पूछे जाने वाले सवाल
कौन से डिवाइस सामग्री दिखा सकते हैं?
स्किल जुड़े Brigade डिवाइस के साथ काम करती है, जैसे Mac ऐप, iOS और Android।
क्या नेटवर्क सेटअप मायने रखता है?
हाँ। डिवाइस जो पता इस्तेमाल करता है वह इस पर निर्भर है कि गेटवे कैसे सेट है, जैसे लोकल नेटवर्क या Tailscale।
क्या इसमें गेम दिखाए जा सकते हैं?
हाँ। यह HTML में लिखे गेम, विज़ुअलाइज़ेशन और इंटरएक्टिव डेमो दिखा सकती है।
जानकारी
लेखक का मूल विवरण
Display HTML content — games, visualizations, dashboards, generated HTML, interactive demos — on a connected canvas-capable display surface. Use when you need to present visual or interactive web content on a screen.
repo: spinabot/brigade
लोकप्रियता
- GitHub स्टार
- 11k
- रैंकिंग में स्थान
- #11714
- लाइसेंस
- MIT
- अपडेट की गई
- 2/11/2026
कमेंट
- …
इस repository की और skills
1password
11kयह आपके एजेंट को 1Password कमांड लाइन टूल सेट करना और सुरक्षित तरीके से साइन इन करना सिखाती है, फिर ज़रूरत पर संग्रहीत सीक्रेट पढ़ने या डालने देती है।
apple-reminders
11kयह आपके एजेंट को टर्मिनल से Apple Reminders देखने, जोड़ने, बदलने, पूरा करने और हटाने देती है, जिसमें सूचियाँ और तारीख के फ़िल्टर भी शामिल हैं।
bluebubbles
11kयह आपके एजेंट को BlueBubbles के ज़रिए iMessage भेजने और संभालने देती है, जिसमें टेक्स्ट, अटैचमेंट, टैपबैक रिएक्शन, संपादन और ग्रुप सेटिंग्स शामिल हैं।
camsnap
11kयह आपके एजेंट को उन नेटवर्क सिक्योरिटी कैमरों से स्नैपशॉट, छोटी क्लिप लेने या मूवमेंट पर नज़र रखने देती है, जो आप पहले से सेट कर चुके हैं।
मिलती-जुलती skills
angular-developer
280kआपके एजेंट को Angular code बनाने और प्रोजेक्ट स्ट्रक्चर पर सलाह देने में मदद करता है। नए प्रोजेक्ट शुरू करने, code के हिस्से बनाने, या performance और accessibility सुधारने में उपयोगी है।
frontend-a11y
280kआपके एजेंट को web interfaces को सबके लिए accessible बनाने में मदद करता है। यह सुनिश्चित करता है कि websites और apps screen readers और keyboard navigation के साथ अच्छे से काम करें।
frontend-patterns
280kआपके एजेंट को React और Next.js में frontend development के modern patterns लागू करने में मदद करता है। यह performance optimize करता है, state manage करता है और best practices फॉलो करवाता है।