claude-nomad 0.34.1 → 0.36.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,37 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.36.0](https://github.com/funkadelic/claude-nomad/compare/v0.35.0...v0.36.0) (2026-06-01)
4
+
5
+
6
+ ### Added
7
+
8
+ * **doctor:** require an HTTP fetcher (curl or wget) for the version check ([#210](https://github.com/funkadelic/claude-nomad/issues/210)) ([96b5a53](https://github.com/funkadelic/claude-nomad/commit/96b5a532e688cca9acebb1c6780d4106b2f21f5b))
9
+
10
+
11
+ ### Changed
12
+
13
+ * **backup:** route backup-path writers through BACKUP_BASE ([#211](https://github.com/funkadelic/claude-nomad/issues/211)) ([7033c29](https://github.com/funkadelic/claude-nomad/commit/7033c29c9af76db029f44d0f1717ea1831ba122e))
14
+ * **tests:** label the test matrix jobs with the Node version ([#208](https://github.com/funkadelic/claude-nomad/issues/208)) ([3ada7e1](https://github.com/funkadelic/claude-nomad/commit/3ada7e12f38fc43f517842435b46c967c9312b25))
15
+
16
+
17
+ ### Documentation
18
+
19
+ * **hero:** add hooks/, align glyph + terminal, tighten spacing ([#213](https://github.com/funkadelic/claude-nomad/issues/213)) ([d0bf93f](https://github.com/funkadelic/claude-nomad/commit/d0bf93f93fb21f65b8c5893b70bacbbf05d8ebe6))
20
+ * refresh contributor and user docs for recent changes ([#212](https://github.com/funkadelic/claude-nomad/issues/212)) ([d909097](https://github.com/funkadelic/claude-nomad/commit/d9090977fdf445316128ca9a0fefdec966105b58))
21
+
22
+ ## [0.35.0](https://github.com/funkadelic/claude-nomad/compare/v0.34.1...v0.35.0) (2026-05-31)
23
+
24
+
25
+ ### Added
26
+
27
+ * **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))
28
+ * **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))
29
+
30
+
31
+ ### Changed
32
+
33
+ * 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))
34
+
3
35
  ## [0.34.1](https://github.com/funkadelic/claude-nomad/compare/v0.34.0...v0.34.1) (2026-05-31)
4
36
 
5
37
 
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)
@@ -395,10 +396,12 @@ Read these before adopting so you opt in with eyes open.
395
396
 
396
397
  **Optional:**
397
398
 
398
- - [curl](https://curl.se/), used by the version-staleness check (`nomad doctor` latest-release line)
399
- and by `nomad doctor --check-schema`; it degrades silently when curl is absent or offline, so the
400
- rest of the CLI works without it. `nomad doctor` reports its presence in the Version Checks
401
- section.
399
+ - [curl](https://curl.se/) or [wget](https://www.gnu.org/software/wget/), the HTTP fetcher behind
400
+ the version-staleness check (`nomad doctor` latest-release line) and
401
+ `nomad doctor --check-schema`. curl is tried first and wget is the fallback, so either one works.
402
+ The checks soft-skip (no error, no exit-code change) when neither is present, so the rest of the
403
+ CLI works without it; `nomad doctor` shows a single "HTTP fetcher (curl or wget)" row that is OK
404
+ when either is installed and warns only when both are absent.
402
405
 
403
406
  ## Setup
404
407
 
@@ -544,30 +547,31 @@ to this host.
544
547
 
545
548
  ## Commands
546
549
 
547
- | Command | Description |
548
- | -------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
549
- | `nomad init` | Create a private GitHub repo via `gh`, wire it as `origin`, disable Actions, scaffold `shared/`, `hosts/`, `path-map.json`, and push. Prompts for a repo name (default: `claude-nomad-config`). `gh` must be installed and authenticated; exits with FATAL otherwise. Refuses to clobber existing scaffold. See [Privacy by default](#privacy-by-default). |
550
- | `nomad init --repo <name>` | Non-interactive: use `<name>` as the private repo name without prompting. Useful in scripts. |
551
- | `nomad init --snapshot` | Overlay current host's `~/.claude/` into `shared/` and write `~/.claude/settings.json` verbatim into `hosts/<NOMAD_HOST>.json`. Originals not modified. Same auto-disable behavior as `nomad init`. |
552
- | `nomad init --keep-actions` | Skip the Actions-disable step. Combinable with `--snapshot` and `--repo`. Use when an org policy already governs Actions, or you intentionally want CI on the private repo. |
553
- | `nomad pull` | `git pull --rebase --autostash`, apply symlinks, regenerate `settings.json`, remap session paths, and pull opted-in per-project extras. Errors out if scaffold missing. |
554
- | `nomad pull --dry-run` | Network-aware preview: acquire lock + `git pull --rebase`, print planned changes (symlink moves, `settings.json` diff, transcript overwrites), exit without writing. |
555
- | `nomad diff` | Offline, lockless twin of `pull --dry-run`. No network, no lock. Works against the current local repo state. |
556
- | `nomad push` | Export local sessions and opted-in per-project extras to logical names, commit (`chore: sync from <NOMAD_HOST>`), push. |
557
- | `nomad push --dry-run` | Run pre-push safety checks (gitleaks probe, rebase, remap preview, gitlink scan, allow-list) and a read-only gitleaks leak preview over a throwaway temp copy of the sessions and extras this host would stage; skip stage, commit, and push. Exits 1 if a leak is found in the preview. Nothing is written to the sync repo. |
558
- | `nomad push --redact-all` | Redact all findings non-interactively (backup written first) without a TTY. Does not auto-Allow findings. After redaction re-stages and re-scans; aborts with the session-aware FATAL if any finding survives. Use this in scripts or when you are confident every finding is a real secret that should be scrubbed. See [Recovery flow: push-time interactive menu](#recovery-flow-push-time-interactive-menu). |
559
- | `nomad drop-session <id>` | Surgically unstage every `shared/projects/*/<id>.jsonl` and the sibling `shared/projects/*/<id>/` subagent directory from the staged tree of `~/claude-nomad/`. Idempotent; the local `~/.claude/projects/<encoded>/<id>.jsonl` and `<id>/` tree are preserved. See [Recovery flows](#recovery-flows). |
560
- | `nomad adopt <name>` | Back up, then move a pre-existing `~/.claude/<name>` directory into `shared/<name>`, recreate the symlink so this host keeps working, and stage the result for push. `<name>` must already be listed in `SHARED_LINKS` or in the `sharedDirs` field of `path-map.json`; adopt is a mover, not a config editor, so it never writes `path-map.json` itself. |
561
- | `nomad adopt <name> --dry-run` | Preview the planned backup, move, and `git add` without touching the filesystem or the git index. |
562
- | `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
- | `nomad redact --rule <id>` | Limit redaction to findings of one gitleaks rule id only. |
564
- | `nomad redact --dry-run` | Show what `nomad redact` would change without writing anything. |
565
- | `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
- | `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
- | `nomad doctor --resume-cmd <id>` | Print a host-local `cd ... && claude --resume <id>` line for a session (see [Cross-OS resume](#cross-os-resume)). |
568
- | `nomad doctor --check-shared` | Read-only gitleaks preflight: stages the session transcripts a `push` would publish into a temp tree and scans them, failing (`✗`, exit 1) per affected session with rotate-and-scrub guidance. Skips with a `⚠︎` when gitleaks is not on PATH. See [Recovery flow: gitleaks FATAL on a session JSONL](#recovery-flow-gitleaks-fatal-on-a-session-jsonl). |
569
- | `nomad doctor --check-schema` | Read-only: fetches the live Claude Code settings schema and lists any `~/.claude/settings.json` key absent from it (candidates for the hand-maintained `APP_ONLY_KEYS` list). Non-fatal and offline-tolerant: skips with a `⚠︎` when curl is missing or the schema is unreachable. |
570
- | `nomad --version` | Print the installed CLI version as bare semver to stdout; exits 0. Used by the npm-publish smoke test and useful for ad-hoc upgrade checks. |
550
+ | Command | Description |
551
+ | -------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
552
+ | `nomad init` | Create a private GitHub repo via `gh`, wire it as `origin`, disable Actions, scaffold `shared/`, `hosts/`, `path-map.json`, and push. Prompts for a repo name (default: `claude-nomad-config`). `gh` must be installed and authenticated; exits with FATAL otherwise. Refuses to clobber existing scaffold. See [Privacy by default](#privacy-by-default). |
553
+ | `nomad init --repo <name>` | Non-interactive: use `<name>` as the private repo name without prompting. Useful in scripts. |
554
+ | `nomad init --snapshot` | Overlay current host's `~/.claude/` into `shared/` and write `~/.claude/settings.json` verbatim into `hosts/<NOMAD_HOST>.json`. Originals not modified. Same auto-disable behavior as `nomad init`. |
555
+ | `nomad init --keep-actions` | Skip the Actions-disable step. Combinable with `--snapshot` and `--repo`. Use when an org policy already governs Actions, or you intentionally want CI on the private repo. |
556
+ | `nomad pull` | `git pull --rebase --autostash`, apply symlinks, regenerate `settings.json`, remap session paths, and pull opted-in per-project extras. Errors out if scaffold missing. |
557
+ | `nomad pull --dry-run` | Network-aware preview: acquire lock + `git pull --rebase`, print planned changes (symlink moves, `settings.json` diff, transcript overwrites), exit without writing. |
558
+ | `nomad diff` | Offline, lockless twin of `pull --dry-run`. No network, no lock. Works against the current local repo state. |
559
+ | `nomad push` | Export local sessions and opted-in per-project extras to logical names, commit (`chore: sync from <NOMAD_HOST>`), push. |
560
+ | `nomad push --dry-run` | Run pre-push safety checks (gitleaks probe, rebase, remap preview, gitlink scan, allow-list) and a read-only gitleaks leak preview over a throwaway temp copy of the sessions and extras this host would stage; skip stage, commit, and push. Exits 1 if a leak is found in the preview. Nothing is written to the sync repo. |
561
+ | `nomad push --redact-all` | Redact all findings non-interactively (backup written first) without a TTY. Does not auto-Allow findings. After redaction re-stages and re-scans; aborts with the session-aware FATAL if any finding survives. Use this in scripts or when you are confident every finding is a real secret that should be scrubbed. See [Recovery flow: push-time interactive menu](#recovery-flow-push-time-interactive-menu). |
562
+ | `nomad drop-session <id>` | Surgically unstage every `shared/projects/*/<id>.jsonl` and the sibling `shared/projects/*/<id>/` subagent directory from the staged tree of `~/claude-nomad/`. Idempotent; the local `~/.claude/projects/<encoded>/<id>.jsonl` and `<id>/` tree are preserved. See [Recovery flows](#recovery-flows). |
563
+ | `nomad adopt <name>` | Back up, then move a pre-existing `~/.claude/<name>` directory into `shared/<name>`, recreate the symlink so this host keeps working, and stage the result for push. `<name>` must already be listed in `SHARED_LINKS` or in the `sharedDirs` field of `path-map.json`; adopt is a mover, not a config editor, so it never writes `path-map.json` itself. |
564
+ | `nomad adopt <name> --dry-run` | Preview the planned backup, move, and `git add` without touching the filesystem or the git index. |
565
+ | `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). |
566
+ | `nomad redact --rule <id>` | Limit redaction to findings of one gitleaks rule id only. |
567
+ | `nomad redact --dry-run` | Show what `nomad redact` would change without writing anything. |
568
+ | `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). |
569
+ | `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). |
570
+ | `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 a set of `⚠︎`-only checks: gitleaks version drift; on a private GitHub mirror, re-enabled Actions; optional-dependency presence (`gh` and the curl-or-wget HTTP fetcher); a backups-cache size/count nudge toward `nomad clean --backups`; an ESM/CommonJS hook-scope mismatch; and a Node-engine floor check. |
571
+ | `nomad doctor --resume-cmd <id>` | Print a host-local `cd ... && claude --resume <id>` line for a session (see [Cross-OS resume](#cross-os-resume)). |
572
+ | `nomad doctor --check-shared` | Read-only gitleaks preflight: stages the session transcripts a `push` would publish into a temp tree and scans them, failing (`✗`, exit 1) per affected session with rotate-and-scrub guidance. Skips with a `⚠︎` when gitleaks is not on PATH. See [Recovery flow: gitleaks FATAL on a session JSONL](#recovery-flow-gitleaks-fatal-on-a-session-jsonl). |
573
+ | `nomad doctor --check-schema` | Read-only: fetches the live Claude Code settings schema and lists any `~/.claude/settings.json` key absent from it (candidates for the hand-maintained `APP_ONLY_KEYS` list). Non-fatal and offline-tolerant: skips with a `⚠︎` when neither curl nor wget is available or the schema is unreachable. |
574
+ | `nomad --version` | Print the installed CLI version as bare semver to stdout; exits 0. Used by the npm-publish smoke test and useful for ad-hoc upgrade checks. |
571
575
 
572
576
  The version-check emits ``⚠︎ claude-nomad: <local> -> <latest> (run `nomad update`)`` when the local
573
577
  install is behind the latest upstream release, and `✓ claude-nomad: <local> (latest)` when current.
@@ -670,6 +674,35 @@ unchanged.
670
674
 
671
675
  ## Recovery flows
672
676
 
677
+ ### Pruning old backups
678
+
679
+ Every `nomad pull` and `nomad push` keeps you safe by copying any file it is about to overwrite into
680
+ a timestamped snapshot under `~/.cache/claude-nomad/backup/<ts>/`. That is what makes an unexpected
681
+ overwrite recoverable, but the snapshots are never deleted automatically, so over many syncs the
682
+ folder slowly grows. It lives in your local cache and is never synced to the shared repo, so
683
+ cleaning it up is purely local disk housekeeping.
684
+
685
+ `nomad clean --backups` prunes those snapshots. **Always run it with `--dry-run` first** so you can
686
+ see exactly which snapshots it would delete before anything is removed:
687
+
688
+ ```bash
689
+ $ nomad clean --backups --dry-run # list what would be deleted, remove nothing
690
+ $ nomad clean --backups # delete snapshots older than 14 days (the default)
691
+ ```
692
+
693
+ You choose what counts as "old" in one of two ways (you cannot use both at once):
694
+
695
+ - `--older-than <duration>` deletes snapshots older than the given age. The duration is a number
696
+ plus a unit: `d` for days, `h` for hours, `m` for minutes (for example `7d`, `24h`, `30m`). With
697
+ no retention flag at all, the default is `--older-than 14d`.
698
+ - `--keep <N>` keeps the `N` most recent snapshots and deletes the rest, regardless of age.
699
+
700
+ `nomad clean` only ever touches the timestamped snapshot directories directly inside the backup
701
+ folder; it never follows symlinks out of it and never removes the backup folder itself. As a gentle
702
+ reminder, `nomad doctor` shows a `⚠︎` warning when the backup folder grows past roughly 20 snapshots
703
+ or 200 MB, nudging you to run `nomad clean --backups`. That warning is informational only and never
704
+ changes the doctor exit code.
705
+
673
706
  ### `nomad drop-session <id>`
674
707
 
675
708
  Surgically unstages every `shared/projects/*/<id>.jsonl` plus the sibling `shared/projects/*/<id>/`