summaryrefslogtreecommitdiff
path: root/SKILL.md
blob: e83bf4779b12a4c3049880021c81162eb48df067 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
---
name: iphone-icloud-notes
description: >-
  Create real Apple Notes on the user's iPhone by driving icloud.com/notes from
  Linux with the Rust icloud-note CLI (headless Chromium). Use when the user asks
  to create a note, send/forward results to their iPhone, push text to Apple
  Notes, or mentions icloud.com/notes / iCloud Notes from Linux.
---

# iPhone notes via icloud.com/notes (Rust)

## Goal

When asked to create a note or forward prompt results to the iPhone, **create a
real Apple Note** through the iCloud Notes web app using the **Rust**
`icloud-note` binary. Do not use LocalSend unless the user wants file transfer.

## Source of truth

Repo: `~/Code/iphone-notes`  
Binary: `~/.local/bin/icloud-note` (from `cargo build --release`)  
Skill link: `~/.agents/skills/iphone-icloud-notes` → that repo

## Helper

```bash
icloud-note status
icloud-note login          # ONE-TIME only — only command that opens a window
icloud-note create --title "Title" --body "Body text"
icloud-note create --title "Title" --body-file /path/to.txt
icloud-note create --title "Title" --body-file -   # stdin
```

If missing from PATH:

```bash
"$HOME/Code/iphone-notes/target/release/icloud-note" …
# or: cargo run --manifest-path "$HOME/Code/iphone-notes/Cargo.toml" -- …
```

`create` / `status` are **always headless**. Never run `login` unless the user
must re-authenticate. Do **not** set `ICLOUD_NOTES_DRY_RUN=1` for real sends.

Config: `~/.config/icloud-notes/` (browser profile; private)

## Agent workflow

1. Prepare title + body.
2. `icloud-note status` — if not logged in, ask the user to run `icloud-note login`.
3. `icloud-note create --title "$TITLE" --body-file "$TMPFILE"`
4. Report the `created:` line. Syncs to iPhone when iCloud Notes is enabled.

## Setup (human / once)

```bash
"$HOME/Code/iphone-notes/scripts/setup.sh"
icloud-note login
```

Requires Rust (`cargo`) and a Chromium binary (setup can install Playwright’s
Chromium under `~/.cache/ms-playwright`).