feat: curl installer + uninstaller + CI smoke tests: https://github.com/riboseinc/claude-memory-files/issues/1 - #11
Merged
Conversation
Implements ticket #1 (#1); PR 7 of the delivery sequence. Lands the v1 installer pair plus CI integration for it: - tools/install.sh: POSIX-ish bash, depends on curl + awk + jq + shasum. Fetches a file from raw.githubusercontent.com (or --repo-root <dir> for local checkouts and CI), parses YAML frontmatter, and applies per-type install behaviour: instruction → ~/.claude/instructions/<name>.md + @-include in CLAUDE.md under <!-- managed block --> markers memory-* → ~/.claude/memory/<name>.md settings-fragment → deep-merge JSON block into ~/.claude/settings.json (allowlisted top-level keys only; dedupes permissions.{allow,deny,ask} arrays; backs up before write) project-claude-md → <project>/CLAUDE.md (frontmatter stripped; requires --project <dir>) path-rule → ~/.claude/rules/<name>.md (or <project>/.claude/rules/<name>.md with --project) hook → rejected with pointer to SAFETY.md Records the install in ~/.claude/.memory-files-manifest.json with all fields PR 9's --update mode will need (installed-hash, upstream-ref, forked, merged-fragment for settings-fragments, history) written up front so PR 9 needs only read logic, not a manifest migration. - tools/uninstall.sh: reads the manifest entry by slug, reverses the install per type. For settings-fragments, subtracts the recorded merged-fragment from settings.json so hand-curated entries the user added themselves survive un-merge. - tools/test-install.sh: end-to-end smoke test exercising one file per type in a sandbox CLAUDE_DIR with --repo-root pointing at the local checkout. Validates the manifest schema (all PR-9 fields populated), the hand-curated-entry preservation case for settings-fragments, and the clean state after all uninstalls. - .github/workflows/validate.yml extension: shellcheck on the three shell scripts + runs tools/test-install.sh on every PR. Same workflow that already gates content; no new file. Bundled into PR 7 in response to the maintainer's concern that smoke tests should run in CI rather than depending on manual execution per PR. Locally verified: install + uninstall round-trip works for all 5 types against the current main; the hand-added Bash(rg:*) entry survives a settings-fragment uninstall while the manifest-recorded entries are removed cleanly. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements ticket #1; PR 7 of the delivery sequence.
Lands the v1 installer pair plus CI integration for it.
What this adds
tools/install.sh— POSIX-ish bash; depscurl + awk + jq + shasum. Per-type install behaviour for all 5 active types (rejectshookwith a pointer toSAFETY.md). Settings-fragment deep-merge backs upsettings.jsonfirst, dedupespermissions.{allow,deny,ask}arrays, and refuses extraneous top-level keys.tools/uninstall.sh— reads the manifest, reverses each type. For settings-fragments, subtracts the recordedmerged-fragmentso hand-curated entries survive.tools/test-install.sh— sandbox smoke test against--repo-root .. Asserts manifest schema, hand-curated-entry preservation, and clean-state after uninstall..github/workflows/validate.yml— addsshellcheck+ smoke test. Runs on every PR.Manifest schema
Every entry has all PR-9 fields written up front so PR 9's
--updateis read-only (no migration):{ "type": "instruction", "installed-at": "2026-...", "installed-hash": "sha256:...", "upstream-ref": "<commit-sha>", "source-path": "instructions/foo.md", "local-path": "/absolute/local/path.md", "forked": false, "merged-fragment": null, "history": [{ "event": "install", "ref": "...", "at": "..." }] }forked: trueis set forscope: personal-shareinstalls;merged-fragmentis populated forsettings-fragmentinstalls (used by uninstall to subtract precisely).CI integration (responding to your earlier concern)
Added to the existing
validate.ymlworkflow:shellcheckagainstinstall.sh,uninstall.sh,test-install.sh.bash tools/test-install.shruns end-to-end install/uninstall in a tempCLAUDE_DIR. Reads from--repo-root .so the test exercises the PR's exact content, not whatever's onmain.Locally verified the full smoke test passes (see commit message for details).
Curl one-liner UX
curl -fsSL https://raw.githubusercontent.com/riboseinc/claude-memory-files/main/tools/install.sh \ | bash -s -- instructions/github-pr-title-issue-link.mdProject-CLAUDE.md needs
--project:🤖 Generated with Claude Code