---
title: "Editors"
---

# Editors

Use the CLI's agent from Zed and other Agent Client Protocol editors, or from VS Code with its extension, with the same settings, rules and sessions as the terminal.

The CLI's agent can run inside other editors. Whichever way it runs, permission rules, hooks, the sandbox, the audit log and managed policy apply exactly as in the terminal.

| Editor | How | Protocol |
|---|---|---|
| Zed and other ACP clients | The editor starts `neuralinverse acp` | Agent Client Protocol over standard input and output |
| VS Code | The Neural Inverse extension runs `neuralinverse serve` locally | The CLI's [HTTP API](https://neuralinverse.com/docs/cli/sdk/#the-local-server) |
| A governing host, such as the Editor's shared agent host | The host starts `neuralinverse host` | The NI Host Protocol; see [SDK, server and embedding](https://neuralinverse.com/docs/cli/sdk/#embedding-in-a-governing-host) |

The Neural Inverse Editor and Agents app have their own agents; see [the Editor](https://neuralinverse.com/docs/editor/) and [the Agents app](https://neuralinverse.com/docs/agents-app/).

## Zed

Add an agent server to Zed's `settings.json`:

```json
{
  "agent_servers": {
    "Neural Inverse": {
      "command": "neuralinverse",
      "args": ["acp"],
      "env": {}
    }
  }
}
```

Open the Agent panel, start a new thread and pick **Neural Inverse**. Global flags work in `args`, for example `["acp", "--model", "openai/gpt-5", "--mode", "auto-edit"]`. Provider keys come from the environment Zed was started with, the `env` map, or your settings files. If `neuralinverse` is not on Zed's `PATH`, use its absolute path (`which neuralinverse`).

## Other ACP clients

Configure the command `neuralinverse` with the argument `acp`. Diagnostics go to standard error; add `--verbose` to see them.

### What is supported

| ACP feature | Behaviour |
|---|---|
| `initialize` | Protocol version 1; `loadSession`; prompt images and embedded context; HTTP and SSE MCP servers |
| `session/new` | Starts a session in the client's working folder with your settings. MCP servers sent by the client are added to (and override same-named) configured servers, unless managed policy locks `mcpServers` |
| `session/load` | Resumes a saved session and replays it |
| `session/prompt` | Text, images, `resource` and `resource_link` blocks |
| `session/update` | Message and thought chunks, tool calls and updates (diffs for edits, live command output), `plan`, `current_mode_update` |
| `session/cancel` | Stops the running prompt |
| `session/request_permission` | Allow once, always allow (session rule), reject, always reject (session deny rule) |
| `session/set_mode` | `ask`, `auto-edit`, `read-only` (plan), `full-auto` (hidden when policy disables it) |
| `fs/read_text_file`, `fs/write_text_file` | Used when the client offers them: the file tools read the editor's buffer (including unsaved changes) and write through the editor |

Stop reasons: `end_turn`, `max_tokens`, `max_turn_requests` (turn or budget limit), `refusal`, `cancelled`; provider failures are returned as errors. Tool calls carry a kind (`read`, `edit`, `search`, `execute`, `fetch`, `think`, `other`), a title, the files they touch and the raw input. Questions from the agent and plan approvals appear in the permission dialog, each answer as a button.

Sessions are saved like terminal sessions (unless `--no-session-persistence`), so a conversation started in the editor can be continued with `neuralinverse --resume <id>`, and the other way round.

### Limitations

- No ACP terminal integration yet: commands run in the agent's own shell, and their output is streamed into the tool call.
- `authenticate` is accepted, but no authentication methods are offered; configure provider credentials the usual way.
- Multi-select questions are not shown in editors; the agent continues with its own judgement.

## VS Code

The Neural Inverse extension for VS Code runs the CLI locally (`neuralinverse serve`) and adds:

- a chat view in the activity bar, with streamed answers, tool calls with live output, and edits with an **Open diff** button;
- approvals in the conversation: **Approve**, **Always allow** (adds the suggested rule for the session), **Deny**, or **Deny with a reason**; questions and proposed plans get their own cards;
- model and mode pickers, a **Stop** button, and a footer with context use, tokens and cost;
- `@` to attach a workspace file, or attach the current selection;
- editor commands: Ask about selection, Add selection to chat, Explain file, Fix problems in file (sends VS Code's diagnostics), Review uncommitted changes;
- a status bar item showing whether the agent is idle, working or waiting for approval.

Files the agent edits are reloaded in open editors; unsaved editor changes are never discarded.

### Requirements and installation

- VS Code 1.90 or newer.
- The CLI with `serve --json-ready` support: `npm i -g @neuralinverse/cli`. Without a global install, the extension falls back to `npx -y @neuralinverse/cli`, which downloads it on first use.
- At least one model provider configured for the CLI; check with `neuralinverse doctor`.

The extension is built from the CLI's source folder and installed from a `.vsix` file:

```bash
cd extensions/vscode
npm install
npm run package            # writes neuralinverse.vsix
code --install-extension neuralinverse.vsix
```

### Keys

| Shortcut | Action |
|---|---|
| `Ctrl+Shift+I` / `Cmd+Shift+I` | Open the chat |
| `Ctrl+Shift+Enter` / `Cmd+Shift+Enter` | Add the editor selection to the chat |
| `Enter` / `Shift+Enter` in the chat | Send / new line |
| `Esc` in the chat while the agent works | Stop |

`Ctrl+Shift+I` replaces VS Code's default binding for that key on some platforms; change it in **Keyboard Shortcuts** if you prefer the original.

### Settings

| Setting | Default | Meaning |
|---|---|---|
| `neuralinverse.cliPath` | `""` | Path to the `neuralinverse` executable or its `.js` entry point. Empty: `neuralinverse` on `PATH`, else `npx -y @neuralinverse/cli` |
| `neuralinverse.model` | `""` | Model for new sessions. Empty: the CLI's default |
| `neuralinverse.mode` | `ask` | Permission mode for new sessions |
| `neuralinverse.autoStartServer` | `true` | Start the agent server when the chat view opens (otherwise on the first message) |
| `neuralinverse.extraArgs` | `[]` | Extra arguments for `neuralinverse serve`, for example `["--no-mcp"]` |
| `neuralinverse.chat.useEditorFont` | `false` | Show the chat in the workbench font |

Everything else (providers, permission rules, MCP servers, hooks) comes from the CLI's own settings files, exactly as in the terminal.
