sync vscode¶
Merge VS Code configuration files from all sub-repos into the root .vscode folder.
Usage¶
Description¶
The sync vscode command merges VS Code configuration files from all sub-repositories into your workspace's root .vscode folder. This allows you to have unified debug configurations, tasks, settings, and extension recommendations across all your repos.
Running sync vscode without a subcommand merges all configuration files.
Subcommands¶
sync vscode settings¶
Merges settings.json from all repositories into the root .vscode/settings.json.
Behavior:
- Settings from sub-repos are combined with root settings
- Later repos override earlier ones for conflicting keys
- Use the
skipSettingsconfiguration option to exclude specific settings keys from being merged
Example: If repo-a has "editor.tabSize": 2 and repo-b has "editor.tabSize": 4, the merged result will use 4 (from the later repo).
sync vscode launch¶
Merges launch.json from all repositories into the root .vscode/launch.json.
Behavior:
- Launch configurations are prefixed with the repository name to avoid conflicts
- A configuration named "Debug Server" in
api-repobecomes "api-repo: Debug Server" - All configurations from all repos are available in the unified launch menu
- Merges
.vscode/launch.shared.jsonfrom the workspace root for workspace-level compounds that span repos - Creates a master compound that includes all required configurations/compounds
Marking launch configurations as required:
You can mark launch configurations or compounds as required in two ways:
-
Per-repo configuration in multi.json (recommended):
-
In the launch definition: Add
"required": trueto the configuration or compound in the sub-repo'slaunch.json(note: this may cause VS Code schema validation warnings)
Using launch.shared.json for workspace-level compounds:
Create a .vscode/launch.shared.json file in your workspace root to define compounds that span multiple sub-repos. This is the recommended way to create debug configurations that launch services from different repos together:
{
"compounds": [
{
"name": "Full Stack",
"configurations": [
"api: Django Server",
"web: Next.js Dev"
]
}
]
}
The contents of launch.shared.json are merged into the final launch.json after all sub-repo configurations are collected, so you can reference any configuration from any repo by its prefixed name.
sync vscode tasks¶
Merges tasks.json from all repositories into the root .vscode/tasks.json.
Behavior:
- Tasks are prefixed with the repository name
- Merges
.vscode/tasks.shared.jsonfrom the workspace root for workspace-level tasks that span repos - Creates a master compound task that runs all tasks marked as required in parallel
- Useful for running build tasks across all repos simultaneously
Marking tasks as required:
You can mark tasks as required in two ways:
-
Per-repo configuration in multi.json (recommended): Add a
requiredTasksarray to the repo config listing task labels that should be required: -
In the task definition: Add
"required": trueto the task in the sub-repo'stasks.json(note: this may cause VS Code schema validation warnings)
Using tasks.shared.json for workspace-level tasks:
Create a .vscode/tasks.shared.json file in your workspace root to define tasks that span multiple sub-repos or reference tasks from different repos:
{
"tasks": [
{
"label": "Build All",
"dependsOn": ["api: Build", "web: Build"],
"dependsOrder": "parallel",
"problemMatcher": []
}
]
}
The contents of tasks.shared.json are merged into the final tasks.json after all sub-repo tasks are collected, so you can reference any task from any repo by its prefixed label.
sync vscode extensions¶
Merges extensions.json recommendations from all repositories into the root .vscode/extensions.json.
Behavior:
- Combines all extension recommendations from all repos
- Duplicates are removed while preserving order
- Ensures your workspace recommends all extensions needed by any sub-repo
Examples¶
# Merge all VS Code configurations
multi sync vscode
# Only merge settings
multi sync vscode settings
# Only merge launch configurations
multi sync vscode launch
# Only merge tasks
multi sync vscode tasks
# Only merge extension recommendations
multi sync vscode extensions
Configuration¶
You can configure VS Code syncing behavior in multi.json:
{
"vscode": {
"skipSettings": ["workbench.colorCustomizations", "editor.fontSize"]
},
"repos": [
{
"url": "https://github.com/org/repo",
"skipVSCode": true,
"requiredTasks": ["Dev Server", "Watch"],
"requiredCompounds": ["Django"]
}
]
}
skipSettings- Array of settings keys to exclude from mergingskipVSCode- Per-repo option to exclude a repo from VS Code config mergingrequiredTasks- Per-repo array of task labels to include in the master compound taskrequiredCompounds- Per-repo array of compound names to include in the master launch compoundrequiredLaunchConfigurations- Per-repo array of launch configuration names to include in the master launch compound