Drafts CLI for Openclaw

A macOS-native command-line interface for the Drafts app that enables programmatic note management and workflow automation.

nerveband
v1.0.0
Jan 27, 2026
1
3.1k
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install drafts

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install drafts using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is Drafts CLI?

Drafts CLI is a specialized utility designed for macOS power users who need to bridge their terminal environment with the Drafts note-taking application. By utilizing AppleScript, this tool allows for seamless interaction with your notes, enabling you to perform actions that usually require manual GUI interaction. It serves as a vital bridge for developers looking to integrate their personal knowledge management into automated scripts.

This utility is a perfect example of the extensibility found within Openclaw Skills, providing a structured way to capture ideas, manage an inbox, and trigger complex actions without leaving the terminal. Whether you are building a custom logging system or simply want to search your drafts quickly, this CLI provides the necessary interface to do so efficiently.

Drafts CLI Use Cases

  • Rapidly capturing meeting notes or reminders without switching windows.
  • Appending automated build logs or system status reports to a centralized journal draft.
  • Batch processing drafts by filtering for specific tags and archiving them via script.
  • Integrating Drafts into a larger terminal-based workflow using Openclaw Skills for AI-assisted note organization.
  • Triggering specialized Drafts actions, like exporting text to other services, directly from a shell script.

How Drafts CLI Works

  1. The user executes a command using the drafts binary in the terminal.
  2. The CLI verifies that the Drafts app is currently running on the macOS system.
  3. The tool sends AppleScript commands to the Drafts application to perform the requested operation (e.g., fetching a draft by UUID or creating a new tagged note).
  4. Drafts processes the request and returns the resulting data back to the CLI.
  5. The CLI outputs the result in a structured JSON format, making it easy for other tools or agents to parse.

Drafts CLI Setup

This tool requires macOS, the Drafts app to be running, and a Drafts Pro subscription. To install via Go, run:

go install github.com/nerveband/drafts/cmd/drafts@latest

Alternatively, you can build the project from source:

git clone https://github.com/nerveband/drafts
cd drafts && go build ./cmd/drafts

Drafts CLI Data Schema & Taxonomy

The tool primarily interacts with Drafts objects. By default, most commands return a JSON object containing the status and the note data:

Property Description
uuid The unique identifier generated by the Drafts app.
content The full text body of the draft.
title The derived title (usually the first line).
tags An array of strings representing assigned tags.
folder The current location of the note (inbox, archive, or trash).

Drafts CLI Advanced Features

  • Direct action execution: Run any predefined Drafts action on existing notes or raw text input.
  • LLM Integration: Use the drafts schema command to output technical specifications for AI agents within Openclaw Skills.
  • Flexible Filtering: List and sort notes across different folders and filter specifically by case-sensitive tags.
  • External Editor Support: Open specific drafts in your system's default text editor for complex modifications.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*