Skip to content
OpenSmartRoute
Skillv1.0.0

apple-notes-deploy-integration

Deploy Apple Notes automation as a local macOS service. Trigger: "apple notes deploy".

by jeremylongshore(0) 0 installs
Free
Sign in to install

Free account. Installing gives you the manifest plus copy-paste snippets.

See reviews

About

Imported from jeremylongshore/tons-of-skills-marketplace (plugins/saas-packs/apple-notes-pack/skills/apple-notes-deploy-integration/SKILL.md). Install upstream with npx skills add jeremylongshore/tons-of-skills-marketplace --skill apple-notes-deploy-integration. Copyright stays with the author (MIT).

Apple Notes Deploy Integration

Overview

Apple Notes automation runs exclusively on macOS — there is no cloud deployment path because Notes.app depends on the local Apple Events subsystem and TCC permissions. Deployment means packaging your JXA/osascript automation as a persistent local service. The three deployment models are: launchd agents for scheduled/recurring tasks, Automator workflows for user-triggered actions, and Apple Shortcuts for cross-app automation. Each has different permission requirements and lifecycle management.

Prerequisites

  • An owned interactive macOS user session, an approved launchd label, and explicit TCC consent for the actual client path.
  • Immutable versioned scripts with a tested rollback package; do not deploy from a mutable home-directory glob.
  • A restricted log directory and a non-production account or folder for initial smoke tests.

Instructions

  1. Install a versioned artifact into a user-owned directory with restrictive permissions and validate the plist with plutil -lint.
  2. Bootstrap the agent in the GUI user domain; confirm its label, executable path, and environment exactly match the reviewed release.
  3. Run a read-only scoped smoke test before enabling scheduled writes.
  4. Roll back by booting out the exact label and restoring the previously approved artifact; never leave two schedules active.

launchd Agent (Recommended for Background Tasks)

<!-- ~/Library/LaunchAgents/com.yourorg.notes-automation.plist -->
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"
  "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>Label</key>
    <string>com.yourorg.notes-automation</string>
    <key>ProgramArguments</key>
    <array>
        <string>/usr/local/bin/node</string>
        <string>/Users/you/scripts/notes-sync.js</string>
    </array>
    <key>StartInterval</key>
    <integer>3600</integer>
    <key>StandardOutPath</key>
    <string>/tmp/notes-automation.log</string>
    <key>StandardErrorPath</key>
    <string>/tmp/notes-automation-error.log</string>
    <key>EnvironmentVariables</key>
    <dict>
        <key>PATH</key>
        <string>/usr/local/bin:/usr/bin:/bin</string>
    </dict>
    <key>RunAtLoad</key>
    <true/>
</dict>
</plist>
# Deploy and manage the launchd agent
cp com.yourorg.notes-automation.plist ~/Library/LaunchAgents/
launchctl load ~/Library/LaunchAgents/com.yourorg.notes-automation.plist
launchctl list | grep notes-automation
# View logs
tail -f /tmp/notes-automation.log

# Unload for updates
launchctl unload ~/Library/LaunchAgents/com.yourorg.notes-automation.plist

Shortcuts Deployment (User-Triggered)

# Create a Shortcut that runs your JXA script
# 1. Open Shortcuts.app > New Shortcut
# 2. Add "Run Shell Script" action with:
osascript -l JavaScript /Users/you/scripts/notes-export.js

# Trigger shortcuts from CLI or other automations:
shortcuts run "Export Notes to Markdown"
shortcuts run "Daily Note Creator" --input-type text --input "$(date +%Y-%m-%d)"

# List available shortcuts
shortcuts list | grep -i note

Installer Script

#!/bin/bash
# scripts/install.sh — Deploy Notes automation to a macOS machine
set -euo pipefail

INSTALL_DIR="$HOME/.notes-automation"
PLIST_DIR="$HOME/Library/LaunchAgents"
LABEL="com.yourorg.notes-automation"

