Skip to content
| Marketplace
Sign in
Visual Studio Code>SCM Providers>Repo CopilotNew to Visual Studio Code? Get it now.
Repo Copilot

Repo Copilot

nietao

|
3 installs
| (1) | Free
Repository-aware AI copilot for VS Code
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Repo Copilot

Repo Copilot is a batch repository operations assistant for VS Code–compatible editors. It reads Git repositories recognized by the built-in Git extension in your workspace and provides a unified Dashboard in the Activity Bar so you can review repository status, check branches and MR/PRs, switch branches, look up dependencies, run commands, and create GitLab Merge Requests or GitHub Pull Requests in bulk.

Good fits:

  • Release prep, release-branch checks, and day-to-day maintenance across multi-repo workspaces
  • Confirming which repositories already have open MR/PRs
  • Checking whether remote branches exist (for example release/* or hotfix/1.2.3)
  • Inspecting npm dependency declarations and locked versions
  • Running commands such as npm test or git status --short across repositories
  • Creating MR/PRs from the current branch, with optional OpenAI-compatible model–generated titles and descriptions

The UI uses “MR” as the generic term for merge requests. GitLab creates Merge Requests; GitHub creates Pull Requests.

Features

Repository Dashboard

  • Reads Git repositories from the current VS Code workspace (single-root or multi-root).
  • Shows repository name, root path, current branch, remotes, clean/dirty status, and the latest operation result.
  • Filter repositories, choose which ones are visible, and run batch actions on the selection.
  • Per-repository results with Results and Log output areas at the bottom.
  • Dashboard context is preserved when hidden; reopening refreshes repository status.

Git and MR/PR

  • Check Open MR: Check open MR/PRs for selected repositories, optionally filtered by target branch.
  • Check Remote Branch: Check whether the default remote has matching branches, with * wildcards; leave Branch empty to list all remote branches.
  • Switch Branch: Run git checkout <branch> in bulk; Git decides whether repositories with uncommitted changes can switch safely.
  • Create MR: Create an MR/PR from the current branch to a target branch.
  • Before creating, checks whether an open MR/PR already exists from the current branch to the target; if so, skips and returns the link.
  • Supports assignees, reviewers, labels, draft, and GitLab remove source branch options.
  • Supports GitHub, GitLab, self-hosted instances, and custom API base URLs.

Dependency lookup

  • Check Dependency: Check whether selected repositories use a given npm package.
  • Package name only, or an exact version string.
  • Scanned files:
    • package.json
    • package-lock.json
    • npm-shrinkwrap.json
    • pnpm-lock.yaml
    • yarn.lock
  • Distinguishes declared vs resolved versions and shows source file, scope, and version in results.

Batch terminal commands

  • Run Commands: Each non-empty line in the input is one shell command, run sequentially in each selected repository root.
  • Commands run in input order per repository; a failure stops further commands for that repository.
  • Optional allowance for dirty repositories (enabled by default).
  • Confirmation dialog lists commands and which repositories will run or be skipped.
  • Long per-repository output is truncated in the Dashboard to avoid flooding the UI.

OpenAI-compatible MR copy generation

  • With LLM base URL, model, and API key configured, creating an MR/PR can generate a Chinese title and description from the current branch, target branch, changed files, and diff.
  • Uses the OpenAI-compatible /chat/completions endpoint.
  • Diff input is capped at about 200,000 characters; excess is truncated before sending to the model.
  • If the LLM is not configured or the call fails, a local template is used so MR/PR creation is not blocked.
  • Git access tokens are not sent to the LLM; the LLM API key is not sent to GitHub/GitLab.

Quick start

  1. Open a Git repository or a multi-root workspace containing several Git repositories in a VS Code–compatible editor.
  2. Open Repo Copilot from the Activity Bar, or run Repo Copilot: Open Dashboard from the Command Palette.
  3. Click Refresh and confirm the repository list loads.
  4. Select one or more repositories.
  5. Run the actions you need:
    • In Git: check MR/PRs, remote branches, switch branches, or create MR/PRs.
    • In Dependencies: enter a package name and optional version.
    • In Terminal: enter multi-line commands for batch execution.
    • In LLM: configure the model service for MR/PR copy generation.
    • In Settings: choose where to save Dashboard preferences.

Common commands:

Command Palette command Purpose
Repo Copilot: Open Dashboard Open the Repo Copilot Dashboard
Repo Copilot: Set Git Access Token Save GitHub/GitLab API token to VS Code Secret Storage
Repo Copilot: Clear Git Access Token Remove the saved Git API token
Repo Copilot: Set LLM API Key Save OpenAI-compatible API key to VS Code Secret Storage
Repo Copilot: Clear LLM API Key Remove the saved LLM API key
Repo Copilot: Hello Verify the extension is active

Recommended workflows

Release branch check

  1. Select the repositories involved in the release.
  2. In Git > Branch, enter release/1.2.3 or release/*, or leave it empty to list all remote branches.
  3. Click Check Remote Branch.
  4. Review which repositories have a matching remote branch and which do not.

Pre-release MR/PR check

  1. In Git > Merge Request, set Target Branch (for example main or release/1.2.3).
  2. Click Check Open MR.
  3. If target branch is empty, all open MR/PRs are listed; if set, only MR/PRs targeting that branch are checked.

Batch branch switch

  1. In Git > Branch, enter the branch name.
  2. Select repositories and click Switch Branch.
  3. The confirmation dialog shows the repositories that will run.
  4. On confirm, selected repositories run git checkout <branch>; Git rejects any repository whose local changes would be overwritten.

Batch commands

  1. Open the Terminal panel.
  2. Enter one or more commands, for example:
npm install
npm test
git status --short
  1. Toggle Allow dirty repositories as needed.
  2. Click Run Commands and confirm.

Create MR/PR

  1. Ensure each selected repository’s current branch is pushed and the working tree is clean.
  2. Run Repo Copilot: Set Git Access Token from the Command Palette.
  3. Set Target Branch under Git > Merge Request.
  4. Optionally fill assignees, reviewers, labels, Draft, or Remove source branch under Advanced.
  5. Click Create MR.
  6. Repo Copilot skips dirty repos, detached HEAD, current branch equal to target, and repos that already have an open MR/PR for the same source→target pair.

Configuration

Store secrets via the Command Palette (recommended):

Repo Copilot: Set Git Access Token
Repo Copilot: Set LLM API Key

You can also use VS Code settings. Values in Secret Storage apply only when the corresponding setting is empty; if you set repoCopilot.gitAccessToken or repoCopilot.llmApiKey explicitly, the setting takes precedence.

Git hosting and MR/PR

{
  "repoCopilot.gitProvider": "gitlab",
  "repoCopilot.gitApiBaseUrl": "",
  "repoCopilot.pullRequestAssignees": [],
  "repoCopilot.pullRequestReviewers": [],
  "repoCopilot.pullRequestLabels": [],
  "repoCopilot.pullRequestDraft": false,
  "repoCopilot.pullRequestRemoveSourceBranch": true,
  "repoCopilot.requestTimeoutMs": 120000
}
Setting Default Description
repoCopilot.gitProvider gitlab Git API provider: gitlab, github, or auto. auto only detects github.com and gitlab.com.
repoCopilot.gitApiBaseUrl "" Custom GitHub/GitLab API base URL for self-hosted instances.
repoCopilot.gitAccessToken "" Git API token fallback; prefer Set Git Access Token.
repoCopilot.pullRequestAssignees [] Assignees when creating MR/PRs.
repoCopilot.pullRequestReviewers [] Reviewers when creating MR/PRs. GitHub team reviewers: org/team.
repoCopilot.pullRequestLabels [] Labels when creating MR/PRs.
repoCopilot.pullRequestDraft false Create draft MR/PRs.
repoCopilot.pullRequestRemoveSourceBranch true GitLab: delete source branch after merge. Ignored on GitHub.
repoCopilot.requestTimeoutMs 120000 Timeout for Git API, LLM, and terminal commands (minimum 5000 ms).

Default API URL derivation for self-hosted:

  • GitHub Enterprise: https://<host>/api/v3
  • GitLab self-managed: https://<host>/api/v4

If your deployment uses a different path, set repoCopilot.gitApiBaseUrl explicitly.

Terminal

{
  "repoCopilot.allowDirtyTerminalCommands": true
}
Setting Default Description
repoCopilot.allowDirtyTerminalCommands true Whether batch terminal commands may run in repos with uncommitted changes by default.

The Dashboard Allow dirty repositories checkbox controls the current run; Save Settings persists the choice.

LLM

{
  "repoCopilot.llmBaseUrl": "https://api.openai.com/v1",
  "repoCopilot.llmModel": "your-model-id",
  "repoCopilot.llmApiKey": "",
  "repoCopilot.llmExtraHeaders": {
    "X-Client": "repo-copilot"
  },
  "repoCopilot.requestTimeoutMs": 120000
}
Setting Default Description
repoCopilot.llmBaseUrl "" OpenAI-compatible API base URL (through /v1 or full /chat/completions URL).
repoCopilot.llmModel "" Model ID for MR/PR title and description generation.
repoCopilot.llmApiKey "" LLM API key fallback; prefer Set LLM API Key.
repoCopilot.llmExtraHeaders {} Extra HTTP headers (settings JSON only).

The model must return strict JSON:

{
  "title": "Short MR title",
  "description": "Markdown MR description"
}

Invalid JSON, API errors, or incomplete configuration fall back to local MR/PR copy; creation still proceeds.

Dashboard saved settings

The Settings panel chooses where Save Settings writes:

Location Behavior
User User-level VS Code settings
Workspace Current workspace settings
Repository Selected repo’s .vscode/settings.json

Repository scope requires at least one selected repository. Repo Copilot creates or updates .vscode/settings.json with JSONC-aware formatting; invalid JSONC in the file produces an error.

Savable from the Dashboard:

  • Git > Merge Request > Advanced > Save Settings: assignees, reviewers, labels, draft, remove source branch
  • Terminal > Save Settings: allow dirty repositories
  • LLM > Save Settings: base URL, model

Configure gitProvider, gitApiBaseUrl, llmExtraHeaders, requestTimeoutMs, tokens, and API keys in VS Code Settings or the Command Palette.

Behavior and limits

  • Repositories come from the built-in Git extension; arbitrary folders are not scanned.
  • Default remote is origin, or the first remote if origin is missing.
  • Dirty state uses git status --porcelain -u.
  • Remote branch checks use git ls-remote --heads <remote>.
  • Branch patterns support exact names and * (for example release/*).
  • Batch operations default to concurrency of 3 repositories.
  • Branch checkout lets Git decide whether repositories with uncommitted changes can switch safely.
  • MR/PR creation skips repositories with uncommitted changes.
  • Terminal batch commands allow dirty repos by default (can be disabled in the panel).
  • Dependency lookup only scans npm ecosystem files at each repository root (no recursive subfolder package.json).
  • Version matching is exact string match (1.2.3 vs ^1.2.3 are different).
  • GitHub/GitLab API calls require a token with sufficient permissions.
  • Remote URLs support common HTTPS and SSH scp-like forms (for example git@github.com:owner/repo.git).

Security

  • Git access tokens in Secret Storage are used only for GitHub/GitLab API requests.
  • LLM API keys in Secret Storage are used only for OpenAI-compatible LLM requests.
  • MR/PR creation sends repository name, source/target branches, changed file list, and a diff snippet to the LLM.
  • Plain-text tokens in settings are a compatibility fallback; avoid them for shared or published configs.
  • Batch terminal commands run in your local shell; only run commands you trust.

FAQ

Why is the Dashboard empty?

Ensure the window has Git repositories or a multi-root workspace open and the built-in Git extension is available. Discovery can take a moment on first open—try Refresh.

Why doesn’t my private GitHub instance auto-detect?

repoCopilot.gitProvider auto only recognizes github.com and gitlab.com. Set github or gitlab and, if needed, repoCopilot.gitApiBaseUrl.

Why was MR/PR creation skipped?

Common reasons: uncommitted changes, detached HEAD, current branch equals target, empty target branch, or an existing open MR/PR for the same source→target.

LLM is configured but no generated copy?

MR/PR creation does not require the LLM. Incomplete config, timeout, non-JSON response, or request failure uses local fallback title/description with a warning in the result details.

What token permissions are needed?

Read MR/PRs and create/update MR/PRs at minimum. Assignees, reviewers, and labels need platform permissions to set those fields.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft