Skip to content

reposwarm/reposwarm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

72 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ€– RepoSwarm

RepoSwarm - Multi-Repo Architecture Discovery

AI-powered multi-repo architecture discovery platform

License Python 3.12+ YouTube Demo

Quick Start β€’ What Is It β€’ How It Works β€’ Ecosystem β€’ Contributing

πŸ“¦ Previously loki-bedlam/repo-swarm. Moved to the RepoSwarm organization. Old URLs redirect automatically.


Quick Start

Install the CLI and bootstrap everything in one shot:

curl -fsSL https://raw.githubusercontent.com/reposwarm/reposwarm-cli/main/install.sh | sh

Then:

reposwarm new --local             # Bootstrap everything: Temporal, API, Worker, UI
reposwarm doctor                  # Full health check
reposwarm repos add my-app --url https://github.com/org/my-app
reposwarm investigate my-app      # Run your first investigation
reposwarm dashboard               # Watch it work

That's it. The CLI handles setup, configuration, investigation, diagnostics, and results β€” all from a single binary.

Prerequisites

  • Docker must be running (not just installed) β€” all services run as containers
  • Git β€” for cloning repositories during investigation

Bedrock Users

If using Amazon Bedrock, the worker needs these env vars (set automatically by the CLI):

  • CLAUDE_CODE_USE_BEDROCK=1
  • AWS_REGION=us-east-1 (or your region)
  • ANTHROPIC_MODEL=us.anthropic.claude-sonnet-4-20250514-v1:0 (or your preferred model)

Auth options: IAM role (recommended), access keys, AWS profile, or Bedrock API keys. See CLI docs for setup.

πŸ‘‰ Full CLI docs: reposwarm-cli


What is RepoSwarm?

RepoSwarm automatically analyzes your entire codebase portfolio and generates standardized architecture documentation. Point it at your GitHub repos (or CodeCommit, GitLab, Azure DevOps, Bitbucket) and get back clean, structured .arch.md files β€” perfect as AI agent context, onboarding docs, or architecture reviews.

RepoSwarm Agents

✨ Key Features

  • πŸ” AI-Powered Analysis β€” Uses Claude to deeply understand codebases
  • πŸ“ Standardized Output β€” Generates consistent .arch.md architecture files
  • πŸ”„ Incremental Updates β€” Only re-analyzes repos with new commits
  • πŸ’Ύ Smart Caching β€” DynamoDB or file-based caching avoids redundant work
  • 🎯 Type-Aware Prompts β€” Specialized analysis for backend, frontend, mobile, infra, and libraries
  • πŸ“¦ Results Hub β€” All architecture docs committed to a centralized repository
  • πŸ”Œ Multi-Provider β€” Anthropic API, Amazon Bedrock, or LiteLLM proxy
  • 🌐 Multi-Git β€” GitHub, GitLab, CodeCommit, Azure DevOps, Bitbucket

πŸ“‹ See It In Action

Check out RepoSwarm's self-analysis β€” RepoSwarm investigating its own codebase!

🎬 Architecture Overview (click to play)

β–Ά Watch on YouTube


How It Works

RepoSwarm Architecture

Pipeline: Cache check β†’ Clone β†’ Type detection β†’ Structure analysis β†’ Prompt selection β†’ AI analysis β†’ Store results β†’ Cleanup


Common Workflows

Run an Investigation

reposwarm repos add my-app --url https://github.com/org/my-app
reposwarm investigate my-app
reposwarm wf progress
reposwarm results read my-app

Investigate All Repos in Parallel

reposwarm investigate --all --parallel 3
reposwarm dashboard

Diagnose Issues

reposwarm doctor                       # Full health check
reposwarm errors                       # Stalls + failures
reposwarm wf retry <workflow-id>       # Re-run a failed investigation

Search Across All Architecture Docs

reposwarm results search "authentication"
reposwarm results diff repo-a repo-b
reposwarm results export --all -d ./docs

πŸ‘‰ Full command reference: reposwarm-cli README


Configuration

LLM Provider

reposwarm config provider setup        # Interactive (Anthropic, Bedrock, LiteLLM)

Git Provider

reposwarm config git setup             # Interactive (GitHub, GitLab, CodeCommit, Azure, Bitbucket)

Adding Repositories

reposwarm repos add my-backend --url https://github.com/org/my-backend
reposwarm repos add my-frontend --url https://github.com/org/my-frontend
reposwarm repos discover               # Auto-discover from your configured git provider (GitHub, GitLab, CodeCommit, Azure DevOps, Bitbucket)

Or edit prompts/repos.json directly:

{
  "repositories": {
    "my-backend": {
      "url": "https://github.com/org/my-backend",
      "type": "backend",
      "description": "Main API service"
    }
  }
}

Analysis Prompt Types

Type Focus Prompts
πŸ”§ Backend APIs, databases, services prompts/backend/
🎨 Frontend Components, routing, state prompts/frontend/
πŸ“± Mobile UI, device features, offline prompts/mobile/
πŸ“š Libraries API surface, internals prompts/libraries/
☁️ Infrastructure Resources, deployments prompts/infra-as-code/
πŸ”— Shared Security, auth, monitoring prompts/shared/

Ecosystem

Project Description Install / Pull
⌨️ reposwarm-cli CLI β€” setup, investigate, diagnose, results curl -fsSL .../install.sh | sh
πŸ”Œ reposwarm-api REST API server for repos, workflows, prompts docker pull ghcr.io/reposwarm/api:latest
πŸ“Š reposwarm-ui Next.js dashboard for browsing investigations docker pull ghcr.io/reposwarm/ui:latest
πŸ€– reposwarm (this repo) Core engine β€” Temporal workflows + analysis docker pull ghcr.io/reposwarm/worker:latest
🧠 reposwarm-askbox AI agent for querying architecture docs docker pull ghcr.io/reposwarm/askbox:latest
πŸ“‹ sample-results-hub Example output β€” generated .arch.md files β€”

