apple-journal-cli 1.0.3 → 1.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # journal-cli
1
+ # apple-journal-cli
2
2
 
3
3
  **Read and write Apple Journal entries from the terminal.** Text, photos,
4
4
  videos, Live Photos, web links, location pins, bookmarks, multiple journals —
@@ -18,9 +18,21 @@ $ journal-cli list --limit 3
18
18
 
19
19
  $ journal-cli show 117
20
20
  audio (asset 705) 2.2s "This is a test of an audio recording."
21
- location 15835 NE 36th St, Redmond (47.641544, -122.129299)
21
+ location Golden Gate Bridge, San Francisco (37.8199, -122.4783)
22
22
  ```
23
23
 
24
+ > [!WARNING]
25
+ > **Back up your journal first.** journal-cli writes directly to Apple
26
+ > Journal's private, undocumented data store. Apple does not support this; a
27
+ > macOS update can change the schema at any time, and a bad write could
28
+ > corrupt entries or confuse iCloud sync across **all** your devices. Before
29
+ > your first live write, export a backup in Journal.app (**Journal → Settings
30
+ > → Export Journal Entries…**). journal-cli also snapshots the local store to
31
+ > `~/Backups/journal-cli/` before every live write, but that cannot undo
32
+ > anything that has already synced to iCloud. **Use at your own risk.** The
33
+ > CLI requires a one-time risk acknowledgment before its first live write
34
+ > (interactive prompt, or `--accept-risk`).
35
+
24
36
  ## Install
25
37
 
26
38
  ```sh
@@ -28,7 +40,7 @@ brew install omarshahine/tap/journal-cli
28
40
  # or
29
41
  npm install -g apple-journal-cli
30
42
  # or from source
31
- git clone https://github.com/omarshahine/journal-cli && cd journal-cli/swift
43
+ git clone https://github.com/omarshahine/apple-journal-cli && cd apple-journal-cli/swift
32
44
  swift build -c release && cp .build/release/journal-cli /usr/local/bin/
33
45
  ```
34
46
 
@@ -48,7 +60,7 @@ Journal.app is open and never lock the live database.
48
60
  journal-cli list --limit 20 --full # --full prints bodies
49
61
  journal-cli list --since 2025-01-01 --until 2025-12-31
50
62
  journal-cli show 95 # entry + assets + attachment paths
51
- journal-cli search anguilla
63
+ journal-cli search tokyo
52
64
  journal-cli export --dir ~/journal-export # one .md per entry, YAML frontmatter
53
65
  journal-cli export --dir ~/export --format json
54
66
  journal-cli stats # counts, words, by-year histogram
@@ -64,8 +76,11 @@ text from drawings.
64
76
  ## Writing
65
77
 
66
78
  Writes against the real store require `--live`, refuse to run while
67
- Journal.app is open, and take a timestamped backup to `~/Backups/journal-cli/`
68
- first. New entries sync to iCloud like native ones — verified end to end,
79
+ Journal.app is open, take a timestamped backup to `~/Backups/journal-cli/`
80
+ first, and require a **one-time risk acknowledgment** (interactive prompt, or
81
+ `--accept-risk` for scripts — agents should ask their user before passing it).
82
+ Every mutating command also takes `--dry-run`, which prints the plan and
83
+ writes nothing. New entries sync to iCloud like native ones — verified end to end,
69
84
  including CloudKit accepting attached files.
70
85
 
71
86
  ```sh
@@ -137,6 +152,8 @@ humans:
137
152
  | Layer | Behavior |
138
153
  |---|---|
139
154
  | Reads | temp snapshot of `db`+`-wal`+`-shm`; live store never opened for read |
155
+ | Risk acknowledgment | first live write requires typing "I understand" (or `--accept-risk`); stored in `~/.config/journal-cli/` |
156
+ | `--dry-run` | every mutating command can print its plan and write nothing |
140
157
  | `--live` gate | writes to the real store refuse to run without it |
141
158
  | App check | writes refuse to run while Journal.app is open |
142
159
  | Auto-backup | every live write snapshots the store to `~/Backups/journal-cli/` first |
package/bin/journal-cli CHANGED
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "apple-journal-cli",
3
- "version": "1.0.3",
3
+ "version": "1.0.6",
4
4
  "description": "Read and write Apple Journal entries from the terminal. Native Swift binary; macOS only.",
5
5
  "keywords": [
6
6
  "apple",
@@ -10,10 +10,10 @@
10
10
  "cli",
11
11
  "diary"
12
12
  ],
13
- "homepage": "https://github.com/omarshahine/journal-cli",
13
+ "homepage": "https://github.com/omarshahine/apple-journal-cli",
14
14
  "repository": {
15
15
  "type": "git",
16
- "url": "git+https://github.com/omarshahine/journal-cli.git"
16
+ "url": "git+https://github.com/omarshahine/apple-journal-cli.git"
17
17
  },
18
18
  "license": "MIT",
19
19
  "author": "Omar Shahine",