apple-journal-cli 1.4.2 → 1.4.3
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 +13 -4
- package/bin/journal-cli +0 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -56,7 +56,10 @@ Release history and upgrade notes: [CHANGELOG.md](CHANGELOG.md).
|
|
|
56
56
|
## Reading
|
|
57
57
|
|
|
58
58
|
Reads run against a temp snapshot of the store, so they are safe while
|
|
59
|
-
Journal.app is open
|
|
59
|
+
Journal.app is open. The snapshot comes from SQLite's online backup API, which
|
|
60
|
+
reads the live database read-only in one transaction: it never writes the
|
|
61
|
+
store or blocks Journal's own writes, and a checkpoint mid-copy cannot leave it
|
|
62
|
+
half old, half new.
|
|
60
63
|
|
|
61
64
|
```sh
|
|
62
65
|
journal-cli list --limit 20 --full # --full prints bodies
|
|
@@ -82,7 +85,7 @@ text from drawings.
|
|
|
82
85
|
|
|
83
86
|
Writes against the real store require `--live`, refuse to run while
|
|
84
87
|
Journal.app is open, take a timestamped backup to `~/Backups/journal-cli/`
|
|
85
|
-
first, and require a **one-time risk acknowledgment** (interactive prompt, or
|
|
88
|
+
first (if the backup fails, nothing is written), and require a **one-time risk acknowledgment** (interactive prompt, or
|
|
86
89
|
`--accept-risk` for scripts — agents should ask their user before passing it).
|
|
87
90
|
Every mutating command also takes `--dry-run`, which prints the plan and
|
|
88
91
|
writes nothing. New entries sync to iCloud like native ones — verified end to end,
|
|
@@ -210,12 +213,14 @@ humans:
|
|
|
210
213
|
|
|
211
214
|
| Layer | Behavior |
|
|
212
215
|
|---|---|
|
|
213
|
-
| Reads | temp snapshot
|
|
216
|
+
| Reads | temp snapshot via SQLite's online backup API (read-only, one transaction); the live store is never written |
|
|
214
217
|
| Risk acknowledgment | first live write requires typing "I understand" (or `--accept-risk`); stored in `~/.config/journal-cli/` |
|
|
215
218
|
| `--dry-run` | every mutating command can print its plan and write nothing |
|
|
216
219
|
| `--live` gate | writes to the real store refuse to run without it |
|
|
217
220
|
| App check | writes refuse to run while Journal.app is open |
|
|
218
|
-
| Auto-backup | every live write
|
|
221
|
+
| Auto-backup | every live write backs the store up to its own folder in `~/Backups/journal-cli/` first, and is refused if that fails. Media that `edit --remove-media`, `delete --hard` or `empty` removes is moved into that backup's `Attachments/` after the write commits, so restoring the backup restores the files too |
|
|
222
|
+
| Body input | an unreadable or non-UTF-8 `--body-file` (or stdin) is an error, never an empty body; an empty file still clears the text on purpose |
|
|
223
|
+
| Failed writes | a write that fails part way rolls back and removes any attachment folders it created; files it was going to remove stay until the commit |
|
|
219
224
|
| Synced hard-deletes | refused without `--force`: a local row delete does not tombstone the CloudKit record, and the entry **resurrects on the next sync** (observed). Soft delete syncs properly. |
|
|
220
225
|
| CRDT text guard | text edits on app-authored entries are refused without `--force` (see below) |
|
|
221
226
|
| Sandbox | `sandbox` + `--db` target a throwaway copy; the `--live` gate does not apply there |
|
|
@@ -336,6 +341,10 @@ cd swift && swift build # debug build
|
|
|
336
341
|
tests/test_write.sh # full suite against a store copy
|
|
337
342
|
```
|
|
338
343
|
|
|
344
|
+
`JOURNAL_BACKUP_DIR=DIR` sends backups to `DIR` instead of
|
|
345
|
+
`~/Backups/journal-cli/`, and makes sandbox writes take one too, which is how
|
|
346
|
+
the suite tests backups.
|
|
347
|
+
|
|
339
348
|
The `reference/` directory holds the original Python implementation — same
|
|
340
349
|
command surface, same test suite, useful for spelunking since it needs no
|
|
341
350
|
build step.
|
package/bin/journal-cli
CHANGED
|
Binary file
|