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

# Build & Run (Development)

> Set up your local development environment and run MIRA from source.

## Prerequisites

| Tool    | Version | Install                                                        |
| ------- | ------- | -------------------------------------------------------------- |
| Node.js | 22 LTS  | [nodejs.org](https://nodejs.org) or `nvm install 22`           |
| npm     | ≥ 10    | Included with Node.js 22                                       |
| Python  | 3.11    | [python.org](https://python.org) or `brew install python@3.11` |
| Git     | any     | [git-scm.com](https://git-scm.com)                             |

<Note>
  Node.js 22 LTS is required — the project's `.nvmrc` pins this version. If you use nvm, run `nvm
      install 22 && nvm use 22` before proceeding.
</Note>

## Clone and install

```bash theme={null}
git clone https://github.com/satyendra2013/mira-app.git
cd mira-app
npm install
```

## Set up the Python environment

```bash theme={null}
# Create a virtual environment (recommended for development)
python3.11 -m venv .venv
source .venv/bin/activate       # macOS/Linux
# .venv\Scripts\activate         # Windows

# Install Python dependencies
pip install -r resources/requirements.txt
```

## Run in development mode

```bash theme={null}
npm run dev
```

This starts **electron-vite** which bundles the main process (esbuild), renderer (Vite + React with hot module replacement), and preload in a single coordinated watch. Electron launches automatically once the initial build is done. Changes to renderer code reload the UI instantly. Changes to the main process code require an app restart.

## Debugging

### Renderer process

Open DevTools: **View → Toggle Developer Tools** or ⌥⌘I. Standard Chrome DevTools with React DevTools extension support.

### Main process

In development, Electron prints its process PID to the terminal. You can attach a Node.js debugger via VS Code using the **Attach to Process** option — select the Electron main process. Alternatively, open `chrome://inspect` in a Chromium-based browser while MIRA is running in dev mode.

### Python engines

Both bridge processes (`rlm-bridge.py`, `nae-bridge.py`) write debug output to **stderr** only. In development, stderr from the child processes appears directly in the terminal that launched `npm run dev`. All stdin messages (commands) and stdout messages (responses) exchanged with the bridges are also logged via `electron-log` in the main process.

<Note>
  Edit this page — [Open a pull
  request](https://github.com/satyendra2013/mira-app/edit/main/docs/developer-guide/build-dev.mdx)
</Note>
