# VS Code + JetBrains Extension Managers A bundle of cross-platform scripts for editor extensions and plugins, one command per platform. The JetBrains scripts install and uninstall plugins; the VS Code scripts install extensions. | File | Editor | Platforms | | ----------------------- | ----------------------------------- | ------------------------ | | `install.sh` | VS Code | macOS, Linux (Ubuntu) | | `install.ps1` | VS Code | Windows | | `settings.sh` | VS Code settings | macOS, Linux (Ubuntu) | | `settings.ps1` | VS Code settings | Windows | | `install-jetbrains.sh` | JetBrains IDEs + remote-dev-server | macOS, Linux, WSL2 | | `install-jetbrains.ps1` | JetBrains IDEs + Gateway Client | Windows | --- ## Quick start Replace `` with the raw base of this Gist (everything up to and including `/raw/HEAD/`). ### VS Code ```bash # 1. macOS / Ubuntu (use local recommendations when present, otherwise install the bundled defaults) bash <(curl -sSL https://opengist.resetrix.work/weehong/b2a7c0a2ae6d40e8a14f8d85964a9186/raw/HEAD/install.sh) # 2. Install remote recommendation JSON to the default profile bash <(curl -sSL https://opengist.resetrix.work/weehong/b2a7c0a2ae6d40e8a14f8d85964a9186/raw/HEAD/install.sh) -f "https://opengist.resetrix.work/weehong/b2a7c0a2ae6d40e8a14f8d85964a9186/raw/HEAD/typescript_react_recommendation.json" # 3. Install TypeScript and React remote recommendation JSON to a specific named profile bash <(curl -sSL https://opengist.resetrix.work/weehong/b2a7c0a2ae6d40e8a14f8d85964a9186/raw/HEAD/install.sh) -p "TypeScript" -f "https://opengist.resetrix.work/weehong/b2a7c0a2ae6d40e8a14f8d85964a9186/raw/HEAD/typescript_react_recommendation.json" # 4. Install Python remote recommendation JSON to a specific named profile bash <(curl -sSL https://opengist.resetrix.work/weehong/b2a7c0a2ae6d40e8a14f8d85964a9186/raw/HEAD/install.sh) -p "Python" -f "https://opengist.resetrix.work/weehong/b2a7c0a2ae6d40e8a14f8d85964a9186/raw/HEAD/python_recommendation.json" ``` ```powershell # Windows iwr -useb https://opengist.resetrix.work/weehong/b2a7c0a2ae6d40e8a14f8d85964a9186/raw/HEAD/install.ps1 | iex # named profile .\install.ps1 -ProfileName "WorkSetup" ``` When the bundled extensions are installed into the default profile, the installer also merges the curated settings described below. To apply only the settings: ```bash bash <(curl -sSL https://opengist.resetrix.work/weehong/b2a7c0a2ae6d40e8a14f8d85964a9186/raw/HEAD/settings.sh) ``` ```powershell iwr -useb https://opengist.resetrix.work/weehong/b2a7c0a2ae6d40e8a14f8d85964a9186/raw/HEAD/settings.ps1 | iex ``` ### JetBrains ```bash # macOS / Ubuntu / WSL2 — IDE, action, then plugin picker bash <(curl -sSL https://opengist.resetrix.work/weehong/b2a7c0a2ae6d40e8a14f8d85964a9186/raw/HEAD/install-jetbrains.sh) ``` ```powershell # Windows — IDE, action, then plugin picker iwr -useb https://opengist.resetrix.work/weehong/b2a7c0a2ae6d40e8a14f8d85964a9186/raw/HEAD/install-jetbrains.ps1 | iex ``` --- ## What's in the catalogs ### VS Code extensions - `docker.docker` - `github.github-vscode-theme` - `GitHub.vscode-github-actions` - `ms-azuretools.vscode-containers` - `ms-vscode-remote.vscode-remote-extensionpack` - `pkief.material-icon-theme` (GitHub Copilot Chat is no longer in the list — it ships built-in with VS Code now.) ### JetBrains plugins (canonical marketplace IDs) | xmlId | Plugin | | ------------------------------- | ----------------------------- | | `com.intellij.ml.llm` | JetBrains AI Assistant | | `izhangzhihao.rainbow.brackets` | Rainbow Brackets | | `IdeaVIM` | IdeaVim | | `org.sonarlint.idea` | SonarQube for IDE (SonarLint) | | `Key Promoter X` | Key Promoter X | | `net.ashald.envfile` | EnvFile | | `org.intellij.qodana` | Qodana | Two IDs are easy to get wrong: `IdeaVIM` (xmlId is all-caps `VIM`) and `Key Promoter X` (xmlId contains spaces — must be quoted when passed to `installPlugins`). --- ## VS Code installer details `install.sh` / `install.ps1` are thin wrappers around `code --install-extension`: - `--profile "Name"` / `-ProfileName "Name"` installs into a named profile; VS Code creates the profile if it doesn't exist. - `--force` is passed so re-runs are idempotent. - Both scripts exit non-zero if any extension fails, and print a final summary. - `install.sh` applies the curated settings only when it falls back to its bundled extension list and no named profile is selected. A local or remote recommendation file does not trigger settings changes. - `install.ps1` applies the curated settings when its bundled extensions are installed into the default profile. Named profiles do not trigger settings changes. ### Curated VS Code settings `settings.sh` and `settings.ps1` update only the managed editor, wrapping, font-family, GitHub theme, and Material Icon Theme keys. Existing unrelated settings and values are preserved. The color theme is `GitHub Dark Default`, supplied by the bundled `github.github-vscode-theme` extension. Before changing an existing `settings.json`, the scripts create a timestamped `settings.json.backup.*` file. JSONC comments and trailing commas are accepted, but the merged file is normalized to formatted JSON; the backup retains the original comments and formatting. `editor.fontSize` is intentionally not managed. Prereqs: the extension installers require the `code` CLI on `PATH`; the Bash installer and `settings.sh` also require `jq`. The standalone settings scripts do not require `code`. - **macOS:** open VS Code → Cmd+Shift+P → "Shell Command: Install 'code' command in PATH". - **Ubuntu:** install from or `sudo snap install --classic code`. - **Windows:** during install, check "Add to PATH" (the default). --- ## JetBrains installer details Both JetBrains scripts: 1. Detect the host OS. 2. Scan the system for installed JetBrains IDEs and (where applicable) Gateway / remote-dev targets. 3. Show the IDE picker first. 4. Ask whether to install or uninstall. 5. For install, show the curated catalog; for uninstall, show the user-installed plugins actually found in the selected IDEs. 6. Install the selected marketplace IDs or, after showing exact paths and asking for confirmation, remove the selected plugin files. JetBrains AI Assistant is identified by its marketplace ID, `com.intellij.ml.llm`, so uninstall works even though its on-disk directory is normally named `ml-llm`. ### What gets scanned #### `install-jetbrains.sh` | OS | Source | | ----- | ---------------------------------------------------------------------------- | | macOS | `~/Library/Application Support/JetBrains/Toolbox/scripts/*` (Toolbox shims) | | macOS | `/Applications/.app/Contents/MacOS/*` | | Linux | `~/.local/share/JetBrains/Toolbox/apps/*/bin/*.sh` | | Linux | `/opt/*/bin/*.sh` (snap / .deb / tarball) | | Linux | `~/.cache/JetBrains/RemoteDev/dist/*/bin/remote-dev-server.sh` (Gateway, SSH/Orbstack) | | WSL2 | `/mnt/c/Users//AppData/Local/Programs/*/bin/*.exe` | | WSL2 | `/mnt/c/Users//AppData/Local/JetBrains/Toolbox/scripts/*.cmd` | | WSL2 | `~/.cache/JetBrains/RemoteDev/dist/*/bin/remote-dev-server.sh` | WSL2 detection works by grepping `microsoft` in `/proc/version`. The Windows username is read at runtime via `cmd.exe /c 'echo %USERNAME%'`. #### `install-jetbrains.ps1` | Source | What it is | | ------------------------------------------------------- | -------------------------------- | | `%LOCALAPPDATA%\Programs\*\bin\*64.exe` | Standalone + Toolbox app installs| | `%LOCALAPPDATA%\JetBrains\Toolbox\scripts\*.cmd` | Toolbox shims | | `%LOCALAPPDATA%\JetBrains\JetBrainsClient*` (newest) | Gateway Client (special path) | ### Picker - **Bash:** uses `fzf --multi` if `fzf` is on `PATH` (TAB to toggle, Enter to confirm); otherwise prints a numbered list and accepts space-separated indexes (`1 3 5`), exclusions (`!2 !4`), or `a` for all. - **PowerShell:** uses `Out-GridView -OutputMode Multiple` when available; otherwise the same numbered/comma-input fallback. ### Uninstall behavior JetBrains launchers provide `installPlugins` but no matching uninstall command. The scripts therefore resolve the selected IDE's `dataDirectoryName` from `product-info.json`, inspect each user-installed plugin's `META-INF/plugin.xml`, and present those plugin names and IDs for selection. Before removal, the script prints every resolved IDE and path and requires confirmation. Only user-installed plugins are offered. Bundled plugins cannot be removed this way and must be disabled in the IDE. Restart the selected IDEs after uninstalling. ### Gateway Client path (Windows) When the script detects `%LOCALAPPDATA%\JetBrains\JetBrainsClient*` and you select it from the picker, the install logic switches: the bundled Gateway client has no `installPlugins` CLI, so the script reads the client's `build.txt` and downloads each plugin directly from `plugins.jetbrains.com`, unpacking it into the client's `plugins\` folder. If `build.txt` is missing, the client folder hasn't been initialized yet — open a Remote Project from Gateway once, then re-run. After Gateway installs finish, **close and re-open the Gateway Client** for it to pick up the new plugins. --- ## Troubleshooting **`code` not on PATH.** See the VS Code installer details section above. **PowerShell refuses to run an installer script.** The installer `.ps1` scripts attempt to set `RemoteSigned` for the current process only. If your environment blocks the file, invoke it explicitly: ```powershell powershell -ExecutionPolicy Bypass -File .\install.ps1 ``` **`installPlugins` reports a plugin is already installed.** Harmless — it's a no-op. Both scripts treat it as success. **"Only one instance of IDEA can be run at a time."** The IDE is currently open and holds the config-dir lock. Both JetBrains scripts run a preflight check before changing plugins: if a target IDE looks running, they prompt you to close it and press Enter to retry. If a process slips past the preflight, the install loop short-circuits with the same hint instead of repeating the error per plugin. **No JetBrains IDEs detected.** Install one via the [JetBrains Toolbox](https://www.jetbrains.com/toolbox-app/) (which sets up the standard paths the script scans), or install standalone — both layouts are supported. **WSL2 picker is empty.** Verify the Windows username is resolved: in WSL run `cmd.exe /c 'echo %USERNAME%'`. If that prints nothing, your `interop.appendWindowsPath` may be disabled; either re-enable it in `/etc/wsl.conf` or run `install-jetbrains.ps1` natively on Windows instead. **`Key Promoter X` install fails.** The xmlId contains spaces; if you're typing it manually elsewhere, quote it. The bundled scripts already do. --- ## Notes for re-running - Scripts are idempotent — already-installed extensions/plugins are skipped or upgraded in place. - Exit code is non-zero if any extension/plugin failed. - The JetBrains scripts ask for IDE, action, and plugin choices every time; there's no flag to skip the picker by design.