> ## Documentation Index
> Fetch the complete documentation index at: https://docs.codemachine.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Advanced Setup

> System requirements, development setup, and building CodeMachine from source.

## System Requirements

### For Users (Binary Installation)

The CodeMachine binary bundles the Bun runtime, so no additional tooling is required.

| Requirement   | Details                                                            |
| ------------- | ------------------------------------------------------------------ |
| **OS**        | Linux (x64, arm64), macOS (x64, arm64), Windows (x64)              |
| **RAM**       | 4GB minimum, 8GB+ recommended for parallel agents                  |
| **Disk**      | 100MB for binary + space for logs                                  |
| **AI Engine** | At least one supported engine installed (Claude Code, Codex, etc.) |

### For Developers (Building from Source)

| Requirement | Version                  |
| ----------- | ------------------------ |
| **Bun**     | >= 1.3.3                 |
| **Node.js** | >= 20.10.0 (for tooling) |
| **Git**     | Latest                   |

***

## Resource Scaling Guide

Running multiple parallel agents requires additional system resources. Use this table to plan your infrastructure:

| Workload              | RAM     | CPU      | Notes                |
| --------------------- | ------- | -------- | -------------------- |
| Single agent          | 2 GB    | 1 core   | Light tasks          |
| 5 parallel agents     | 4 GB    | 2 cores  | Small workflows      |
| 10-20 parallel agents | 8-16 GB | 4+ cores | Production workflows |
| 20+ parallel agents   | 32 GB+  | 8+ cores | Heavy swarms         |

<Note>
  These requirements are for running multiple AI engine processes simultaneously, not for build tooling.
</Note>

***

## Building from Source

<Steps>
  <Step title="Clone the Repository">
    ```bash theme={null}
    git clone https://github.com/moazbuilds/CodeMachine-CLI.git
    cd CodeMachine-CLI
    ```
  </Step>

  <Step title="Install Dependencies">
    ```bash theme={null}
    bun install
    ```
  </Step>

  <Step title="Run in Development Mode">
    ```bash theme={null}
    bun dev
    ```
  </Step>

  <Step title="Build for Production">
    ```bash theme={null}
    bun run build
    ```
  </Step>
</Steps>

<Accordion title="Optional: Link bun globally" icon="link" defaultOpen={true}>
  To use `cm` as a global command while developing, link the package:

  ```bash theme={null}
  bun link
  ```

  Now you can run `cm` from anywhere on your system. To unlink:

  ```bash theme={null}
  bun unlink codemachine
  ```
</Accordion>

***

## Manual Installation

If you prefer not to use a package manager, you can download the binary directly from the [GitHub Releases](https://github.com/moazbuilds/CodeMachine-CLI/releases) page.

<Tabs>
  <Tab title="Linux/macOS">
    ```bash theme={null}
    # Download the binary for your platform
    curl -fsSL https://github.com/moazbuilds/CodeMachine-CLI/releases/latest/download/codemachine-linux-x64 -o codemachine

    # Make it executable
    chmod +x codemachine

    # Move to your PATH
    sudo mv codemachine /usr/local/bin/

    # Create cm alias
    sudo ln -s /usr/local/bin/codemachine /usr/local/bin/cm
    ```
  </Tab>

  <Tab title="Windows">
    Download `codemachine-win-x64.exe` from the releases page and add it to your system PATH.
  </Tab>
</Tabs>

***

## Manual Update

<Tabs>
  <Tab title="npm">
    ```bash theme={null}
    npm i -g codemachine@latest
    ```
  </Tab>

  <Tab title="bun">
    ```bash theme={null}
    bun add -g codemachine@latest
    ```
  </Tab>
</Tabs>

***

## Uninstallation

<Tabs>
  <Tab title="npm">
    ```bash theme={null}
    npm uninstall -g codemachine
    ```
  </Tab>

  <Tab title="bun">
    ```bash theme={null}
    bun remove -g codemachine
    ```
  </Tab>

  <Tab title="Manual">
    ```bash theme={null}
    sudo rm /usr/local/bin/codemachine /usr/local/bin/cm
    ```
  </Tab>
</Tabs>

<Tip>
  Configuration files are stored in `~/.codemachine/`. Remove this directory to completely clean up. Also remove `./.codemachine` in your project to delete runtime data and reset CodeMachine.
</Tip>
