**Motivations:** - Seed AnythingLLM workspace from cloned repo using gitignore-style filters **Root causes:** - N/A **Correctifs:** - N/A **Evolutions:** - Template 4nkaiignore.default; server copies after clone; extension uploads via POST /api/v1/document/upload - New commands /workspace-sync; settings initialSync*; dependency ignore **Pages affectées:** - extensions/anythingllm-workspaces/* - services/repos-devtools-server/* - docs/features/initial-rag-sync-4nkaiignore.md
repos-devtools-server
Local HTTP API on 127.0.0.1 for git operations under REPOS_DEVTOOLS_ROOT (default /home/ncantu/code).
After a successful POST /repos-clone, if the new repo has no .4nkaiignore, the server copies templates/4nkaiignore.default into the repository root. The response includes fourNkAiIgnoreTemplateWrote: boolean.
Environment
| Variable | Required | Description |
|---|---|---|
REPOS_DEVTOOLS_TOKEN |
yes | Authorization: Bearer <token> on every request. |
REPOS_DEVTOOLS_ROOT |
no | Clone root (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>", "branch": "test" }(branchoptional).GET /repos-listPOST /repos-load— JSON{ "name": "<folder>" }
Run
npm install
npm run build
export REPOS_DEVTOOLS_TOKEN='…'
npm start
After upgrading, reload systemd if used: systemctl --user daemon-reload && systemctl --user restart repos-devtools-server.service.
Templates
Keep templates/4nkaiignore.default aligned with extensions/anythingllm-workspaces/templates/4nkaiignore.default in the monorepo when you change defaults.