Nicolas Cantu 597f18f758 Add repos-devtools-server and AnythingLLM dev tools panel (0.2.0)
**Motivations:**
- Clone or load repos under /home/ncantu/code with AnythingLLM workspace ensure/create from the editor

**Root causes:**
- N/A (new capability)

**Correctifs:**
- N/A

**Evolutions:**
- services/repos-devtools-server: POST /repos-clone, GET /repos-list, POST /repos-load (Bearer REPOS_DEVTOOLS_TOKEN)
- Extension: Webview panel, slash commands, workspaceEnsure + POST /api/v1/workspace/new
- Docs: feature note and index links

**Pages affectées:**
- services/repos-devtools-server/*
- extensions/anythingllm-workspaces/*
- docs/README.md
- docs/features/repos-devtools-server-and-dev-panel.md
- docs/features/anythingllm-vscode-extension.md
2026-03-23 21:20:32 +01:00

37 lines
1.3 KiB
Markdown

# 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 <token>`. |
| `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": "<git url>", "branch": "test" }` (`branch` optional, default `test`).
- `GET /repos-list` — Lists immediate subdirectories of the root that contain `.git`.
- `POST /repos-load` — JSON `{ "name": "<folder name>" }` — Verifies the repo exists; returns absolute `path`.
All endpoints require `Authorization: Bearer <REPOS_DEVTOOLS_TOKEN>`.
## Run
```bash
cd services/repos-devtools-server
npm install
npm run build
export REPOS_DEVTOOLS_TOKEN='generate-a-long-random-secret'
npm start
```
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.