# How Multi-Platform Installation Works for Understand Anything

> Automate multi-platform installation for Understand Anything with a single install.sh script. Detect your environment, create directories, and compile the core package effortlessly.

- Repository: [Egonex/Understand-Anything](https://github.com/Egonex-AI/Understand-Anything)
- Tags: how-to-guide
- Published: 2026-06-27

---

**Understand Anything automates multi-platform installation through a single [`install.sh`](https://github.com/Egonex-AI/Understand-Anything/blob/main/install.sh) script that detects your AI assistant environment, creates platform-specific plugin directories, and compiles the core package from source.**

The [Egonex-AI/Understand-Anything](https://github.com/Egonex-AI/Understand-Anything) repository provides a unified multi-platform installation system supporting Claude Code, Codex, OpenCode, Gemini CLI, and dozens of other AI platforms through a single installer script. This guide examines the three-stage pipeline defined in the source code, from automatic platform detection to the final build step.

## Platform Detection and Selection Logic

The multi-platform installation process begins at the top of [`install.sh`](https://github.com/Egonex-AI/Understand-Anything/blob/main/install.sh) with **automatic platform detection**. When executed without arguments, the script scans the system environment for known platform binaries such as `claude`, `codex`, or `opencode`.

Users can override auto-detection by passing a specific platform identifier. Running `install.sh <platform>` forces the installer to target that assistant exclusively, skipping the binary scan and proceeding immediately to the configuration phase.

## Cross-Platform Directory Structure and Symlink Creation

Once the target platform is identified, the script creates the appropriate **plugin directory structure** and establishes links to the checked-out source. According to the localized documentation in `README.zh‑TW.md`, target directories include:

- `~/.claude-plugin/understand-anything/` for Claude Code
- `~/.cursor-plugin/understand-anything/` for Cursor
- `~/.copilot-plugin/understand-anything/` for GitHub Copilot

The installer prioritizes **symbolic links** when the filesystem supports them, falling back to physical copies for environments where symlinks are unreliable. This abstraction ensures the same [`install.sh`](https://github.com/Egonex-AI/Understand-Anything/blob/main/install.sh) works consistently across Linux, macOS, and Windows without manual platform-specific adjustments.

## Post-Installation Build Process

After establishing directory links, the script executes the **build pipeline** inside the plugin root. These commands are referenced in the skill documentation and handle dependency resolution and compilation:

```bash
cd "$PLUGIN_ROOT" && (pnpm install --frozen-lockfile 2>/dev/null || pnpm install) && pnpm --filter @understand-anything/core build

```

This sequence first attempts a frozen lockfile installation for reproducible builds, falling back to a standard install if the lockfile is incompatible. It then compiles the `@understand-anything/core` package to generate the JavaScript and WASM artifacts required by the host platform.

## Supported Platforms and Plugin Registries

The architecture specification in [`docs/superpowers/specs/2026-03-18-multi-platform-simple-design.md`](https://github.com/Egonex-AI/Understand-Anything/blob/main/docs/superpowers/specs/2026-03-18-multi-platform-simple-design.md) defines support for Claude Code, Codex, OpenCode, OpenClaw, Antigravity, Gemini CLI, Pi Agent, Vibe CLI, Hermes, Cline, KIMI CLI, Nanobot, and Kiro CLI/IDE.

Each platform uses a specific plugin descriptor located in subdirectories such as [`understand-anything-plugin/.claude-plugin/plugin.json`](https://github.com/Egonex-AI/Understand-Anything/blob/main/understand-anything-plugin/.claude-plugin/plugin.json) for Claude Code or [`understand-anything-plugin/.cursor-plugin/plugin.json`](https://github.com/Egonex-AI/Understand-Anything/blob/main/understand-anything-plugin/.cursor-plugin/plugin.json) for Cursor. The installer references these JSON descriptors when registering the plugin with the host assistant.

## Architecture and Implementation Documentation

The multi-platform design philosophy is documented in [`docs/superpowers/specs/2026-03-18-multi-platform-simple-design.md`](https://github.com/Egonex-AI/Understand-Anything/blob/main/docs/superpowers/specs/2026-03-18-multi-platform-simple-design.md), which outlines the three-step workflow and the use of an "AI-driven" [`INSTALL.md`](https://github.com/Egonex-AI/Understand-Anything/blob/main/INSTALL.md) file read by the installer. Concrete implementation steps—including symlink handling, platform-specific registry files, and README updates—are detailed in [`docs/superpowers/plans/2026-03-18-multi-platform-simple-implementation.md`](https://github.com/Egonex-AI/Understand-Anything/blob/main/docs/superpowers/plans/2026-03-18-multi-platform-simple-implementation.md).

## Quick Installation Examples

Install for a specific platform using a one-liner:

```bash
curl -fsSL https://raw.githubusercontent.com/Egonex-AI/Understand-Anything/main/install.sh | bash -s opencode

```

Enable automatic platform detection:

```bash
curl -fsSL https://raw.githubusercontent.com/Egonex-AI/Understand-Anything/main/install.sh | bash

```

Update an existing installation:

```bash
./install.sh --update

```

Remove a platform's plugin links:

```bash
./install.sh --uninstall opencode

```

For local development after cloning the repository:

```bash
pnpm install && pnpm --filter @understand-anything/core build

```

## Summary

- **Single script architecture**: The [`install.sh`](https://github.com/Egonex-AI/Understand-Anything/blob/main/install.sh) script at the repository root handles all platform-specific logic through a unified three-stage pipeline.
- **Automatic detection**: The installer scans for platform binaries like `claude`, `codex`, or `opencode` when run without arguments, or accepts a forced platform parameter.
- **Flexible linking**: Creates symlinks (or copies) to platform-specific directories such as `~/.claude-plugin/understand-anything/` based on the target assistant.
- **Integrated build**: Executes `pnpm install` and builds `@understand-anything/core` to prepare JavaScript and WASM artifacts for the host environment.
- **Documented design**: Architecture specifications in `docs/superpowers/specs/` define the multi-platform workflow and implementation roadmap.

## Frequently Asked Questions

### How does the installer detect which AI platform to use?

The script scans the system PATH for known platform binaries such as `claude`, `codex`, or `opencode` when executed without arguments. If multiple platforms are present, the logic defined at the top of [`install.sh`](https://github.com/Egonex-AI/Understand-Anything/blob/main/install.sh) determines the priority, or users can bypass detection by passing the platform name as an argument.

### What if my system doesn't support symbolic links?

The installer automatically detects filesystem limitations and falls back to physical file copies when symlinks are unavailable or unreliable. This ensures compatibility across Windows, macOS, and Linux environments without manual intervention.

### How do I update an existing installation to the latest version?

Run `./install.sh --update` from the repository root to refresh the plugin links and rebuild the core package. This command re-executes the post-installation steps including dependency installation and compilation.

### Which AI assistant platforms are officially supported?

According to the design specifications, the installer supports Claude Code, Codex, OpenCode, OpenClaw, Antigravity, Gemini CLI, Pi Agent, Vibe CLI, Hermes, Cline, KIMI CLI, Nanobot, Kiro CLI/IDE, Cursor, and GitHub Copilot, with each receiving dedicated plugin descriptors in subdirectories like `understand-anything-plugin/.claude-plugin/`.