SrcNexus npm Packages
SrcNexus publishes three official packages to the npm registry. Together they cover the whole developer workflow: scaffold an extension, build it against the SDK, and deploy it from your terminal.
| Package | Install | What it does |
|---|---|---|
srcnexus | npm install -g srcnexus | CLI to deploy projects and extensions from the command line. |
@srcnexus/create-extension | npm create @srcnexus/extension | Scaffolds a ready-to-build extension project. |
@srcnexus/ext-sdk | npm install @srcnexus/ext-sdk | The SDK your extension code imports — commands, UI, file system, terminal, storage, network. |
All three are MIT licensed.
The typical flow
# 1. Scaffold a new extension
npm create @srcnexus/extension -- --name "My Extension" --lang ts -y
cd my-extension
# 2. Install the SDK (already listed as a dependency)
npm install
# 3. Build the bundle
npm run build
# 4. Deploy it to the extension store
npm install -g srcnexus
srcnexus login
srcnexus deploy --extension
Package details
srcnexus — the CLI
The command line interface for deploying projects and extensions without opening the app. Requires Node.js 18 or later.
npm install -g srcnexus
See the CLI reference for every command and flag.
@srcnexus/create-extension — the scaffolder
Generates a complete extension project — manifest.json, build.js (esbuild), a src/main.ts entry point with a working sample command, and a tsconfig.json if you pick TypeScript.
npm create @srcnexus/extension
See the create-extension reference for all options.
@srcnexus/ext-sdk — the extension SDK
The API surface every SrcNexus extension is written against. Ships JavaScript sources plus full TypeScript type definitions.
npm install @srcnexus/ext-sdk
import editor from "@srcnexus/ext-sdk";
editor.onLoad(() => {
editor.commands.registerCommand("myExt.greet", async () => {
editor.window.showToast("Hello from my extension!");
});
});
See the SDK reference for the API map, and the Extensions section for the full documentation of each API.