vscode-hacker-meta
v2026.8.7-2
Published
Meta tooling for hacking VS Code extensions: pack a project and install the VSIX into every install CLI on the machine (native VS Code, code-server, Remote-SSH server).
Readme
vscode-hacker-meta
Meta tooling for hacking VS Code extensions: pack a project and install the VSIX into every install CLI available on the machine — native VS Code, code-server, and the Remote-SSH server (when run on the remote host).
Usage
npx vscode-hacker-meta pack <extension-dir> [--out <dir>]
npx vscode-hacker-meta install <vsix-file> [--post-install-script <path>]pack <dir>— packs the extension withvsce(which runs itsvscode:prepublishbuild) and prints the produced VSIX path (default output:<dir>/build/).install <vsix-file>— installs the given VSIX through every install CLI on the machine. The path must be specified explicitly; nothing is discovered.--post-install-script <path>— optional executable invoked asscript <installed-extension-dir>after each successful install to verify the package. Must be registered explicitly; nothing is auto-discovered. A non-executable script (e.g. 644 after a fresh clone) is run via bash.
Example:
npx vscode-hacker-meta pack ./
npx vscode-hacker-meta install build/vscode-hacker-markdown-0.0.1.vsix \
--post-install-script tools/post_install.shHow install works
- The target folder name (
<publisher>.<name>-<version>) is read from the VSIX'sextension.vsixmanifest, so any extension's VSIX works. - The VSIX is installed through every CLI that exists on the machine:
code(native) →~/.vscode/extensions— a PATHcodethat is the Remote-SSH shim (lives under~/.vscode-server/) is skipped; it is handled as the server install below.code-server→${XDG_DATA_HOME:-~/.local/share}/code-server/extensions- remote-cli →
~/.vscode-server/extensions(newest of both server layouts:cli/servers/*/server/bin/remote-cli/codeandbin/*/bin/remote-cli/code)
- The install arg order matters:
--install-extension <vsix> --force(a--forcebefore the value makes VS Code's CLI ignore the option). - Each install is verified (extension dir exists) and the registered post-install script runs; a CLI that fails is a warning when another install succeeded. The command fails only if nothing was installed.
- If a CLI forwards the install to a connected VS Code instance instead of installing locally (a common remote-cli behavior outside a real VS Code terminal), the dir check catches it and reports a warning.
Development
npm install
npm run build # tsc -> dist/
npx . pack <path-to-extension-repo>
npx . install <path-to-extension-repo>/build/<name>-<version>.vsixRequires vsce (global, or installed anywhere) to pack; falls back to
npx @vscode/vsce.