echo "Installing Apple Notes automation..."
mkdir -p "$INSTALL_DIR"
cp scripts/*.js "$INSTALL_DIR/"
cp config/*.json "$INSTALL_DIR/"

# Install launchd plist
envsubst < templates/launchd.plist.template > "$PLIST_DIR/$LABEL.plist"
launchctl load "$PLIST_DIR/$LABEL.plist"

# Verify
echo -n "Service status: "
launchctl list "$LABEL" 2>/dev/null && echo "Running" || echo "Failed to start"

# Test Notes access (will trigger TCC prompt on first run)
echo -n "Notes access: "
osascript -l JavaScript -e 'Application("Notes").defaultAccount.notes.length' && echo "OK" || echo "DENIED — approve in System Settings"

Error Handling

Issue Cause Solution
launchd job starts but osascript fails TCC not granted for launchd context Run script manually first to trigger TCC prompt; approve in System Settings
Job runs but Notes.app not open RunAtLoad fires before login complete Add open -a Notes before osascript calls in your script
Logs show "connection invalid" Screen locked or user switched Add LimitLoadToSessionType: Aqua to plist for GUI session only
Shortcut not found from CLI Shortcut name mismatch or not saved shortcuts list to verify exact name
Agent runs twice Both StartInterval and StartCalendarInterval set Use only one scheduling mechanism per plist

Output

A deployment receipt identifies the artifact version, plist label, macOS user domain, smoke-test mode, log location, and rollback version. It excludes note counts, titles, bodies, account names, and TCC database details.

Examples

Deploy a read-only health job first, verify its launchctl print output and redacted log receipt, then separately approve any write-capable job. If the smoke test fails, boot out the new label and restore the prior reviewed version before investigating.

Resources

Next Steps

For production readiness validation, see apple-notes-prod-checklist. For monitoring deployed services, see apple-notes-observability.

Use it

Copy one of these into your project. Installing also returns the manifest and these snippets.

yaml
targets:
  - https://api.opensmartroute.ai/api/v1/registry/jeremylongshore-tons-of-skills-marketplace-apple-notes-d-feabe0/manifest   # or paste the manifest below

Manifest

An Open Capability Manifest: the router reads it to know what this does, what it costs and when to pick it.

jeremylongshore-tons-of-skills-marketplace-apple-notes-d-feabe0.ocm.jsonjson
{
  "ocm": "1",
  "id": "jeremylongshore-tons-of-skills-marketplace-apple-notes-d-feabe0",
  "kind": "skill",
  "name": "apple-notes-deploy-integration",
  "description": "Deploy Apple Notes automation as a local macOS service. Trigger: \"apple notes deploy\".",
  "publisher": "jeremylongshore",
  "version": "1.0.0",
  "capabilities": {
    "domains": [
      "general"
    ],
    "tags": [
      "skill-md",
      "saas",
      "macos",
      "apple-notes",
      "automation",
      "skills-sh"
    ],
    "languages": [
      "en"
    ]
  },
  "quality_prior": 0.6,
  "examples": [
    "Deploy Apple Notes automation as a local macOS service. Trigger: \"apple notes deploy\"."
  ],
  "primary": false,
  "metadata": {
    "source": {
      "provider": "skills.sh",
      "repository": "https://github.com/jeremylongshore/tons-of-skills-marketplace",
      "path": "plugins/saas-packs/apple-notes-pack/skills/apple-notes-deploy-integration/SKILL.md",
      "ref": "HEAD",
      "url": "https://github.com/jeremylongshore/tons-of-skills-marketplace/blob/HEAD/plugins/saas-packs/apple-notes-pack/skills/apple-notes-deploy-integration/SKILL.md",
      "key": "jeremylongshore/tons-of-skills-marketplace/plugins/saas-packs/apple-notes-pack/skills/apple-notes-deploy-integration/SKILL.md"
    },
    "compatibility": "Designed for Claude Code",
    "allowed_tools": [
      "Read,",
      "Write,",
      "Edit,",
      "Bash(osascript:*),",
      "Grep"
    ],
    "license": "MIT"
  },
  "instructions": "# Apple Notes Deploy Integration\n\n## Overview\n\nApple Notes automation runs exclusively on macOS — there is no cloud deployment path because Notes.app depends on the local Apple Events subsystem and TCC permissions. Deployment means packaging your JXA/osascript automation as a persistent local service. The three deployment models are: launchd agents for scheduled/recurring tasks, Automator workflows for user-triggered actions, and Apple Shortcuts for cross-app automation. Each has different permission requirements and lifecycle management.\n\n## Prerequisites\n\n- An owned interactive macOS user se",
  "cost": {
    "context_tokens": 1463
  }
}

Fetch it by URL: GET /api/v1/registry/jeremylongshore-tons-of-skills-marketplace-apple-notes-d-feabe0/manifest?version=1.0.0

Reviews

Star ratings from people who tried it. One review per account; edit yours any time.

No reviews yet. Install it, try it, and be the first to rate it.