Terminal canvas for content drafting with live preview. Start split-pane sessions for email, message, and document composition. Triggers on: canvas, draft, compose, write content.
Creates split-pane terminal canvas for live content drafting with markdown preview.
/plugin marketplace add 0xDarkMatter/claude-mods/plugin install 0xdarkmatter-claude-mods@0xDarkMatter/claude-modsTerminal canvas for interactive content drafting with Claude. Creates a split-pane experience in Warp terminal where Claude writes content and you see live markdown preview.
$ARGUMENTS
start [--type email|message|doc]: Initialize canvas sessionwrite "content": Write/update content in canvasread: Read current canvas content backclear: Clear canvas contentclose: End canvas session and clean up/canvas <subcommand> [options]
│
├─→ /canvas start [--type email|message|doc]
│ ├─ Create .claude/canvas/ directory
│ ├─ Initialize content.md with template
│ ├─ Initialize meta.json with state
│ ├─ Detect Warp terminal
│ └─ Output setup instructions
│
├─→ /canvas write "content"
│ ├─ Write content to .claude/canvas/content.md
│ ├─ Update meta.json timestamp
│ └─ Canvas TUI auto-refreshes
│
├─→ /canvas read
│ ├─ Read .claude/canvas/content.md
│ └─ Return content for Claude to process
│
├─→ /canvas clear
│ ├─ Clear content.md (keep structure)
│ └─ Reset meta.json
│
└─→ /canvas close
├─ Optional: copy content to clipboard
└─ Clean up .claude/canvas/
User: "Help me draft an email to my manager about the project delay"
Claude: I'll help you draft that email. Starting canvas mode...
[Executes internally:]
1. mkdir -p .claude/canvas
2. Write email template to .claude/canvas/content.md
3. Write meta.json with contentType: "email"
[Output:]
Canvas initialized with email template.
To see live preview, open Warp and:
1. Press Cmd+Shift+D (or Ctrl+Shift+D on Windows) to split pane
2. In the new pane, run: npx @claude-mods/canvas-tui --watch
Or use the launch configuration:
warp://launch/claude-canvas
[Claude writes the email draft:]
/canvas write "# Email Draft
**To:** manager@company.com
**Subject:** Project Timeline Update
---
Hi Sarah,
I wanted to give you a heads-up about a delay in the Phoenix project...
Best regards,
[Name]"
[Canvas TUI instantly shows the rendered markdown]
User: "I edited the email in the canvas, can you make it more formal?"
[Claude reads current content:]
/canvas read
[Returns content from .claude/canvas/content.md with user's edits]
[Claude can now rewrite based on user's changes]
Step 1: Create IPC Directory
mkdir -p .claude/canvas
Step 2: Select Template
Based on --type flag (default: doc):
| Type | Template |
|---|---|
| Subject line, To/CC fields, greeting, body, signature | |
| message | Casual format for Slack/Teams/Discord |
| doc | Structured markdown with sections |
Step 3: Initialize Files
Write .claude/canvas/content.md:
# Email Draft
**To:**
**Subject:**
---
Hi [Name],
[Your message here]
Best regards,
[Your name]
Write .claude/canvas/meta.json:
{
"version": "1.0",
"contentType": "email",
"mode": "view",
"claudeLastWrite": "2025-01-08T10:30:00Z",
"userLastEdit": null
}
Step 4: Output Instructions
Canvas ready with email template.
Setup (one-time):
npm install -g @claude-mods/canvas-tui
To view canvas:
1. Split your terminal (Cmd+Shift+D in Warp)
2. Run: canvas-tui --watch
I'll write your content and you'll see it update in real-time.
Parameters:
Execution:
.claude/canvas/ exists.claude/canvas/content.mdmeta.json with claudeLastWrite timestampOutput:
Content updated in canvas.
Execution:
.claude/canvas/content.mdUse Case: After user edits content in canvas, Claude reads it back to incorporate changes.
Execution:
meta.json to preserve contentTypecontent.mdmeta.jsonExecution:
.claude/canvas/ directory# Email Draft
**To:**
**CC:**
**Subject:**
---
Hi [Name],
[Your message here]
Best regards,
[Your name]
---
*Draft started: {timestamp}*
# Message Draft
**To:** #channel / @person
---
[Your message here]
---
*Draft started: {timestamp}*
# Document Title
## Overview
[Brief description]
## Details
[Main content]
## Summary
[Key takeaways]
---
*Draft started: {timestamp}*
Install the launch config for one-click split pane setup:
Location: ~/.warp/launch_configurations/claude-canvas.yaml
name: Claude Canvas
windows:
- tabs:
- title: Claude Canvas
color: Blue
layout:
split_direction: vertical
panes:
- is_focused: true
- commands:
- exec: "npx @claude-mods/canvas-tui --watch"
Usage:
# Install globally
npm install -g @claude-mods/canvas-tui
# Or run via npx
npx @claude-mods/canvas-tui --watch
# Options
canvas-tui --watch # Watch .claude/canvas/content.md
canvas-tui --file ./draft.md # Watch specific file
canvas-tui --help # Show help
| File | Purpose |
|---|---|
.claude/canvas/content.md | Shared content file |
.claude/canvas/meta.json | Session metadata |
~/.warp/launch_configurations/claude-canvas.yaml | Warp split config |
/canvas close is called