Skip to content

feat(install): unify per-platform installers into install.sh / install.ps1#123

Merged
Lum1104 merged 2 commits into
mainfrom
feat/unified-install-script
May 6, 2026
Merged

feat(install): unify per-platform installers into install.sh / install.ps1#123
Lum1104 merged 2 commits into
mainfrom
feat/unified-install-script

Conversation

@Lum1104
Copy link
Copy Markdown
Owner

@Lum1104 Lum1104 commented May 6, 2026

Summary

  • Replace 7 nearly-identical .<platform>/INSTALL.md files (gemini/codex/opencode/pi/openclaw/antigravity/vscode) with a single install.sh + install.ps1 at the repo root. Skills are enumerated dynamically from understand-anything-plugin/skills/ — the old hardcoded list of 6 was already stale (missing understand-domain and understand-knowledge).
  • Single shared checkout at ~/.understand-anything/repo (override via UA_DIR). Antigravity keeps its existing ~/.gemini/antigravity/skills path for backward compatibility; OpenClaw keeps its folder-symlink style. Universal ~/.understand-anything-plugin link unchanged.
  • README.md and 6 translated READMEs (READMEs/*.md) replace the per-platform "Fetch and follow instructions from .../<plat>/INSTALL.md" blocks with one curl | bash / iwr | iex one-liner. Compatibility tables updated to show install.sh codex, etc.
  • Adds __pycache__/ to .gitignore.

Usage

# Interactive prompt:
curl -fsSL https://raw.githubusercontent.com/Lum1104/Understand-Anything/main/install.sh | bash

# Or pass platform directly:
curl -fsSL https://raw.githubusercontent.com/Lum1104/Understand-Anything/main/install.sh | bash -s codex

# Update / uninstall:
./install.sh --update
./install.sh --uninstall codex

Windows: iwr -useb https://raw.githubusercontent.com/Lum1104/Understand-Anything/main/install.ps1 | iex

Test plan

  • bash -n install.sh — syntax check
  • Smoke-test against fake checkout with stubbed git, exercising all 7 platforms — verified per-skill symlinks land in ~/.agents/skills/ (gemini/codex/opencode/pi), folder symlinks land in ~/.openclaw/skills/understand-anything and ~/.gemini/antigravity/skills/understand-anything, and per-skill links land in ~/.copilot/skills/ for vscode
  • --uninstall <plat> removes the skill links and the universal plugin link, keeps the shared checkout
  • --update runs git pull --ff-only on the existing checkout
  • --help prints usage
  • Unknown platform exits non-zero with supported-list hint
  • Prompt mode without a tty fails with a friendly "pass platform as argument" message
  • grep -n 'INSTALL.md' README.md READMEs/*.md — empty (no stale links)
  • Test on a real Windows machine with install.ps1
  • Verify curl | bash works against the live main branch once this PR lands

Notes

  • This is purely an installation/docs refactor. No plugin behavior changes, so no version bumps in plugin.json files.
  • Existing users who installed via the old per-platform clone path (~/.gemini/understand-anything, etc.) are not affected — their installs keep working until they re-run the new script, which clones into ~/.understand-anything/repo instead.

🤖 Generated with Claude Code

…l.ps1

Replace 7 nearly-identical .<platform>/INSTALL.md files with one
install.sh + install.ps1 that enumerate skills dynamically from
understand-anything-plugin/skills/ — the previous hardcoded list of 6
was already stale, missing understand-domain and understand-knowledge.

Supported usage:
  install.sh <platform>            # gemini/codex/opencode/pi/openclaw/antigravity/vscode
  install.sh                       # interactive prompt; reads /dev/tty so curl|sh works
  install.sh --update              # git pull on the shared checkout
  install.sh --uninstall <plat>    # removes skill links for that platform

Single shared checkout at ~/.understand-anything/repo (override via
UA_DIR). Antigravity keeps its existing ~/.gemini/antigravity/skills
path for backward compatibility; OpenClaw keeps its folder-symlink
style. Universal ~/.understand-anything-plugin link unchanged.

README.md and the 6 translated READMEs replace the old per-platform
"Fetch and follow instructions from .../<plat>/INSTALL.md" blocks with
a single curl|sh / iwr|iex one-liner. Compatibility tables updated.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@Lum1104 Lum1104 force-pushed the feat/unified-install-script branch from 966d607 to 8956696 Compare May 6, 2026 14:53
@chatgpt-codex-connector
Copy link
Copy Markdown

💡 Codex Review

if (Test-Path $PluginLink) {
Remove-Item -Force -Recurse $PluginLink

P1 Badge Guard uninstall from deleting non-junction plugin directory

Cmd-Uninstall removes ~/.understand-anything-plugin whenever it exists, but Cmd-Install explicitly leaves a pre-existing path untouched; if that path is a normal directory (not the junction created by this installer), Remove-Item -Recurse will delete user files. This creates a destructive data-loss path for users who already had a real directory at that location, so uninstall should verify the path is the installer-managed junction/reparse point before deleting it.


if [[ ! -d "$REPO_DIR" ]]; then
printf 'No checkout found at %s — nothing to unlink.\n' "$REPO_DIR"
exit 0

P2 Badge Continue uninstall even when checkout directory is missing

The uninstall flow exits early when $REPO_DIR is absent, so it skips removing platform links and the universal plugin symlink. If a user deleted or moved the checkout first (or changed UA_DIR), --uninstall leaves stale/broken links behind instead of cleaning up the installation. Uninstall should still remove known link paths from the platform map without requiring the repo checkout to exist.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

… uninstall

- install.ps1 (P1): refuse to delete real files/directories; only remove
  paths that are actual junctions/symlinks. Closes a data-loss path where
  Cmd-Uninstall would Remove-Item -Recurse a pre-existing user directory at
  ~/.understand-anything-plugin (Cmd-Install correctly skipped touching it,
  but uninstall did not). Cmd-Uninstall and Unlink-Skills now both go
  through Remove-Reparse, which uses DirectoryInfo.Delete() so a junction's
  target is never followed.

- install.sh (P2): --uninstall no longer exits early when the checkout has
  been deleted. The per-skill unlinker falls back to scanning the target
  dir for stale symlinks pointing into the plugin tree, so users can clean
  up after manually rm -rf'ing the checkout.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@Lum1104 Lum1104 merged commit 068ef8e into main May 6, 2026
1 check passed
@Lum1104 Lum1104 deleted the feat/unified-install-script branch May 6, 2026 15:00
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