# ProjectMind desktop agent (Node.js (cross-platform))

Version: 0.2.5

Requires **Node.js 22.13+** (cross-platform; matches `@cursor/sdk`). Supports the `cursor_sdk` runner after `npm install`.

## How to run (Node.js)

1. Unzip this archive into a folder.
2. Edit the included `.env` (sample values + production app URL already filled in):
   - `IMEMORY_API_KEY` — project API key from ProjectMind → Settings → API keys
   - `IMEMORY_MCP_URL` — already set to `https://projectm.dev/api/mcp` (use `http://localhost:8080/api/mcp` for local)
   - `IMEMORY_WORKSPACE_ALLOWLIST` — comma-separated absolute paths the agent may use
3. In a terminal in this folder:

```
npm install
npm start
```

**Important:** use `npm start` (not bare `npm run`). Bare `npm run` only lists scripts and does not start the agent.

On macOS you can also double-click `start.command` after editing `.env`.

Optional: set `CURSOR_API_KEY` in `.env` to use the Cursor SDK runner (`cursor_sdk` / `auto`).

The agent heartbeats to ProjectMind and polls for jobs. Stop with Ctrl+C.

When ProjectMind publishes a newer agent under `/downloads/agent/`, this install checks the online manifest and auto-updates (preserves `.env`, then restarts). Disable with `IMEMORY_AGENT_AUTO_UPDATE=0`.

## Notes

- Prefer this build when you already have Node.js and want `cursor_sdk`.
- Native macOS / Windows / Ubuntu zips do not require Node.js (CLI runners only).
- Put `.env` next to `projectmind-agent.cjs` or in the current working directory.
- `npm install` may show engine warnings if Node is older than 22.13 — upgrade Node, then reinstall.
