Skip to content

Cross-platform one-command install + hook fixes, tests, CI#1

Open
denfry wants to merge 4 commits into
HalalifyMusic:mainfrom
denfry:cross-platform-install
Open

Cross-platform one-command install + hook fixes, tests, CI#1
denfry wants to merge 4 commits into
HalalifyMusic:mainfrom
denfry:cross-platform-install

Conversation

@denfry

@denfry denfry commented Jun 18, 2026

Copy link
Copy Markdown

Summary

Makes fable-mode install with one command on Windows, macOS, and Linux, fixes two bugs that broke the core feature for every user, and adds the missing repo scaffolding (tests, CI, uninstaller, docs).

Motivation: install required manual steps and had no Windows support. Two show-stoppers surfaced during an audit.

What's in it (4 commits)

1. Fix hooks

  • fable-trigger.py read the playbook from a hardcoded /Users/ak/... path -> on-demand injection silently failed for everyone but the original author. Now resolves ~/.claude/FABLE_PLAYBOOK.md.
  • test-after-edit.py was a silent no-op on Windows (npm/pnpm/yarn/make shims raise FileNotFoundError). Now resolves the runner via shutil.which and runs through cmd.exe on Windows.

2. Cross-platform one-command installer

  • New install.py is the single source of truth (Python is already required by the hooks). install.sh / install.ps1 become thin wrappers that locate Python and exec it. Adds shell/fable.ps1 PowerShell launcher.
  • scripts/merge_settings.py writes the absolute interpreter (sys.executable) + hook paths into settings.json, so hooks fire without $HOME / python3 resolution at run time.

3. Repo scaffolding

  • tests/ — pytest for both hooks + the installer (hermetic, host interpreter).
  • .github/workflows/ci.yml — matrix CI: ubuntu/macos/windows x py3.9/3.12.
  • uninstall.py (+ .sh/.ps1) — surgical reversal; leaves user skills, unrelated hooks, and ~/.claude intact.
  • .gitattributes — LF for shell/Python, CRLF for PowerShell (a CRLF shebang breaks install.sh under Git Bash).
  • Unify owner to HalalifyMusic; remove a dead CONNECTORS.md link.

4. Community-health docs

  • SECURITY.md (local-execution model + private reporting), CONTRIBUTING.md, CHANGELOG.md, .editorconfig; mark entrypoints executable.

Testing

  • python -m pytest -q -> 14 passed locally.
  • install -> uninstall round-trip verified in a sandbox (bundled files removed; an unrelated user skill and an unrelated hook preserved).
  • All .py / .sh / .ps1 parse-checked; PowerShell via the language parser.
  • CI runs the suite across all three OSes on this PR.

🤖 Generated with Claude Code

denfry and others added 4 commits June 18, 2026 16:33
fable-trigger.py read the playbook from a hardcoded /Users/ak path, so the
on-demand injection silently failed for every user but the original author —
resolve it under ~/.claude instead.

test-after-edit.py invoked npm/pnpm/yarn/make directly, which raises
FileNotFoundError for the .cmd shims on Windows and made the hook a silent
no-op there; resolve the runner via shutil.which and run through cmd.exe on
Windows. Also drop a duplicate .lockb entry and refresh the settings fragment
comment.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Replace the per-OS shell logic with a single install.py (Python is already a
hard dependency, so it is the one runtime guaranteed present). install.sh and
install.ps1 become thin wrappers that locate Python and exec install.py;
shell/fable.ps1 adds a PowerShell launcher alongside the zsh one.

merge_settings.py is now an importable helper that writes the absolute
interpreter (sys.executable) and absolute hook paths into settings.json, so the
hooks fire without relying on $HOME expansion or a python3 alias at hook-run
time. README documents the one-command install for all three OSes.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- tests/: pytest coverage for both hooks (injection, effort trigger, debounce,
  skip/disable) and the installer (copy, absolute paths, idempotency, both
  launcher branches), runnable hermetically with the host interpreter.
- .github/workflows/ci.yml: matrix CI across ubuntu/macos/windows x py3.9/3.12.
- uninstall.py (+ .sh/.ps1 wrappers): surgical reversal of install.py — removes
  bundled files, strips the launcher line, drops only the Fable hooks from
  settings.json; leaves user skills, unrelated hooks, and ~/.claude intact.
- .gitattributes: force LF on shell/Python and CRLF on PowerShell so install.sh
  stays runnable on a Windows checkout (a CRLF shebang breaks Git Bash).
- Unify the owner identity to HalalifyMusic in LICENSE/README; remove a dead
  CONNECTORS.md link in the explore-data skill; ignore .pytest_cache.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- SECURITY.md: document the local-execution model (the test-after-edit hook runs
  a project's test command), how to disable it, the vendored third-party content,
  and private vulnerability reporting.
- CONTRIBUTING.md: dev setup, layout, cross-platform + stdlib-only + test rules.
- CHANGELOG.md: Keep a Changelog history (Unreleased + initial 0.1.0).
- .editorconfig: mirror .gitattributes (LF default, CRLF for PowerShell).
- README: link the three docs.
- Mark install.py / uninstall.py / uninstall.sh executable for direct ./ runs.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.

1 participant