CLI Commands
unextension init
Section titled “unextension init”Initializes unextension in your project.
- Creates
unextension.config.ts(or.jsif notsconfig.jsonis found), pre-filled from yourpackage.json - Adds
@types/vscodetodevDependenciesinpackage.json - Skips if a config file already exists
npx unextension init [--cwd <dir>]unextension sync
Section titled “unextension sync”Generates or updates the extension scaffolding in output/vscode/ and output/jetbrains/ from your built web app.
Must be run after building your web app (i.e. after vite build or equivalent).
npx unextension sync [--cwd <dir>]unextension dev
Section titled “unextension dev”Syncs the extension scaffold and launches the IDE(s) with your extension loaded for development.
# Launch all configured targetsnpx unextension dev
# Launch only VS Codenpx unextension dev vscode
# Launch only JetBrainsnpx unextension dev jetbrains
npx unextension dev [targets...] [--cwd <dir>]| Target | What it does |
|---|---|
vscode | Runs unextension sync then launches VS Code in Extension Development Host mode with --extensionDevelopmentPath pointing to output/vscode/ |
jetbrains | Runs unextension sync then runs gradlew runIde in output/jetbrains/ — downloads and launches a sandboxed IDE with the plugin installed |
Updating after source changes
Section titled “Updating after source changes”unextension dev vscode syncs once and launches VS Code. After making changes to your web app:
- Rebuild your web app:
vite build - Re-run
unextension dev vscode(or justunextension sync) - In VS Code:
Ctrl+Shift+P→ Developer: Reload Window
Runs the native build for one or both targets.
# Build all configured targetsnpx unextension build
# Build a specific targetnpx unextension build vscodenpx unextension build jetbrains
npx unextension build [targets...] [--cwd <dir>]| Target | What it runs |
|---|---|
vscode | npm install + vsce package in output/vscode/ |
jetbrains | gradlew build in output/jetbrains/ |