Standalone REST API server for RepoSwarm — the backend that the UI, CLI, and agents all talk to.
- Runtime: Node.js 24+, TypeScript, Express 5
- Auth: Cognito JWT (UI) + Bearer token (CLI/M2M)
- Storage: DynamoDB (
reposwarm-cache) - Workflows: Temporal (gRPC + HTTP)
- Deploy: ECS Fargate (ARM64)
npm install
npm run dev # Development with hot reload
npm test # Run tests
npm run build # Compile TypeScript
npm start # Production| Method | Path | Auth | Description |
|---|---|---|---|
| GET | /health |
No | Health check |
| GET/POST | /repos |
Yes | List/create repos |
| GET/PUT/DELETE | /repos/:name |
Yes | CRUD single repo |
| POST | /repos/discover |
Yes | Auto-discover repos (GitHub, GitLab, CodeCommit, Azure DevOps, Bitbucket) |
| GET | /workflows |
Yes | List workflows |
| GET | /workflows/:id |
Yes | Workflow detail |
| GET | /workflows/:id/history |
Yes | Event history |
| POST | /workflows/:id/terminate |
Yes | Terminate workflow |
| POST | /investigate/single |
Yes | Start investigation |
| POST | /investigate/daily |
Yes | Start daily batch |
| GET | /wiki |
Yes | List documented repos |
| GET | /wiki/:repo |
Yes | List sections |
| GET | /wiki/:repo/:section |
Yes | Get content |
| GET/POST | /prompts |
Yes | List/create prompts |
| GET/PUT/DELETE | /prompts/:name |
Yes | CRUD prompt |
| PUT | /prompts/:name/order |
Yes | Reorder |
| PUT | /prompts/:name/toggle |
Yes | Enable/disable |
| PUT | /prompts/:name/context |
Yes | Context deps |
| GET | /prompts/:name/versions |
Yes | Version history |
| POST | /prompts/:name/rollback |
Yes | Rollback version |
| GET/PUT | /config |
Yes | Configuration |
| GET | /providers |
Yes | Providers bundle (single source of truth) |
| GET | /providers/validation |
Yes | Env var validation rules for current config |
| GET | /workers |
Yes | List connected workers |
| GET | /workers/:id |
Yes | Worker detail |
| GET | /workers/:id/env |
Yes | Worker environment variables |
| POST | /workers/:id/env/:key |
Yes | Set worker env var |
| DELETE | /workers/:id/env/:key |
Yes | Delete worker env var |
| POST | /workers/:id/inference-check |
Yes | Test LLM inference |
| GET | /services |
Yes | List service statuses |
| GET | /services/:name/logs |
Yes | Tail service logs |
| POST | /services/:name/restart |
Yes | Restart a service |
| POST | /services/:name/stop |
Yes | Stop a service |
| POST | /services/:name/upgrade |
Yes | Upgrade service (git pull + build + restart) |
Send Authorization: Bearer <token> with either:
- A valid Cognito JWT (from
us-east-1_XgaUUc0TG) - The API bearer token (from
API_BEARER_TOKENenv var)
Pre-built images are published on every push to main:
docker pull ghcr.io/reposwarm/api:latestOr build locally:
docker build -t reposwarm-api .
docker run -p 4000:4000 \
-e API_BEARER_TOKEN=your-token \
-e TEMPORAL_ADDRESS=temporal:7233 \
ghcr.io/reposwarm/api:latestMulti-arch images available: linux/amd64 and linux/arm64.
The API serves as the gateway for architecture queries powered by the askbox agent:
| Method | Path | Auth | Description |
|---|---|---|---|
| POST | /ask |
Yes | Quick Q&A about RepoSwarm usage |
| POST | /ask/arch |
Yes | Submit architecture question to askbox |
| GET | /ask/arch/:id |
Yes | Poll askbox result |
The /ask/arch endpoint runs the askbox Docker container against your arch-hub, using the Claude Agent SDK to reason across .arch.md files.
| Project | Docker Image |
|---|---|
| reposwarm (worker) | ghcr.io/reposwarm/worker:latest |
| reposwarm-api (this repo) | ghcr.io/reposwarm/api:latest |
| reposwarm-ui | ghcr.io/reposwarm/ui:latest |
| reposwarm-cli | — (binary install) |
| reposwarm-askbox | ghcr.io/reposwarm/askbox:latest |
All images are multi-arch (linux/amd64 + linux/arm64), published automatically on every push to main.
MIT