# What Is bootstrap-reverse.sh? Understanding the Reverse-Skill Linux Bootstrapper

> Discover bootstrap-reverse.sh, the Linux and macOS bootstrapper for reverse-skill. Automate the installation of reverse-engineering tools, libraries, and MCP servers effortlessly.

- Repository: [ZhaoXu/reverse-skill](https://github.com/zhaoxuya520/reverse-skill)
- Tags: deep-dive
- Published: 2026-08-20

---

**The [`bootstrap-reverse.sh`](https://github.com/zhaoxuya520/reverse-skill/blob/main/bootstrap-reverse.sh) script is the primary Linux and macOS bootstrapper for the reverse‑skill repository, automating the installation of reverse‑engineering tools, libraries, and MCP servers.**

This shell script serves as the Unix counterpart to `bootstrap-reverse.ps1`, providing a unified entry point for setting up a complete reverse‑engineering development environment. According to the zhaoxuya520/reverse‑skill source code, it handles everything from platform detection to service orchestration through a declarative capability system.

## Core Purpose and Architecture

The script's fundamental role is to **translate human‑readable capability names into fully configured tooling**. Rather than manually installing IDA Pro scripts, Frida bindings, or MCP servers, users declare what they need and the bootstrapper handles the rest.

At [`skills/scripts/bootstrap-reverse.sh`](https://github.com/zhaoxuya520/reverse-skill/blob/main/skills/scripts/bootstrap-reverse.sh) lines 13‑15, the script defines its invocation pattern:

```bash
bash skills/scripts/bootstrap-reverse.sh <capability…> [options]

```

Key architectural components include:

- **Platform detection** (lines 34‑39): Identifies `Darwin` for macOS or `Linux` for Linux, with fallback to *unknown*
- **Tool root management** (lines 21‑28): Uses `REVERSE_SKILL_TOOLS_DIR` (defaulting to `$HOME/tools`) as the canonical install location with path validation
- **Capability expansion** (lines 83‑105): Automatically resolves dependencies—for example, requesting `idapro` expands to include `idalib-mcp` dependencies

## Installation Methods and Package Managers

The bootstrapper abstracts multiple installation channels through dedicated helper functions. As implemented in the reverse‑skill codebase, it can:

```bash

# Install from system package managers

apt install <package>      # Debian/Ubuntu

brew install <formula>     # macOS

# Install from language-specific tools

pipx install <tool>
npm install -g <package>
pnpm add -g <package>
go install <tool>@latest

# Install from GitHub releases with asset pattern matching

install_github_release <owner/repo> <asset_regex> <version>

```

The GitHub release installer (lines 70‑78 and 100‑108) downloads platform‑appropriate binaries, extracts them to `REVERSE_SKILL_TOOLS_DIR`, and sets executable permissions.

## MCP Server Registration and Service Management

Two flags control advanced behavior for AI assistant integration:

| Flag | Purpose | Source Lines |
|------|---------|--------------|
| `--mcp-host=claude` | Registers MCP servers for Claude Desktop | 79‑98 |
| `--mcp-host=codex` | Registers MCP servers for OpenAI Codex | 79‑98 |
| `--mcp-host=both` | Registers for both clients simultaneously | 79‑98 |
| `--start-services` | Launches background services and verifies HTTP endpoints | 158‑176, 186‑202 |

The `write_mcp_server` function (lines 118‑130) generates JSON configuration files in the appropriate host-specific directories, enabling direct tool invocation from AI assistants.

Service startup (lines 158‑176) handles long‑running tools like `anything-analyzer` or the IDA Pro MCP bridge, including health checks against configured HTTP endpoints before marking installation complete.

## Command Examples for Common Workflows

List all supported capabilities before installation:

```bash
bash skills/scripts/bootstrap-reverse.sh --list

```

Install foundational Android reverse‑engineering tools:

```bash
bash skills/scripts/bootstrap-reverse.sh jadx apktool frida

```

Install IDA Pro with full MCP integration and service autostart:

```bash
bash skills/scripts/bootstrap-reverse.sh idapro \
    --start-services \
    --mcp-host=both

```

Skip the tool index refresh for faster scripting:

```bash
bash skills/scripts/bootstrap-reverse.sh ghidra --skip-refresh

```

## Result Reporting and Tool Index

Upon completion, the script emits structured JSON status for each capability (lines 346‑376):

- `ready`: Fully installed and operational
- `manual-required`: Requires user interaction (e.g., license activation)
- `registration-required`: MCP registration pending
- `failed`: Installation error with logged details

Unless `--skip-refresh` is specified, the bootstrapper invokes [`skills/scripts/refresh-tool-index.sh`](https://github.com/zhaoxuya520/reverse-skill/blob/main/skills/scripts/refresh-tool-index.sh) (lines 426‑440) to regenerate [`skills/tool-index.md`](https://github.com/zhaoxuya520/reverse-skill/blob/main/skills/tool-index.md), maintaining synchronized documentation of the environment state.

## Related Files in the Reverse-Skill Ecosystem

| File | Responsibility |
|------|---------------|
| [`skills/scripts/bootstrap-reverse.sh`](https://github.com/zhaoxuya520/reverse-skill/blob/main/skills/scripts/bootstrap-reverse.sh) | Main bootstrapper (this article's subject) |
| [`skills/scripts/bootstrap-manifest.json`](https://github.com/zhaoxuya520/reverse-skill/blob/main/skills/scripts/bootstrap-manifest.json) | Declarative definitions of all capabilities, versions, and dependencies |
| [`skills/scripts/refresh-tool-index.sh`](https://github.com/zhaoxuya520/reverse-skill/blob/main/skills/scripts/refresh-tool-index.sh) | Documentation synchronizer |
| [`kali/scripts/bootstrap-reverse.sh`](https://github.com/zhaoxuya520/reverse-skill/blob/main/kali/scripts/bootstrap-reverse.sh) | Kali Linux wrapper that delegates to the main script |
| [`skills/config/routing.json`](https://github.com/zhaoxuya520/reverse-skill/blob/main/skills/config/routing.json) | Determines automatic bootstrap invocation contexts |

## Summary

- **[`bootstrap-reverse.sh`](https://github.com/zhaoxuya520/reverse-skill/blob/main/bootstrap-reverse.sh)** is the canonical Linux/macOS entry point for reverse‑skill environment setup
- It **detects platform**, **expands dependencies**, and **installs via multiple package managers** or GitHub releases
- **MCP registration** enables Claude and Codex to invoke installed tools directly
- **Service management** handles background processes with health verification
- The **JSON result format** supports automation and CI/CD integration

## Frequently Asked Questions

### What is the difference between bootstrap-reverse.sh and bootstrap-reverse.ps1?

The `.sh` version targets Linux and macOS systems using Bash, while the `.ps1` version serves Windows environments using PowerShell. Both consume the same [`bootstrap-manifest.json`](https://github.com/zhaoxuya520/reverse-skill/blob/main/bootstrap-manifest.json), ensuring capability parity across platforms.

### Where does bootstrap-reverse.sh install tools by default?

Tools install to `$HOME/tools` unless overridden by the `REVERSE_SKILL_TOOLS_DIR` environment variable. The script validates this path against directory traversal attacks before use.

### Can I use bootstrap-reverse.sh without registering MCP servers?

Yes. MCP registration is entirely optional. Omit the `--mcp-host` flag and the script performs only tool installation without touching Claude or Codex configuration files.

### What happens if a service fails to start with --start-services?

The script logs the failure, marks the capability status as `failed` in the JSON output, and continues with remaining capabilities. Check the emitted status object or logs for specific endpoint verification failures.