Files

2.4 KiB

Setup

macOS Or Linux

install/bootstrap.sh

Windows

install/bootstrap.ps1

What Bootstrap Does

  • Creates a canonical path at ~/.copilot-resources
  • Links default discovery locations back to this repository
  • Merges only the managed Copilot-related VS Code settings into the user settings file
  • Generates managed VS Code and Copilot CLI MCP config files from the tracked templates in config/mcp/
  • Writes a managed Copilot CLI environment fragment and sources it from the shell or PowerShell profile
  • Creates .local/mcp.local.jsonc from the tracked example if the machine-local MCP override file does not exist yet
  • Creates a project-local port declaration file at .local/project-ports.json on first session start if it does not exist yet
  • Writes a local install-state file outside the repository

Optional Settings

Bootstrap renders and merges the managed keys from config/vscode/settings.template.jsonc into the user settings file. Existing unmanaged VS Code settings are preserved, and the merge updates the managed keys in place so existing JSONC comments and surrounding formatting stay intact where possible.

Bootstrap also writes a managed Copilot CLI environment file into the local state directory and adds a small managed source block to the active shell or PowerShell profile instead of replacing the whole profile.

Bootstrap generates user-level MCP config as well:

  • VS Code user mcp.json
  • Copilot CLI user ~/.copilot/mcp-config.json

Those files are rendered from the tracked templates in config/mcp/ and merged in place so unmanaged MCP server entries are preserved. Managed MCP servers that are no longer desired are removed.

Machine-local MCP inputs live in .local/mcp.local.jsonc. The tracked example file starts with Gitea disabled. Enable it per machine by editing that local file and providing:

  • servers.gitea.enabled: true
  • servers.gitea.serverUrl
  • servers.gitea.token

Current managed MCP behavior:

  • VS Code gets Playwright, Filesystem, and optional Gitea
  • Copilot CLI gets Filesystem and optional Gitea
  • Copilot CLI Playwright is intentionally omitted because it already ships as a built-in MCP server

install/update.sh and install/update.ps1 rerun bootstrap after git pull, so managed MCP config changes propagate on update.

For generic Git repository bootstrap hygiene outside the installation flow of this shared resources repo, see docs/git-bootstrap-hygiene.md.