# How the Install Command Automatically Detects and Configures 11 Supported Agents in Codebase-Memory-MCP

> Learn how the install command in codebase-memory-mcp automatically detects your platform and configures 11 coding agents, simplifying your setup process.

- Repository: [Martin Vogel/codebase-memory-mcp](https://github.com/DeusData/codebase-memory-mcp)
- Tags: how-to-guide
- Published: 2026-07-07

---

**The [`install.sh`](https://github.com/DeusData/codebase-memory-mcp/blob/main/install.sh) script detects your platform using native `uname` commands and automatically configures all 11 supported coding agents by executing the binary with the `install -y` sub-command.**

The DeusData/codebase-memory-mcp repository provides a deterministic Bash installer that handles both platform detection and agent initialization without manual intervention. By analyzing the [`install.sh`](https://github.com/DeusData/codebase-memory-mcp/blob/main/install.sh) source code, you can see exactly how the script identifies your operating system and architecture, then proceeds to register the default coding agents ready for immediate use.

## Platform Detection in install.sh

The installer performs reliable platform detection through two dedicated functions defined in [`install.sh`](https://github.com/DeusData/codebase-memory-mcp/blob/main/install.sh), storing results in the `OS` and `ARCH` variables (lines 83-84) used to construct the download URL.

### Operating System Detection

The **`detect_os`** function (lines 57-64) examines the output of `uname -s` to identify the host platform. It maps `Darwin` to `darwin`, `Linux` to `linux`, and Windows shells (`MINGW*`, `MSYS*`, `CYGWIN*`) to `windows`. If the system returns an unsupported value, the script aborts immediately to prevent installing incompatible binaries.

### Architecture Detection with Rosetta Handling

The **`detect_arch`** function (lines 66-80) processes `uname -m` to determine CPU architecture with special handling for Apple Silicon. It translates `arm64` or `aarch64` directly to `arm64`. For `x86_64` or `amd64`, the function performs a Rosetta check: if the host is macOS and the CPU brand string contains "Apple", it returns `arm64` instead, ensuring the correct binary is selected even when the shell reports `x86_64` under Rosetta emulation.

## Automatic Agent Configuration

After downloading, verifying, and installing the binary to the destination directory (default `$HOME/.local/bin`), the script optionally configures the 11 supported coding agents.

### The `--skip-config` Option

Users can bypass automatic agent configuration by passing the **`--skip-config`** flag (lines 32-38 and 92-94). When detected, the script sets `SKIP_CONFIG=true` and skips the agent setup block entirely, allowing for manual configuration later.

### Invoking the Agent Installer

Unless skipped, the script executes `"$DEST" install -y` (lines 96-100), where `$DEST` points to the installed `codebase-memory-mcp` binary. This sub-command invokes the internal agent-setup logic that discovers, registers, and initializes the default coding agents—including LSP and analysis workers. The `-y` flag ensures non-interactive operation. If this step fails, error handling (lines 101-103) prints a non-fatal message and instructs users to manually run `codebase-memory-mcp install` to complete the setup.

## Installation Examples

Below are practical commands demonstrating platform detection and the 11-agent configuration process.

Standard installation with automatic detection and agent configuration:

```bash
curl -fsSL https://raw.githubusercontent.com/DeusData/codebase-memory-mcp/main/install.sh | bash

```

Installation without automatic agent configuration:

```bash
curl -fsSL https://raw.githubusercontent.com/DeusData/codebase-memory-mcp/main/install.sh | bash -s -- --skip-config

```

Custom installation directory with agent setup:

```bash
curl -fsSL https://raw.githubusercontent.com/DeusData/codebase-memory-mcp/main/install.sh | bash -s -- --dir=/opt/cbm

```

## Summary

- The [`install.sh`](https://github.com/DeusData/codebase-memory-mcp/blob/main/install.sh) script uses **`detect_os`** (lines 57-64) and **`detect_arch`** (lines 66-80) to determine platform via `uname` commands.
- Architecture detection includes Rosetta-aware logic for Apple Silicon Macs running under x86_64 emulation.
- The script constructs download URLs from the `OS` and `ARCH` variables (lines 83-84) to fetch the correct binary archive.
- Automatic configuration of the 11 supported agents runs `codebase-memory-mcp install -y` (lines 96-100) unless `--skip-config` is specified.
- Error handling (lines 101-103) provides manual retry instructions if the agent setup fails.

## Frequently Asked Questions

### How does the installer handle Apple Silicon Macs running under Rosetta?

The `detect_arch` function in [`install.sh`](https://github.com/DeusData/codebase-memory-mcp/blob/main/install.sh) (lines 66-80) checks if the host is macOS and whether the CPU brand string contains "Apple". If so, it returns `arm64` regardless of whether `uname -m` reports `x86_64`, ensuring the correct ARM64 binary is downloaded for native Apple Silicon performance.

### Can I install the binary without setting up the 11 supported agents?

Yes. Passing the `--skip-config` flag to the installer sets `SKIP_CONFIG=true` (lines 32-38) and bypasses the `"$DEST" install -y` command (lines 96-100), allowing you to configure the 11 coding agents later using `codebase-memory-mcp install`.

### What happens if the automatic agent configuration fails?

The script catches installation failures in a dedicated error block (lines 101-103) that prints a non-fatal message and instructs you to manually run `codebase-memory-mcp install` to complete the setup without re-downloading the binary.

### Which operating systems does the install command support?

The `detect_os` function (lines 57-64) supports macOS (`Darwin`), Linux (`Linux`), and Windows environments (`MINGW*`, `MSYS*`, `CYGWIN*`), mapping them to `darwin`, `linux`, and `windows` respectively to select the appropriate release asset.