# VS Code + JetBrains Extension Installers A bundle of cross-platform scripts that install a curated set of editor extensions / plugins, one command per platform. | File | Editor | Platforms | | ----------------------- | ----------------------------------- | ------------------------ | | `install.sh` | VS Code | macOS, Linux (Ubuntu) | | `install.ps1` | VS Code | 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 (Install to default profile from a LOCAL .vscode/extensions.json) bash <(curl -sSL https://opengist.rmrf.online/weehong/b2a7c0a2ae6d40e8a14f8d85964a9186/raw/HEAD/install.sh) # 2. Install remote recommendation JSON to the default profile bash <(curl -sSL https://opengist.rmrf.online/weehong/b2a7c0a2ae6d40e8a14f8d85964a9186/raw/HEAD/install.sh) -f "https://opengist.rmrf.online/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.rmrf.online/weehong/b2a7c0a2ae6d40e8a14f8d85964a9186/raw/HEAD/install.sh) -p "TypeScript" -f "https://opengist.rmrf.online/weehong/b2a7c0a2ae6d40e8a14f8d85964a9186/raw/HEAD/typescript_react_recommendation.json" # 4. Install Python remote recommendation JSON to a specific named profile bash <(curl -sSL https://opengist.rmrf.online/weehong/b2a7c0a2ae6d40e8a14f8d85964a9186/raw/HEAD/install.sh) -p "Python" -f "https://opengist.rmrf.online/weehong/b2a7c0a2ae6d40e8a14f8d85964a9186/raw/HEAD/python_recommendation.json" ``` ```powershell # Windows iwr -useb https://opengist.rmrf.online/weehong/b2a7c0a2ae6d40e8a14f8d85964a9186/raw/HEAD/install.ps1 | iex # named profile .\install.ps1 -ProfileName "WorkSetup" ``` ### JetBrains ```bash # macOS / Ubuntu / WSL2 — interactive picker for IDEs and plugins bash <(curl -sSL https://opengist.rmrf.online/weehong/b2a7c0a2ae6d40e8a14f8d85964a9186/raw/HEAD/install-jetbrains.sh) ``` ```powershell # Windows — interactive picker iwr -useb https://opengist.rmrf.online/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. Prereq: the `code` CLI must be on `PATH`. - **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 an interactive multi-select picker for IDEs and another for plugins. 4. Run each IDE's `installPlugins` against every selected plugin. ### 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 comma-separated indexes (`1,3,5`) or `a` for all. - **PowerShell:** uses `Out-GridView -OutputMode Multiple` when available; otherwise the same numbered/comma-input fallback. ### 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 the script.** Each `.ps1` already sets `RemoteSigned` for the current process only. If your environment blocks that too, invoke 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 installers run a preflight check before installing: 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 every time; there's no flag to skip the picker by design.