summaryrefslogtreecommitdiff
path: root/README.md
blob: b0e79be37bd070ce9bd3d7df3d928369d9ad7f66 (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
62
63
# iphone-notes

Create real **Apple Notes** on an iPhone from Linux by driving
[icloud.com/notes](https://www.icloud.com/notes/) with a **Rust** CLI
(`chromiumoxide` + headless Chromium) and a saved browser profile.

Also packaged as a Cursor/Goose agent skill (`SKILL.md`).

## Quick start

```bash
./scripts/setup.sh          # cargo build --release + Chromium + ~/.local/bin
icloud-note login           # Apple ID + 2FA once (visible window)
icloud-note create --title "Hello" --body "From Linux"
```

## CLI

| Command | Purpose |
|---|---|
| `icloud-note setup` | Build/install binary + ensure Chromium |
| `icloud-note login` | **Only** command that opens a visible browser |
| `icloud-note status` | Headless session check |
| `icloud-note create` | Headless create (`--title`, `--body` / `--body-file`) |

## Layout

```text
src/                 Rust library + CLI (chromiumoxide)
scripts/setup.sh     Build, install, skill symlinks
SKILL.md             Agent instructions
tests/               cargo test + CLI dry-run + Conventional Commits
legacy/nodejs/       Previous Playwright implementation (reference only)
```

Runtime config (not in git):

```text
~/.config/icloud-notes/
  browser-profile/   Chromium user-data (private)
  session.ok         Marker after successful login
```

Optional: `ICLOUD_NOTES_CHROME=/path/to/chrome`  
Tests: `ICLOUD_NOTES_DRY_RUN=1`

## Tests

```bash
./tests/run.sh
# or
cargo test && ./tests/cli.test.sh && ./tests/conventional-commits.test.sh
```

## Why Rust

Single binary, `cargo test` for helpers, and headless Chromium via CDP without a
Node/Playwright process flashing a window on Linux. The Notes web app is still
driven through JavaScript evaluation — that part is inherent to iCloud.

## License

MIT