claude-nomad 0.34.1 → 0.35.0

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/CHANGELOG.md CHANGED
@@ -1,5 +1,18 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.35.0](https://github.com/funkadelic/claude-nomad/compare/v0.34.1...v0.35.0) (2026-05-31)
4
+
5
+
6
+ ### Added
7
+
8
+ * **clean:** prune old backups via nomad clean --backups ([#207](https://github.com/funkadelic/claude-nomad/issues/207)) ([ed9149d](https://github.com/funkadelic/claude-nomad/commit/ed9149d549fa87122238ddc7deb3c402555f62a6))
9
+ * **doctor:** warn on ESM/CommonJS hook module-scope mismatch ([#206](https://github.com/funkadelic/claude-nomad/issues/206)) ([451a3c3](https://github.com/funkadelic/claude-nomad/commit/451a3c380bb4fc0cb6d6bf6fc2e51c69ca20c159))
10
+
11
+
12
+ ### Changed
13
+
14
+ * remove dead code left by recent refactors ([#204](https://github.com/funkadelic/claude-nomad/issues/204)) ([c956f29](https://github.com/funkadelic/claude-nomad/commit/c956f291653141512ddc96fbca66d9512dab1377))
15
+
3
16
  ## [0.34.1](https://github.com/funkadelic/claude-nomad/compare/v0.34.0...v0.34.1) (2026-05-31)
4
17
 
5
18
 
package/README.md CHANGED
@@ -59,6 +59,7 @@ box, a personal rig and a work machine. [Get started in three steps.](#quickstar
59
59
  - **Reference**
60
60
  - [Commands](#commands)
61
61
  - [Recovery flows](#recovery-flows)
62
+ - [Pruning old backups](#pruning-old-backups)
62
63
  - [`nomad drop-session <id>`](#nomad-drop-session-id)
63
64
  - [`nomad redact <session-id>`](#nomad-redact-session-id)
64
65
  - [Recovery flow: gitleaks FATAL on a session JSONL](#recovery-flow-gitleaks-fatal-on-a-session-jsonl)
@@ -562,6 +563,7 @@ to this host.
562
563
  | `nomad redact <session-id>` | Rewrite the secret span in the local source transcript for a session, backed up to `~/.cache/claude-nomad/backup/`. Refuses to touch a session that was modified recently (potential active session). Safe to re-run. See [`nomad redact <session-id>`](#nomad-redact-session-id). |
563
564
  | `nomad redact --rule <id>` | Limit redaction to findings of one gitleaks rule id only. |
564
565
  | `nomad redact --dry-run` | Show what `nomad redact` would change without writing anything. |
566
+ | `nomad clean --backups` | Delete old backup snapshots under `~/.cache/claude-nomad/backup/`. By default removes snapshots older than 14 days; pass `--older-than <dur>` (e.g. `7d`, `24h`) to change the age, or `--keep <N>` to keep the N newest and delete the rest (the two flags cannot be combined). Always preview with `--dry-run` first. See [Pruning old backups](#pruning-old-backups). |
565
567
  | `nomad update` | Update the `nomad` CLI binary from npm (`npm update -g claude-nomad`). Does NOT pull your sync data; run `nomad pull` separately for that. See [Upgrading the CLI](#upgrading-the-cli). |
566
568
  | `nomad doctor` | Read-only health check. Each line carries a status glyph (`✓` pass, `✗` fail, `⚠︎` warn); any `✗` sets `process.exitCode = 1` (`⚠︎` does not). Includes an offline-tolerant release-version staleness check, a Hook targets check that fails (`✗`, exit 1) when `settings.json` references a hook command whose script under `~/.claude/` is missing on this host, plus two `⚠︎`-only drift checks: gitleaks version drift and, on a private GitHub mirror, re-enabled Actions. |
567
569
  | `nomad doctor --resume-cmd <id>` | Print a host-local `cd ... && claude --resume <id>` line for a session (see [Cross-OS resume](#cross-os-resume)). |
@@ -670,6 +672,35 @@ unchanged.
670
672
 
671
673
  ## Recovery flows
672
674
 
675
+ ### Pruning old backups
676
+
677
+ Every `nomad pull` and `nomad push` keeps you safe by copying any file it is about to overwrite into
678
+ a timestamped snapshot under `~/.cache/claude-nomad/backup/<ts>/`. That is what makes an unexpected
679
+ overwrite recoverable, but the snapshots are never deleted automatically, so over many syncs the
680
+ folder slowly grows. It lives in your local cache and is never synced to the shared repo, so
681
+ cleaning it up is purely local disk housekeeping.
682
+
683
+ `nomad clean --backups` prunes those snapshots. **Always run it with `--dry-run` first** so you can
684
+ see exactly which snapshots it would delete before anything is removed:
685
+
686
+ ```bash
687
+ $ nomad clean --backups --dry-run # list what would be deleted, remove nothing
688
+ $ nomad clean --backups # delete snapshots older than 14 days (the default)
689
+ ```
690
+
691
+ You choose what counts as "old" in one of two ways (you cannot use both at once):
692
+
693
+ - `--older-than <duration>` deletes snapshots older than the given age. The duration is a number
694
+ plus a unit: `d` for days, `h` for hours, `m` for minutes (for example `7d`, `24h`, `30m`). With
695
+ no retention flag at all, the default is `--older-than 14d`.
696
+ - `--keep <N>` keeps the `N` most recent snapshots and deletes the rest, regardless of age.
697
+
698
+ `nomad clean` only ever touches the timestamped snapshot directories directly inside the backup
699
+ folder; it never follows symlinks out of it and never removes the backup folder itself. As a gentle
700
+ reminder, `nomad doctor` shows a `⚠︎` warning when the backup folder grows past roughly 20 snapshots
701
+ or 200 MB, nudging you to run `nomad clean --backups`. That warning is informational only and never
702
+ changes the doctor exit code.
703
+
673
704
  ### `nomad drop-session <id>`
674
705
 
675
706
  Surgically unstages every `shared/projects/*/<id>.jsonl` plus the sibling `shared/projects/*/<id>/`