All Docker images are multi-arch (linux/amd64 + linux/arm64) and published automatically on every push to main.


Project Structure

reposwarm/
β”œβ”€β”€ prompts/                 # AI analysis prompts by repo type
β”‚   β”œβ”€β”€ backend/            # API, database, service prompts
β”‚   β”œβ”€β”€ frontend/           # UI, component, routing prompts
β”‚   β”œβ”€β”€ mobile/             # Mobile app specific prompts
β”‚   β”œβ”€β”€ libraries/          # Library/API prompts
β”‚   β”œβ”€β”€ infra-as-code/      # Infrastructure prompts
β”‚   β”œβ”€β”€ shared/             # Cross-cutting concerns
β”‚   └── repos.json          # Repository configuration
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ investigator/       # Core analysis engine
β”‚   β”‚   └── core/          # Main analysis logic
β”‚   β”œβ”€β”€ workflows/          # Temporal workflow definitions
β”‚   β”œβ”€β”€ activities/         # Temporal activity implementations
β”‚   β”œβ”€β”€ models/             # Data models and schemas
β”‚   └── utils/              # Storage adapters and utilities
β”œβ”€β”€ tests/                  # Unit and integration tests
└── temp/                   # Generated .arch.md files (local dev)

Credits

RepoSwarm was born out of a hackathon at Verbit, built by:


Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make changes and add tests
  4. Submit a pull request

Recent Fixes (2026-03-23)

πŸ”§ DynamoDB Local β€” Table Creation Fails on Fresh Install

Symptom: reposwarm repos add returns 500 with "Request must contain either a valid AWS access key ID or X.509 certificate." reposwarm doctor shows DynamoDB β€” DISCONNECTED even though the container is running.

Root cause: The API server used a no-op SigV4 signer (signer: { sign: async (req) => req }) that stripped all auth headers. DynamoDB Local accepts unsigned requests for data operations (PutItem, GetItem) but rejects control plane operations (CreateTable, DescribeTable) with MissingAuthenticationToken. This caused ensureTable() to silently fail on startup β€” the table was never created, and all subsequent operations returned 500.

Fix: Removed the no-op signer. DynamoDB Local needs valid SigV4 signatures but doesn't verify the actual credentials β€” dummy static credentials with normal signing work fine.

Update: docker compose pull api && docker compose up -d api

πŸ”§ Anthropic Provider β€” API Key Not Written to worker.env

Symptom: After running reposwarm config provider setup with the Anthropic provider, the ANTHROPIC_API_KEY was never written to worker.env. Investigations fail with authentication errors even though the key was entered during setup.

Fix: Added APIKey field to the provider config struct, added --api-key flag and interactive prompt, and wired it through to WorkerEnvVars() for Anthropic.

Update: curl -fsSL https://raw.githubusercontent.com/reposwarm/reposwarm-cli/main/install.sh | sh

πŸ”§ Provider Switch β€” Stale Bedrock Env Vars Survive

Symptom: Switching from Bedrock to Anthropic (or vice versa) left stale environment variables (CLAUDE_CODE_USE_BEDROCK=1, CLAUDE_PROVIDER=bedrock) in worker.env, causing the worker to stay in Bedrock mode.

Fix: Added provider-aware cleanup to writeWorkerEnvForProvider() β€” removes exclusive env vars from other providers when switching.

πŸ”§ DynamoDB Local β€” Fails on Machines Without AWS Credentials

Symptom: On fresh EC2 instances or machines without IAM roles or ~/.aws/credentials, the API and worker containers fail because the AWS SDK tries to resolve credentials via IMDS and hangs.

Fix: Added dummy AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY defaults to API, worker, and UI services in the Docker Compose template. DynamoDB Local accepts any credentials.

2026-03-24

πŸ”§ UI: Repos added via CLI now visible in dashboard

Symptom: Repos added with reposwarm repos add appeared in the CLI but not in the web UI on Docker installs.

Root cause: The UI container had no way to reach the API container β€” /v1/* requests from the browser were hitting the UI's own Next.js server, which had no route for them.

Fix: Added Next.js rewrites to proxy /v1/* requests from the UI container to the API container. Repos added via CLI now appear immediately in the dashboard.

Update: docker compose pull ui && docker compose up -d ui

πŸ”§ CLI: doctor correctly detects provider credentials on Docker installs

Symptom: reposwarm doctor reported ANTHROPIC_API_KEY β€” NOT SET even when the key was correctly configured in worker.env.

Root cause: On Docker installs, doctor was querying the API container for environment variable status. The API container doesn't have access to worker.env β€” only the worker container does. So the key always appeared missing.

Fix: reposwarm doctor now reads worker.env directly from the local filesystem instead of querying the API container.

Update: curl -fsSL https://raw.githubusercontent.com/reposwarm/reposwarm-cli/main/install.sh | sh

πŸ”§ UI: Auto-Discover is now provider-agnostic

Symptom: The "Auto-Discover from CodeCommit" button implied discovery only worked with AWS CodeCommit.

Fix: Button text updated to "Auto-Discover". Discovery works with GitHub, GitLab, Azure DevOps, Bitbucket, and CodeCommit based on your configured git provider. Multi-provider auto-discovery across all supported git providers is coming imminently.


License

This project is licensed under the Apache License 2.0.

About

RepoSwarm is an AI powered tools that coding agents can use for multi-repo architecture discovery.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors