Skip to content

feat: add multi-repo support (--repos-dir)

Klaus Wölfel requested to merge feature/multi-repo into master

Add the ability to work on multiple git repositories at once by specifying a parent directory instead of a single repo.

New components:

  • klausagent/discover.py: discover_repos() walks a parent directory to find all git repositories (with configurable max_depth)
  • MultiRepoToolsServer: extends the tool server with list_repos and switch_repo tools so the agent can navigate between repositories
  • tools:git-multi CLI subcommand: serves all repos under a directory
  • --repos-dir flag for chat and telegram subcommands (mutually exclusive with --repo)

Usage: ./run.sh chat --repos-dir /path/to/projects ./run.sh telegram --repos-dir /path/to/projects

The agent gets two new tools:

  • list_repos: shows all available repos and which is active
  • switch_repo: switch by name, path, or index

All existing single-repo behaviour is preserved (--repo still works).

Merge request reports