summaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorChristopher Warner <cwarner@kernelcode.com>2026-10-10 18:47:24 -0400
committerChristopher Warner <cwarner@kernelcode.com>2026-10-10 18:47:24 -0400
commit5c61196f27b9342e5f25414c11df5710f956f406 (patch)
treec81f15f54c9baa35f61ce3c71b81f1c1e7b5f590 /README.md
parent78862ba855c6e66cac64a86c25dca6149d8fb2fd (diff)
downloadiphone-notes-5c61196f27b9342e5f25414c11df5710f956f406.tar.gz
iphone-notes-5c61196f27b9342e5f25414c11df5710f956f406.tar.bz2
iphone-notes-5c61196f27b9342e5f25414c11df5710f956f406.tar.xz
iphone-notes-5c61196f27b9342e5f25414c11df5710f956f406.zip
feat!: rewrite icloud-note CLI in Rust with chromiumoxide
Replace the Node/Playwright driver with a single Rust binary so create/status stay headless without a visible browser. Move the previous implementation to legacy/nodejs for reference. BREAKING CHANGE: the supported CLI is the Rust `icloud-note` binary; the Node entrypoint is no longer installed by setup.sh. Co-authored-by: Cursor <cursoragent@cursor.com>
Diffstat (limited to 'README.md')
-rw-r--r--README.md50
1 files changed, 25 insertions, 25 deletions
diff --git a/README.md b/README.md
index c3e80b7..b0e79be 100644
--- a/README.md
+++ b/README.md
@@ -1,17 +1,16 @@
# iphone-notes
Create real **Apple Notes** on an iPhone from Linux by driving
-[icloud.com/notes](https://www.icloud.com/notes/) with Playwright and a saved
-Apple ID browser session.
+[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`) so agents can forward
-prompt results to your phone as Notes.
+Also packaged as a Cursor/Goose agent skill (`SKILL.md`).
## Quick start
```bash
-./scripts/setup.sh
-icloud-note login # Apple ID + 2FA once (graphical session)
+./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"
```
@@ -19,44 +18,45 @@ icloud-note create --title "Hello" --body "From Linux"
| Command | Purpose |
|---|---|
-| `icloud-note setup` | Install Playwright Chromium + `~/.local/bin` wrapper |
-| `icloud-note login` | **Only** command that opens a visible browser (one-time Apple ID) |
-| `icloud-note status` | Headless check that the saved session can open Notes |
-| `icloud-note create` | Headless create (`--title`, `--body` / `--body-file`) — no window |
+| `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
-SKILL.md Agent instructions
-scripts/icloud-note.mjs CLI
-scripts/setup.sh One-time install + skill symlinks
-tests/cli.test.sh Smoke tests (no Apple network required)
+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/
- storage-state.json Cookies/session for headless create (private)
- browser-profile/ Used only during `login` (private)
- node_modules/ Playwright install
+ 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
-npm test
-# or
./tests/run.sh
+# or
+cargo test && ./tests/cli.test.sh && ./tests/conventional-commits.test.sh
```
-Covers:
-
-- Pure helpers (`tests/helpers.test.mjs`) — note formatting, auth heuristics, argv, Conventional Commits subjects
-- CLI dry-run (`tests/cli.test.sh`) — help, create/status/login without a browser (`ICLOUD_NOTES_DRY_RUN=1`)
-- Git history (`tests/conventional-commits.test.sh`) — every commit subject matches Conventional Commits 1.0.0
+## Why Rust
-Live Apple create/status (real headless Chromium) is manual after `icloud-note login`.
+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