# repos-devtools-server Local HTTP API bound to **`127.0.0.1`** for git operations under **`REPOS_DEVTOOLS_ROOT`** (default `/home/ncantu/code`). ## Environment | Variable | Required | Description | |----------|----------|-------------| | `REPOS_DEVTOOLS_TOKEN` | yes | Shared secret; clients send `Authorization: Bearer `. | | `REPOS_DEVTOOLS_ROOT` | no | Absolute root for clones (default `/home/ncantu/code`). | | `REPOS_DEVTOOLS_HOST` | no | Bind address (default `127.0.0.1`). | | `REPOS_DEVTOOLS_PORT` | no | Port (default `37140`). | ## Endpoints - `POST /repos-clone` — JSON `{ "url": "", "branch": "test" }` (`branch` optional, default `test`). - `GET /repos-list` — Lists immediate subdirectories of the root that contain `.git`. - `POST /repos-load` — JSON `{ "name": "" }` — Verifies the repo exists; returns absolute `path`. All endpoints require `Authorization: Bearer `. ## Run ### One-off (foreground) ```bash cd services/repos-devtools-server npm install npm run build # Create .env (gitignored) with REPOS_DEVTOOLS_TOKEN=... and REPOS_DEVTOOLS_ROOT=/home/ncantu/code set -a && source .env && set +a && node dist/server.js ``` ### systemd (user) Copy `systemd/user/repos-devtools-server.service` to `~/.config/systemd/user/`, create `.env` beside this README, then: ```bash systemctl --user daemon-reload systemctl --user enable --now repos-devtools-server.service ``` Use the same token in the VS Code / Cursor setting **`anythingllm.reposApiToken`**. ## Integration The **AnythingLLM Workspaces** extension command **AnythingLLM: Dev tools panel** calls this API and the AnythingLLM HTTP API for workspace create/list.