Drafts CLI
by @nerveband
Manage Drafts app notes via CLI on macOS. Create, view, list, edit, append, prepend, and run actions on drafts. Use when a user asks to create a note, list drafts, search drafts, or manage their Drafts inbox. IMPORTANT - Drafts app must be running on macOS for this to work.
clawhub install draftsπ About This Skill
name: drafts description: Manage Drafts app notes via CLI on macOS. Create, view, list, edit, append, prepend, and run actions on drafts. Use when a user asks to create a note, list drafts, search drafts, or manage their Drafts inbox. IMPORTANT - Drafts app must be running on macOS for this to work. homepage: https://github.com/nerveband/drafts metadata: {"clawdbot":{"emoji":"π","os":["darwin"],"requires":{"bins":["drafts"]}}}
Drafts CLI
Manage Drafts notes from the terminal on macOS.
IMPORTANT REQUIREMENTS
> This CLI ONLY works on macOS with Drafts app running.
If commands fail or hang, first check: open -a Drafts
Setup
Install via Go:
go install github.com/nerveband/drafts/cmd/drafts@latest
Or build from source:
git clone https://github.com/nerveband/drafts
cd drafts && go build ./cmd/drafts
Commands
Create a Draft
# Simple draft
drafts create "Meeting notes for Monday"With tags
drafts create "Shopping list" -t groceries -t todoFlagged draft
drafts create "Urgent reminder" -fCreate in archive
drafts create "Reference note" -a
List Drafts
# List inbox (default)
drafts listList archived drafts
drafts list -f archiveList trashed drafts
drafts list -f trashList all drafts
drafts list -f allFilter by tag
drafts list -t mytag
Get a Draft
# Get specific draft
drafts get Get active draft (currently open in Drafts)
drafts get
Modify Drafts
# Prepend text
drafts prepend "New first line" -u Append text
drafts append "Added at the end" -u Replace entire content
drafts replace "Completely new content" -u
Edit in Editor
drafts edit
Run Actions
# Run action on text
drafts run "Copy" "Text to copy to clipboard"Run action on existing draft
drafts run "Copy" -u
Get Schema
# Full schema for LLM integration
drafts schemaSchema for specific command
drafts schema create
Output Format
JSON (default) - All commands return structured JSON:
{
"success": true,
"data": {
"uuid": "ABC123",
"content": "Note content",
"title": "Note title",
"tags": ["tag1", "tag2"],
"folder": "inbox"
}
}
Plain text - Human-readable output:
drafts list --plain
Common Workflows
Quick Capture
drafts create "Remember to call dentist tomorrow" -t reminder
Daily Journal
drafts append "$(date): Completed project review" -u
Search and Review
# List all drafts with a specific tag
drafts list -t workGet full content of a draft
drafts get
Troubleshooting
Commands fail or return empty:
1. Is Drafts running? β open -a Drafts
2. Is Drafts Pro active? β Automation requires Pro
3. Permissions granted? β System Settings > Privacy > Automation
Commands hang:
Notes
Version
Latest (from go install)
βοΈ Configuration
Install via Go:
go install github.com/nerveband/drafts/cmd/drafts@latest
Or build from source:
git clone https://github.com/nerveband/drafts
cd drafts && go build ./cmd/drafts