← 返回
开发者工具 中文

Drafts CLI

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.
通过 CLI 在 macOS 上管理 Drafts 应用笔记。创建、查看、列出、编辑、追加、前置及执行草稿操作。适用于用户请求创建笔记、列出草稿、搜索草稿或管理 Drafts 收件箱。重要提示:此功能需在 macOS 上运行 Drafts 应用。
nerveband
开发者工具 clawhub v1.0.0 1 版本 99553.6 Key: 无需
★ 1
Stars
📥 2,433
下载
💾 88
安装
1
版本
#latest

概述

Drafts CLI

Manage Drafts notes from the terminal on macOS.

IMPORTANT REQUIREMENTS

> This CLI ONLY works on macOS with Drafts app running.

  • macOS only - Uses AppleScript, will not work on Linux/Windows
  • Drafts must be RUNNING - The app must be open for any command to work
  • Drafts Pro required - Automation features require Pro subscription

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 todo

# Flagged draft
drafts create "Urgent reminder" -f

# Create in archive
drafts create "Reference note" -a

List Drafts

# List inbox (default)
drafts list

# List archived drafts
drafts list -f archive

# List trashed drafts
drafts list -f trash

# List all drafts
drafts list -f all

# Filter by tag
drafts list -t mytag

Get a Draft

# Get specific draft
drafts get <uuid>

# Get active draft (currently open in Drafts)
drafts get

Modify Drafts

# Prepend text
drafts prepend "New first line" -u <uuid>

# Append text
drafts append "Added at the end" -u <uuid>

# Replace entire content
drafts replace "Completely new content" -u <uuid>

Edit in Editor

drafts edit <uuid>

Run Actions

# Run action on text
drafts run "Copy" "Text to copy to clipboard"

# Run action on existing draft
drafts run "Copy" -u <uuid>

Get Schema

# Full schema for LLM integration
drafts schema

# Schema 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 <journal-uuid>

Search and Review

# List all drafts with a specific tag
drafts list -t work

# Get full content of a draft
drafts get <uuid>

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:

  • Check if Drafts is showing a dialog

Notes

  • macOS ONLY (AppleScript-based)
  • Drafts app MUST be running
  • Requires Drafts Pro subscription
  • All UUIDs are Drafts-generated identifiers
  • Tags are case-sensitive

Version

Latest (from go install)

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-03-28 14:56 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

developer-tools

CodeConductor.ai

larsonreever
AI驱动平台,提供快速全栈开发、智能体、工作流自动化及低代码AI集成的可扩展产品创建。
★ 66 📥 179,897
content-creation

YouTube API CLI

nerveband
命令行管理YouTube账户,完整YouTube Data API v3 CLI,支持列出/搜索视频、上传、管理播放列表等功能。
★ 3 📥 3,136
developer-tools

Github

steipete
使用 `gh` CLI 与 GitHub 交互,通过 `gh issue`、`gh pr`、`gh run` 和 `gh api` 管理议题、PR、CI 运行及高级查询。
★ 668 📥 323,861