axeext
v0.4.0
Published
Open any project in VS Code with only a curated set of extensions based on the extensions.json recommendations, and generate a double-click shortcut that does the same.
Maintainers
Readme
axeext 🪓
axe extensions — turn a project's recommended extensions into the only extensions it loads.
VS Code's .vscode/extensions.json recommendations are just suggestions — every
extension you've installed globally still loads in every window. axeext promotes
that list into an allow-list: it opens the project with only the recommended
extensions enabled and every other one disabled, for that window only. Your global
setup is left untouched.
Most of the time that's a single command. You're sitting in a project window that loaded your entire extension zoo, and:
npx axeext --restart— the window closes and comes right back with only the project's recommended extensions. Perfect for when a heavy editor profile — linters, AI assistants, language servers for languages this repo doesn't touch — gets in the way of one focused project.
Quick start
No install needed — run it from the project root with npx:
# 1. No recommendations list yet? Build one from what you already have installed:
npx axeext --init
# 2. Reopen the window you're in with only those extensions enabled:
npx axeext --restart
# 3. ...or drop a double-click shortcut in the project root (no terminal needed):
npx axeext --shortcutStep 1 writes .vscode/extensions.json listing every installed extension as a
recommendation, each annotated with its name and description — read offline from the
extension itself, no network and no AI. Then prune it to what the project needs and
commit it; the curated set now travels with the repo. (It even offers to open the file
so you can start pruning right away.)
Step 2 is the everyday command: it closes the project's open window (gracefully —
unsaved editors come back via hot exit) and relaunches it with the curated set. If the
project isn't open yet, --launch simply opens it in a fresh focused window. It stays
quiet when it works (the common case); pass --debug to see a full progress log if a
run ever misbehaves.
Step 3 drops a shortcut that re-opens the same focused window with one double-click
— a .lnk on Windows, a .command on macOS/Linux — so a teammate never has to touch
the terminal. It works whether you ran via npx or a local dev-dependency.
Commands above not picking up a fresh release, or failing oddly?
npxcan reuse an already-resolved copy instead of checking again. Force a fresh one with@latest, e.g.npx axeext@latest --restart.
Set npm's
min-release-age? A just-published release stays invisible tonpxuntil it clears your delay window, so the commands above fail with No matching version found. Opt that one call out:npx --min-release-age=0 axeext@latest --restart(The generated shortcut and task already do this for you.)
What stays enabled
The keep set is merged from two sources and matched case-insensitively:
.vscode/extensions.json→recommendations— the project's list (commit it).- An optional keep file — extras that aren't recommendations, one id per line
(
#///start comments). Found at.vscode/extensions.keep.txt(or.vscode/extensions.keep).
Why --restart and not just --launch?
--launch cannot change a window that is already showing the project — VS Code
ignores the extension flags for a folder that is already open and just focuses its
window, extension set unchanged. The already-open window needs a close-and-reopen,
and --restart does exactly that, touching only that project's window.
Better yet, put it one keystroke away inside VS Code itself:
npx axeext --add-taskThis adds an "axeext: reopen with curated extensions" entry to
.vscode/tasks.json — the file is created if missing, existing comments are
preserved, and running it twice changes nothing. From then on it's Terminal → Run
Task → pick it: the window closes and comes right back with only the recommended
extensions, no shortcut file and no terminal. Prune the recommendations, run the
task, repeat.
Supported on Windows and macOS. On macOS the window close asks Visual Studio Code via AppleScript — expect a one-time Automation permission prompt (and, only if that route is refused, a System Events fallback that needs Accessibility permission).
Tip: wire it into package.json
Add it as a dev-dependency so the commands travel with the repo and the whole team gets the same focused window:
// package.json
"scripts": {
"code": "axeext --launch", // open the focused window
"code:link": "axeext --shortcut" // (re)generate the double-click shortcut
}Options
Every command operates on the current directory. Bare axeext prints a short
overview of these commands.
| Option | Description |
| -------------- | ------------------------------------------------------------------------------------------------------------------------------------ |
| --launch | Open the project now with only the curated set enabled. |
| --restart | Close the project's open window first, then reopen it with the curated set — for a workspace that is already loaded (Windows/macOS). |
| --shortcut | Create the double-click shortcut in the project root (instead of launching). |
| --add-task | Add the restart to .vscode/tasks.json, runnable via Terminal → Run Task. |
| --init | Generate .vscode/extensions.json from your installed extensions. |
| --force | With --init, overwrite an existing .vscode/extensions.json. |
| --debug | With --restart, write a full progress log to a temp file instead of staying silent. |
| -h, --help | Show help. |
Requirements
- Node.js >= 18.
- The VS Code
codeCLI (auto-detected on Windows; otherwise run Shell Command: Install 'code' command in PATH from VS Code).
Development
Built with Vite+: vp check (format, lint, types), vp test,
vp pack (build to dist/).
