Skip to content

feat: Windows setup via cargo/npm + squeez update fixes#22

Merged
claudioemmanuel merged 1 commit intoclaudioemmanuel:mainfrom
jhonatanjunio:main
Apr 7, 2026
Merged

feat: Windows setup via cargo/npm + squeez update fixes#22
claudioemmanuel merged 1 commit intoclaudioemmanuel:mainfrom
jhonatanjunio:main

Conversation

@jhonatanjunio
Copy link
Copy Markdown
Contributor

@jhonatanjunio jhonatanjunio commented Apr 7, 2026

Closes #23

Summary

  • Hooks PATH fallback: all 6 hooks fall back to command -v squeez when ~/.claude/squeez/bin/squeez not found — fixes silent no-op after cargo install squeez or npm i -g squeez
  • install.sh --setup-only: new flag that skips binary download/checksum, finds squeez in PATH, copies to hooks dir, then proceeds with hook registration and settings.json
  • New squeez setup command: post-install setup for cargo/npm users — creates dirs, copies self binary to ~/.claude/squeez/bin/, downloads hooks from GitHub, registers settings.json
  • squeez update Windows fix: install_atomic now detects self vs non-self update; non-self (running from cargo, updating hooks copy) → direct rename; self-update → rename dance (old→.bak, new→exe); fallback leaves .new with instructions
  • squeez update + settings.json: re-registers hooks after every successful update

Test plan

  • cargo test — 155/155 passing
  • bash bench/run.sh — not applicable (no changes to compression logic)
  • squeez setup --help — correct output
  • squeez update --check — works
  • install.sh --setup-only — finds cargo binary, copies to hooks dir
  • Hook PATH fallback — finds squeez via command -v when canonical path absent
  • session-start.sh — banner + persona ultra active

Checklist

  • Issue is linked above
  • CI is green
  • No Co-Authored-By: trailers in commit messages

- All 6 hooks: fallback to command -v squeez when ~/.claude/squeez/bin/squeez
  not found (fixes silent no-op after cargo/npm install)
- install.sh: add --setup-only flag — skips binary download, copies existing
  squeez from PATH to hooks dir, then registers settings.json normally
- New command: squeez setup — post-install setup for cargo/npm users; creates
  dirs, copies self binary to canonical location, downloads hooks, registers
  settings.json via Python (same logic as install.sh)
- squeez update: fix Windows install_atomic — detects self vs non-self update;
  non-self (cargo→hooks copy) uses direct rename (no lock); self-update uses
  rename dance (old→.bak, new→exe); fallback leaves .new w/ instructions
- squeez update: re-registers settings.json after successful binary install
@claudioemmanuel claudioemmanuel merged commit ea9fe66 into claudioemmanuel:main Apr 7, 2026
3 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Windows: cargo/npm install leaves hooks non-functional + squeez update incomplete

2 participants