nex-code 0.4.7 → 0.4.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +51 -0
- package/dist/nex-code.js +508 -495
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -466,6 +466,7 @@ Type `/` to see inline suggestions as you type. Tab completion is supported for
|
|
|
466
466
|
| `/hooks` | Show configured hooks |
|
|
467
467
|
| `/skills` | List, enable, disable skills |
|
|
468
468
|
| `/tree [depth]` | Show project file tree (default depth 3) |
|
|
469
|
+
| `/retry [--model <id>]` | Retry the last user turn; optionally switch model first (`/retry --model kimi-k2.5`) |
|
|
469
470
|
| `/undo` | Undo last file change |
|
|
470
471
|
| `/redo` | Redo last undone change |
|
|
471
472
|
| `/history` | Show file change history |
|
|
@@ -1353,6 +1354,56 @@ MCP tools appear with the `mcp_` prefix and are available to the agent alongside
|
|
|
1353
1354
|
|
|
1354
1355
|
---
|
|
1355
1356
|
|
|
1357
|
+
## MCP Servers
|
|
1358
|
+
|
|
1359
|
+
nex-code supports a dedicated `.nex/mcp.json` file (or `~/.nex/mcp.json` for global config) for
|
|
1360
|
+
connecting MCP tool servers. This format supports environment variable interpolation so you can keep
|
|
1361
|
+
API keys out of the config file.
|
|
1362
|
+
|
|
1363
|
+
```json
|
|
1364
|
+
// .nex/mcp.json
|
|
1365
|
+
{
|
|
1366
|
+
"servers": {
|
|
1367
|
+
"brave-search": {
|
|
1368
|
+
"command": "npx",
|
|
1369
|
+
"args": ["-y", "@modelcontextprotocol/server-brave-search"],
|
|
1370
|
+
"env": { "BRAVE_API_KEY": "${BRAVE_API_KEY}" }
|
|
1371
|
+
},
|
|
1372
|
+
"filesystem": {
|
|
1373
|
+
"command": "npx",
|
|
1374
|
+
"args": ["-y", "@modelcontextprotocol/server-filesystem", "/tmp"]
|
|
1375
|
+
}
|
|
1376
|
+
}
|
|
1377
|
+
}
|
|
1378
|
+
```
|
|
1379
|
+
|
|
1380
|
+
**Search order for config:** `.nex/mcp.json` → `~/.nex/mcp.json`. Override with `--mcp-config <path>`.
|
|
1381
|
+
|
|
1382
|
+
**Slash commands:**
|
|
1383
|
+
|
|
1384
|
+
```
|
|
1385
|
+
/mcp list — list connected MCP servers and their exposed tools
|
|
1386
|
+
/mcp status — show which servers are running / stopped
|
|
1387
|
+
```
|
|
1388
|
+
|
|
1389
|
+
**How it works:**
|
|
1390
|
+
|
|
1391
|
+
1. nex-code spawns each server as a child process using stdio JSON-RPC transport.
|
|
1392
|
+
2. It sends `initialize` + `tools/list` to discover available tools.
|
|
1393
|
+
3. All discovered tools are merged into the nex-code tool registry under the name `mcp_<server>_<tool>`.
|
|
1394
|
+
4. The agent can call them transparently alongside built-in tools.
|
|
1395
|
+
5. All server processes are shut down cleanly when nex-code exits.
|
|
1396
|
+
|
|
1397
|
+
**Env var interpolation:** `${VAR}` in the `env` block is replaced from `process.env` at startup so you
|
|
1398
|
+
can store the actual key in your shell environment or `.env` file:
|
|
1399
|
+
|
|
1400
|
+
```bash
|
|
1401
|
+
export BRAVE_API_KEY=my-key
|
|
1402
|
+
nex-code --mcp-config .nex/mcp.json
|
|
1403
|
+
```
|
|
1404
|
+
|
|
1405
|
+
---
|
|
1406
|
+
|
|
1356
1407
|
## Hooks
|
|
1357
1408
|
|
|
1358
1409
|
Run custom scripts on CLI events:
|