Skip to content

IDE Integration

NEX can be integrated directly into Visual Studio Code through the NEX VSCode extension. This integration provides a lightweight bridge between the editor and the NEX CLI, enabling interactive agent workflows and editor-assisted actions without leaving your development environment.

The extension runs a local background service inside VS Code and exposes a small set of commands that allow NEX agents and the editor to communicate in a structured, tool-backed way.

Key Features

  • Editor Bridge: Connects VS Code to the local NEX CLI for agent-driven workflows.
  • Editor-Aware Actions: Run NEX agents against the active file in the editor.
  • One-Click Commands: Start, stop, and inspect the NEX background service from the Command Palette.
  • Inline Code Updates: Apply agent-generated changes directly to the open document.
  • Configurable Runtime: Configure the NEX binary, working directory, and local server port via VS Code settings.

Architecture Overview

At a high level, the integration consists of three components:

  1. VS Code Extension

    • Hosts the local background service
    • Registers editor commands
    • Manages configuration and lifecycle
  2. NEX CLI

    • Invoked by the extension to run agents
    • Connects to the local background service
  3. NEX Agents

    • Execute tool calls (file edits, analysis, waveform tools, etc.)
    • Return structured results back to the extension

This design keeps NEX as the source of truth for agent behavior, while VS Code focuses on presentation and file integration.

Installation

Install the NEX VS Code extension using one of the following methods:

  • From the VS Code Marketplace (search for "NEX")
  • By installing a local .vsix package (for development builds)

Once installed, reload VS Code to activate the extension.

Configuration

The extension exposes a small set of settings under the nex-vscode namespace.

Setting Description Default
nex-vscode.serverPort Port used by the local background service 3000
nex-vscode.nexBinaryPrefix Optional command prefix before nex (for example, uv run); empty runs nex directly ""
nex-vscode.nexBinaryDir Working directory for the NEX binary ""

These can be edited from Settings → Extensions → NEX or directly in settings.json.

Commands

All NEX commands are available from the Command Palette (Ctrl+Shift+P / Cmd+Shift+P).

NEX: Start MCP Server

Starts the local background service. If the service is already running, NEX will display a warning.

NEX: Stop MCP Server

Stops the local background service if it is currently running.

NEX: Get Server Status

Displays the current status and port of the background service.

NEX: Generate Comments

Generates comments for selected code, or runs the Commentator Agent on the entire active file when there is no selection. This provides a one-click workflow for adding or improving inline documentation.

Other Editor Commands

  • NEX: Inline Edit — request changes to selected code.
  • NEX: Explain Module — explain the active module.
  • NEX: Run Linter — run the Linter Agent against the active file.
  • NEX: Add to Chat — add selected code to the NEX chat input.

Notes and Limitations

  • The background service is started automatically when the extension activates.
  • Only one service instance can run per VS Code window.
  • Generate Comments uses the surrounding file as read-only context when commenting a selection.
  • Large files may take longer to process, depending on the active model and system performance.