nreki 12.2.0 → 12.5.1
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/CHANGELOG.md +91 -0
- package/README.md +35 -29
- package/dist/bootstrap-root.d.ts +8 -0
- package/dist/bootstrap-root.d.ts.map +1 -0
- package/dist/bootstrap-root.js +9 -0
- package/dist/bootstrap-root.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +516 -275
- package/dist/index.js.map +1 -1
- package/dist/init/agent-detect.d.ts +28 -10
- package/dist/init/agent-detect.d.ts.map +1 -1
- package/dist/init/agent-detect.js +74 -31
- package/dist/init/agent-detect.js.map +1 -1
- package/dist/init/global-register.d.ts +61 -0
- package/dist/init/global-register.d.ts.map +1 -0
- package/dist/init/global-register.js +822 -0
- package/dist/init/global-register.js.map +1 -0
- package/dist/init/init-runner.d.ts +39 -3
- package/dist/init/init-runner.d.ts.map +1 -1
- package/dist/init/init-runner.js +254 -26
- package/dist/init/init-runner.js.map +1 -1
- package/dist/init/mcp-register.d.ts +55 -0
- package/dist/init/mcp-register.d.ts.map +1 -0
- package/dist/init/mcp-register.js +451 -0
- package/dist/init/mcp-register.js.map +1 -0
- package/dist/init/setup-ui.d.ts +70 -0
- package/dist/init/setup-ui.d.ts.map +1 -0
- package/dist/init/setup-ui.js +533 -0
- package/dist/init/setup-ui.js.map +1 -0
- package/dist/init/voyage-prompt.d.ts +85 -0
- package/dist/init/voyage-prompt.d.ts.map +1 -0
- package/dist/init/voyage-prompt.js +263 -0
- package/dist/init/voyage-prompt.js.map +1 -0
- package/dist/project-root.d.ts +73 -0
- package/dist/project-root.d.ts.map +1 -0
- package/dist/project-root.js +233 -0
- package/dist/project-root.js.map +1 -0
- package/dist/search/voyage.d.ts +2 -1
- package/dist/search/voyage.d.ts.map +1 -1
- package/dist/search/voyage.js +5 -2
- package/dist/search/voyage.js.map +1 -1
- package/dist/utils/voyage-key.d.ts +32 -0
- package/dist/utils/voyage-key.d.ts.map +1 -0
- package/dist/utils/voyage-key.js +89 -0
- package/dist/utils/voyage-key.js.map +1 -0
- package/package.json +2 -9
- package/scripts/download-wasm.js +5 -1
- package/src/bootstrap-root.ts +10 -0
- package/src/index.ts +516 -272
- package/src/init/agent-detect.ts +120 -72
- package/src/init/global-register.ts +862 -0
- package/src/init/init-runner.ts +254 -27
- package/src/init/mcp-register.ts +474 -0
- package/src/init/setup-ui.ts +588 -0
- package/src/init/voyage-prompt.ts +316 -0
- package/src/project-root.ts +245 -0
- package/src/search/voyage.ts +5 -2
- package/src/utils/voyage-key.ts +89 -0
- package/templates/voyage-key-dialog.ps1 +83 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,96 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [12.5.1] - 2026-11-27
|
|
4
|
+
|
|
5
|
+
12.5.0 was tagged on GitHub but never published to npm: CI failed on all 9 jobs (the full suite had not been run). Found by reviewing it:
|
|
6
|
+
|
|
7
|
+
- **The file watcher starts after the MCP handshake again.** 12.5.0's per-workspace runtime started it before `server.connect`, which the v11.2.1 guard test caught on every OS. `bootLive` now writes the session marker and upgrades the hook; the new `startBackground` starts the watcher and the WASM preload once the transport is connected.
|
|
8
|
+
- **A global server recognizes host folders reached through a link.** On macOS the temp folder is `/var/…` for `HOME` and `/private/var/…` for `process.cwd()`, so 12.5.0 took the Antigravity plugin folder for a project and wrote `.nreki/` into it (macOS CI). Folders are now compared with their links resolved.
|
|
9
|
+
- **`project_root` can no longer point NREKI at any folder.** The workspace folder bounds every read and write NREKI makes (safePath), and in 12.5.0 any tool call could rebind it to any existing folder: the home folder (NREKI then watched all of it), `~/.claude` (its hooks run code), `~/.ssh`, or a drive root. Now a folder inside the current workspace keeps it; with MCP roots it must be inside one of them; a server pinned by `NREKI_PROJECT_ROOT` or started in a project (a folder with `.git`, `package.json`, `tsconfig.json`…) cannot leave it; only a host that gave no folder (Antigravity's global plugin) lets `project_root` choose, and never the home folder, a folder above it, a hidden folder in it, a drive root or a system folder. The same list keeps a server started in `/`, `C:\` or `Program Files` from binding there.
|
|
10
|
+
- **`deinit --global` keeps your own hooks.** `init` adds NREKI's command to a PreToolUse matcher you already had in `~/.claude/settings.json` (your own `Edit` hook, say); 12.5.0's `deinit --global` deleted that whole matcher, your hook included. It now removes NREKI's command only.
|
|
11
|
+
- **`--no-prompt` no longer changes the install scope.** In 12.5.0 it also turned the user-scope install into a project install; `--prompt`/`--no-prompt` now only decide whether the Voyage box opens.
|
|
12
|
+
- **`npx nreki key` leaves the folder it runs in alone** (it migrated that folder's `.mcp.json` entry).
|
|
13
|
+
- **Switching workspace stops the old one's gopls/pyright** (they kept running until the process exited), and a tool call waits for a `roots/list_changed` switch in flight instead of running in the workspace being closed.
|
|
14
|
+
- Note: Cursor does not load `~/.cursor/rules/*.mdc` as global rules (forum reports; its global rules live in Settings › Rules), so in Cursor the first NREKI call may answer with the `project_root` hint.
|
|
15
|
+
|
|
16
|
+
## [12.5.0] - 2026-11-27
|
|
17
|
+
|
|
18
|
+
- **Zero-approval global install (`npx nreki init`).** In an interactive terminal (including Git Bash on Windows), `npx nreki init` now registers NREKI at **user scope** across Claude Code (`~/.claude.json` + `~/.claude/`), Antigravity (`~/.gemini/config/plugins/nreki/`), Cursor (`~/.cursor/mcp.json` + `~/.cursor/rules/nreki.mdc`), Codex (`~/.codex/config.toml` + `~/.codex/AGENTS.md`), and VS Code (`Code/User/mcp.json` when installed), migrating away stale NREKI `.mcp.json` project entries while preserving other servers. `--project` keeps repo-scoped installs, and `npx nreki deinit --global` removes user-scoped registrations cleanly.
|
|
19
|
+
- **Local browser Voyage setup card (`127.0.0.1`) + `npx nreki key`.** `init` opens a token-protected local setup card in the user's browser on Windows, macOS, and Linux with inline Voyage API key verification (`~/.nreki/voyage.key`), falling back automatically to the Windows dialog or hidden terminal prompt when no browser opens.
|
|
20
|
+
- **Dynamic workspace binding for global MCP servers.** Global servers stay idle when started in a host config directory (`~/.gemini/config/plugins/nreki`, `~`, etc.) without polluting it, and bind to the open project via MCP `roots/list` (`notifications/roots/list_changed`), `project_root`, or absolute file paths.
|
|
21
|
+
- **Standalone `npm install nreki`.** `typescript` is now bundled in `dependencies` instead of a strict `peerDependencies` constraint so `npm i nreki` and `npm i -g nreki` succeed across Python, Go, C++, JS, and global installs.
|
|
22
|
+
|
|
23
|
+
## [12.4.1] - 2026-11-26
|
|
24
|
+
|
|
25
|
+
- **The Voyage box opens visibly on Windows.** In 12.4.0 (tagged, never published to npm) it opened invisible: `spawnSync`'s `windowsHide` sets `SW_HIDE` in the child's startup info, and Windows applies it to the first window the child shows, here the box itself. UI Automation found no window for the dialog process, so `init` waited for an answer nobody could give.
|
|
26
|
+
- The box now starts without `windowsHide`. Run from a terminal, PowerShell shares the terminal's console.
|
|
27
|
+
- The script spends the first `ShowWindow` call on an invisible throwaway form, so a launcher's `SW_HIDE` can never hide the box.
|
|
28
|
+
- Checked end to end with UI Automation and `BM_CLICK` / `WM_SETTEXT`, with no keyboard input: a visible window in Spanish; "Sin Voyage" returns `local`; a typed key comes back whole.
|
|
29
|
+
|
|
30
|
+
## [12.4.0] - 2026-11-26
|
|
31
|
+
|
|
32
|
+
`npx nreki init` asks for the Voyage API key in a box, and CI is green again on every OS and Node version.
|
|
33
|
+
|
|
34
|
+
- **The Voyage box.** In an interactive terminal, `init` shows a box for the Voyage API key: on Windows a small window with a masked field, elsewhere a hidden prompt in the terminal.
|
|
35
|
+
- Before saving a typed key, `init` checks it with one tiny Voyage request. A rejected key asks again, up to three times.
|
|
36
|
+
- The key is saved outside every project in `~/.nreki/voyage.key`, next to the trust key: mode 0600, written to a fresh temp file and renamed, never through a link.
|
|
37
|
+
- Accepting turns Voyage on in this project's registrations (`NREKI_SEMANTIC=voyage`). "No Voyage" turns it off. Closing the box changes nothing.
|
|
38
|
+
- With a key already set, an empty field uses it.
|
|
39
|
+
- On Windows, an existing user variable `NREKI_VOYAGE_API_KEY` is updated to the new key, so it cannot shadow it. Elsewhere `init` warns when an environment variable holds a different key.
|
|
40
|
+
- The box speaks Spanish on a Spanish system.
|
|
41
|
+
- It never appears when `init` runs without a terminal (as an agent runs it), under `CI`, with `--dry-run`, `--no-mcp`, `--no-voyage`, or the new `--no-prompt`.
|
|
42
|
+
- **NREKI reads the saved key** when no environment variable holds one: `NREKI_VOYAGE_API_KEY`, then `VOYAGE_API_KEY`, then `~/.nreki/voyage.key`. A host that forwards only some variables (Codex) still gets the key. A key alone never turns Voyage on: the project still opts in with `NREKI_SEMANTIC=voyage`.
|
|
43
|
+
- **Session marker removed before the native-edit endpoint closes.** A reader never finds a marker pointing at a closed endpoint. This also fixes a race in the built-server test, which failed on slow Linux CI runners.
|
|
44
|
+
- **CI:**
|
|
45
|
+
- Each failed test becomes a GitHub annotation (`scripts/ci-test-report.mjs`); annotations are readable without signing in, unlike job logs. That is how the two failures of 12.3.0 were found:
|
|
46
|
+
- On Windows, the `NREKI_PROJECT_ROOT` server test started the server through `tsx`. A child process outlived the client and kept the project folder locked (`EBUSY`). The test now starts the built server, waits for it to exit, and retries removing the folder while Windows still holds it: on Node 20/22 the synchronous `fs.rmSync` does not retry `EBUSY` at all, whatever `maxRetries` says; Node 24 does.
|
|
47
|
+
- On Linux, the race above.
|
|
48
|
+
- `actions/checkout@v5` and `actions/setup-node@v5`.
|
|
49
|
+
- Node 24 no longer runs as `continue-on-error`, which reported its failures as green.
|
|
50
|
+
- `npm run typecheck:tests` runs in CI.
|
|
51
|
+
|
|
52
|
+
Tests: `tests/voyage-key-prompt.test.ts`. One test checks that `init` run without a terminal never shows the box.
|
|
53
|
+
|
|
54
|
+
## [12.3.0] - 2026-11-26
|
|
55
|
+
|
|
56
|
+
`npx nreki init` now installs NREKI in one command: it writes each agent's instructions and registers NREKI as that agent's MCP server, with the project folder pinned.
|
|
57
|
+
|
|
58
|
+
Why the folder has to be pinned. NREKI indexes the folder it starts in, and on 2026-11-26 a probe MCP server measured where hosts start servers:
|
|
59
|
+
- Antigravity IDE 2.9.0 starts a global plugin's server in the plugin's own folder (`~/.gemini/config/plugins/<name>`), so NREKI would have indexed the wrong folder.
|
|
60
|
+
- It starts a workspace `.agents/mcp_config.json` server in the project.
|
|
61
|
+
- It expands none of `${workspaceFolder}`, `${WORKSPACE_ROOT}` or `${PWD}`, and it does not offer MCP roots.
|
|
62
|
+
|
|
63
|
+
Changes:
|
|
64
|
+
- **`NREKI_PROJECT_ROOT`.** When set to an existing absolute folder, the server switches to it before any module reads `process.cwd()` (`src/bootstrap-root.ts` is the first import of `index.ts`). An unexpanded `${…}`, a relative path or a missing folder is ignored with a stderr warning.
|
|
65
|
+
- **`init` registers the MCP server**:
|
|
66
|
+
- Claude Code: `.mcp.json`.
|
|
67
|
+
- Codex: `.codex/config.toml`, with `cwd`, `startup_timeout_sec = 120` (the first `npx` download took 25 s; Codex's default is 10 s) and `env_vars` forwarding the Voyage key.
|
|
68
|
+
- Antigravity: `.agents/mcp_config.json`.
|
|
69
|
+
- Cursor: `.cursor/mcp.json`, with an absolute `NREKI_PROJECT_ROOT`.
|
|
70
|
+
- VS Code/Copilot: `.vscode/mcp.json`, with `NREKI_PROJECT_ROOT=${workspaceFolder}`.
|
|
71
|
+
- Every entry pins `nreki@<version>`. On Windows it launches through `cmd /c npx`.
|
|
72
|
+
- **Updates and refusals.**
|
|
73
|
+
- Re-running `init` updates NREKI's own entry to the new version and keeps fields the user added.
|
|
74
|
+
- An entry named `nreki` that NREKI did not write is left alone unless `--force`.
|
|
75
|
+
- A JSON file with comments, or a Codex inline-table definition, is never rewritten: `init` prints the entry to add by hand.
|
|
76
|
+
- Nothing is written through a linked folder.
|
|
77
|
+
- **Agent selection.**
|
|
78
|
+
- `init` installs for every agent configured in the project. `codex` (`.codex/`) and `antigravity` (`.agents/mcp_config.json`, `.agents/rules/`, `GEMINI.md`) are new agents. Before, only the first agent detected was installed.
|
|
79
|
+
- Without project signals, it installs for the agents found in the home folder (`~/.claude`, `~/.codex`, `~/.gemini/antigravity`, `~/.cursor`), then falls back to `AGENTS.md`.
|
|
80
|
+
- `--agent` takes a comma list.
|
|
81
|
+
- Codex and Antigravity share the `AGENTS.md` block: Antigravity loads a root `AGENTS.md` as an always-on rule.
|
|
82
|
+
- **New flags:** `--voyage` / `--no-voyage` set or remove `NREKI_SEMANTIC=voyage` in the registrations. `--no-mcp` writes the instructions only. `init` ends with the steps left in each agent (approve the server in Claude Code, trust the folder in Codex, Refresh in Antigravity).
|
|
83
|
+
- **`deinit`** also removes the MCP entries NREKI wrote, and deletes a config file that held nothing else and the folders left empty.
|
|
84
|
+
- **`deinit` bugs fixed (found while testing this release):**
|
|
85
|
+
- In `CLAUDE.md` it cut from `# NREKI ACTIVE` to the end of the file. That dropped the user's text after the block and left the `<!-- nreki:begin -->` sentinel behind.
|
|
86
|
+
- It looked for an `AGENTS.md` header that the template stopped using in v12.1, so it never removed that block.
|
|
87
|
+
- It left `.claude/skills/nreki-optimizer/SKILL.md`, `.cursor/rules/nreki.mdc`, `.clinerules/nreki.md` and the `.github/copilot-instructions.md` block behind.
|
|
88
|
+
- Now it removes exactly the block `init` wrote, recognizing both the sentinels and the legacy headers.
|
|
89
|
+
- It deletes `.claude/settings.json` when only NREKI's hooks were in it.
|
|
90
|
+
- Measured on a project with all five agents installed: the old `deinit` left 13 files; the new one leaves only the user's.
|
|
91
|
+
|
|
92
|
+
Tests: `tests/init-mcp-register.test.ts`. One of them starts the real server from an empty folder with `NREKI_PROJECT_ROOT` pointing at a project and finds a symbol there. Without the bootstrap import, that test and the import-order test fail.
|
|
93
|
+
|
|
3
94
|
## [12.2.0] - 2026-11-26
|
|
4
95
|
|
|
5
96
|
- The npm package is renamed to `nreki` (unscoped). Releases up to 12.0.0 were published as `@ruso-0/nreki`. `npx nreki` replaces `npx @ruso-0/nreki` in the README, the CLI help and the `trust-db` hints; the `nreki` bin name is unchanged.
|
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
<p align="center">
|
|
4
4
|
<img src="https://img.shields.io/npm/v/nreki?style=for-the-badge&color=blue" alt="npm version">
|
|
5
|
-
<img src="https://img.shields.io/badge/Tests-
|
|
5
|
+
<img src="https://img.shields.io/badge/Tests-1873-brightgreen?style=for-the-badge" alt="1873 Tests">
|
|
6
6
|
<img src="https://img.shields.io/badge/AHI-9.7%2F10-brightgreen?style=for-the-badge" alt="AHI 9.7/10">
|
|
7
7
|
<img src="https://img.shields.io/badge/Languages-TS%20%7C%20JS%20%7C%20Go%20%7C%20Python%20%7C%20Kotlin%20%7C%20Java%20%7C%20C%2B%2B-blue?style=for-the-badge" alt="Multi-language">
|
|
8
8
|
<img src="https://img.shields.io/badge/Cloud-Zero-orange?style=for-the-badge" alt="Zero Cloud by default">
|
|
@@ -11,6 +11,12 @@
|
|
|
11
11
|
|
|
12
12
|
**MCP plugin that validates AI agent edits in RAM before they touch disk.** When Claude Code, Cursor, or Copilot changes a function signature in one file and breaks 30 others, NREKI catches it in milliseconds - the file is never written. If the error is structural (missing import, forgotten `await`), NREKI auto-fixes it in RAM. Zero tokens wasted on fix-retry doom loops.
|
|
13
13
|
|
|
14
|
+
**v12.5 — one install per user + a Voyage setup card.** Run `npx nreki init` in a terminal: a local setup card opens in your browser (`127.0.0.1`, falling back to the Windows dialog or a hidden terminal prompt) so you can paste and verify your Voyage API key (`~/.nreki/voyage.key`), and NREKI registers once at **user scope** for Claude Code (`~/.claude.json`), Antigravity (`~/.gemini/config/plugins/nreki/`), Cursor (`~/.cursor/mcp.json`), Codex (`~/.codex/config.toml`), and VS Code (`Code/User/mcp.json`), with no per-project `.mcp.json` approval. NREKI works in the project the agent opens: the folder it was started in, the editor's MCP roots, or, for hosts that give neither (Antigravity's global plugin; Cursor may too), the `project_root` the agent passes on its first call. A tool call can never move it outside that workspace, nor onto your home folder, a hidden folder in it, or a system folder.
|
|
15
|
+
|
|
16
|
+
**v12.4.1 — a box for the Voyage key.** `npx nreki init` asks for your Voyage API key (a small window on Windows, a hidden prompt elsewhere), checks it with Voyage, saves it outside every project (`~/.nreki/voyage.key`) and turns semantic search on for the project. It never asks when an agent runs `init`.
|
|
17
|
+
|
|
18
|
+
**v12.3.0 — one command installs NREKI.** Run `npx nreki init` in a project: it writes each agent's instructions and registers NREKI as that agent's MCP server (Claude Code, Codex, Antigravity, Cursor, VS Code/Copilot), with the project folder pinned so NREKI indexes the right code. Without agent files in the project it installs for the agents found on your computer. `--voyage` turns on semantic search. `NREKI_PROJECT_ROOT` names the project for hosts that start servers in another folder (measured: Antigravity starts a global plugin's server in the plugin folder). `npx nreki deinit` removes the registrations too.
|
|
19
|
+
|
|
14
20
|
**v12.2.0 — Spanish/hybrid recall, symbol deletion, and opt-in native edit preflight.** By default, NREKI writes its session marker without opening any local IPC socket or pipe: the Claude hook keeps large-file `Read` steering active and lets native `Edit`, `MultiEdit` and `Write` pass silently. Claude instructions (`CLAUDE.md`, `SKILL.md`, and MCP initialization) use native `Edit` for single-file changes and reserve `nreki_code action:"batch_edit"` for cross-file signature changes and renames (`AGENTS.md` keeps the `batch_edit` + checker workflow for Codex). `edit` and `batch_edit` also accept `mode:"replace"` with `new_code:""` to delete a symbol under full AST and compiler validation, and `context` / hybrid search bridges Spanish software/business terms into English on the lexical side while keeping exact names, paths and Voyage queries unchanged.
|
|
15
21
|
|
|
16
22
|
Opting in with `NREKI_NATIVE_PREFLIGHT=1` enables the Claude hook v5 authenticated local IPC preview for native `Edit`, `MultiEdit` and `Write`: accepted edits add no hook output, and rejected edits return diagnostics before the native tool writes. That opt-in preview never writes proposed code or auto-heals, restores the kernel under the same lock, enforces comment-only Anti-Sweep checks plus an opt-in-only differential TypeScript AST zero-`any` check (`batch_edit` does not enforce zero-`any` by default), and batches external watcher refreshes without redundant compiler baseline rebuilds. Declaration surface checks strip JSDoc/comments (preserving triple-slash directives) so comment-only edits report an unchanged exported API in both `batch_edit` footers and preflight, while modules containing `export *` or `export =` are never treated as purely additive so new exports cannot silently shadow re-exported names in consumers outside the active `tsconfig`. This preflight cannot make the later native write atomic with validation: use `batch_edit` for transactional multi-file writes. The hook does not intercept shell writes.
|
|
@@ -41,38 +47,38 @@ Opting in with `NREKI_NATIVE_PREFLIGHT=1` enables the Claude hook v5 authenticat
|
|
|
41
47
|
|
|
42
48
|
## Install
|
|
43
49
|
|
|
44
|
-
Since 12.2.0 the npm package is **`nreki`**. Releases up to 12.0.0 were published as `@ruso-0/nreki`; if you configured that name, replace it with `nreki` in your MCP config.
|
|
45
|
-
|
|
46
50
|
```bash
|
|
47
|
-
#
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
#
|
|
56
|
-
|
|
57
|
-
# Windows:
|
|
58
|
-
{ "mcpServers": { "nreki": { "command": "cmd", "args": ["/c", "npx", "-y", "nreki"] } } }
|
|
59
|
-
|
|
60
|
-
# Optional: agent-aware instructions install (v11.3.0+)
|
|
61
|
-
npx nreki init # auto-detect agent (Claude Code / Cursor / Cline / Copilot / generic)
|
|
62
|
-
npx nreki init --agent cursor # explicit; valid: claude, cursor, cline, copilot, generic
|
|
63
|
-
npx nreki init --dry-run # preview the plan, write nothing
|
|
64
|
-
npx nreki init --force # rewrite an existing NREKI block (your own content in the file is kept)
|
|
51
|
+
npm i -g nreki # installs NREKI, TypeScript compiler API, and Tree-sitter WASM grammars
|
|
52
|
+
npx nreki init # opens the Voyage API key setup box + installs globally for Claude, Antigravity, Cursor, Codex & VS Code
|
|
53
|
+
npx nreki key # re-open the Voyage API key setup box anytime
|
|
54
|
+
npx nreki init --project # install inside the current project folder only (.mcp.json, .codex/config.toml, etc.)
|
|
55
|
+
npx nreki init --voyage # turn Voyage semantic search on explicitly
|
|
56
|
+
npx nreki init --no-prompt # never show the Voyage key box
|
|
57
|
+
npx nreki init --agent codex,antigravity # choose specific agents (claude, codex, antigravity, cursor, cline, copilot, generic)
|
|
58
|
+
npx nreki init --dry-run # preview the plan, write nothing
|
|
59
|
+
npx nreki init --no-mcp # instructions only
|
|
60
|
+
npx nreki deinit --global # remove NREKI's global + local hooks, instructions and MCP registrations
|
|
65
61
|
```
|
|
66
62
|
|
|
67
|
-
|
|
63
|
+
In a terminal, `init` first opens a card for your Voyage API key (optional) in your browser; without a browser it falls back to a small window on Windows, a hidden prompt elsewhere. A typed key is checked with Voyage and saved in `~/.nreki/voyage.key` (outside every project, readable only by you), and Voyage is turned on in the registrations; "No Voyage" keeps local search only. With a key already set, leave the field empty to use it. NREKI reads `NREKI_VOYAGE_API_KEY`, then `VOYAGE_API_KEY`, then that file. `--no-prompt` skips the card; it does not change where NREKI is installed.
|
|
64
|
+
|
|
65
|
+
In a terminal `init` installs at user scope, as above. With `--project` (and when an agent runs `init`), it installs for every agent configured in the project. If there is none, it installs for the agents found on this computer (`~/.claude`, `~/.codex`, `~/.gemini/antigravity`, `~/.cursor`); if there is none either, it writes `AGENTS.md`. Then it prints what is left to do in each agent, such as approving the server in Claude Code or trusting the folder in Codex. Re-running it after an upgrade updates NREKI's own entries to the new version and keeps fields you added; an entry named `nreki` that NREKI did not write is left alone unless `--force`.
|
|
66
|
+
|
|
67
|
+
| Agent | Detected in the project via | Instructions | MCP registration (project folder pinned by) |
|
|
68
|
+
|---------------|-----------------------------------------------------|------------------------------------------------|-------------------------------------------------------------|
|
|
69
|
+
| `claude` | `.claude/` or `CLAUDE.md` | `CLAUDE.md` block, skill, enforcer hook, `.claude/settings.json` | `.mcp.json` (Claude Code starts it in the project) |
|
|
70
|
+
| `codex` | `.codex/` | `AGENTS.md` block | `.codex/config.toml` (`cwd`; Codex reads it only for trusted projects) |
|
|
71
|
+
| `antigravity` | `.agents/mcp_config.json`, `.agents/rules/`, `GEMINI.md` | `AGENTS.md` block (always-on rule) | `.agents/mcp_config.json` (Antigravity starts it in the project) |
|
|
72
|
+
| `cursor` | `.cursor/` or `.cursorrules` | `.cursor/rules/nreki.mdc` | `.cursor/mcp.json` (`NREKI_PROJECT_ROOT`) |
|
|
73
|
+
| `copilot` | `.github/copilot-instructions.md` | `.github/copilot-instructions.md` block | `.vscode/mcp.json` (`NREKI_PROJECT_ROOT=${workspaceFolder}`) |
|
|
74
|
+
| `cline` | `.clinerules` | `.clinerules/nreki.md` | by hand: Cline keeps MCP servers in its global settings |
|
|
75
|
+
| `generic` | none of the above | `AGENTS.md` block | by hand |
|
|
76
|
+
|
|
77
|
+
The Codex and Cursor entries hold this computer's path to the project: keep `.codex/` and `.cursor/mcp.json` out of git. On Windows every entry launches `cmd /c npx -y nreki@<version>`, because `npx` is a `.cmd` shim there.
|
|
78
|
+
|
|
79
|
+
Registering by hand works too, from the project folder: `claude mcp add nreki -- npx -y nreki` (Windows: `claude mcp add nreki -- cmd /c npx -y nreki`), or `{ "mcpServers": { "nreki": { "command": "npx", "args": ["-y", "nreki"] } } }` in an MCP client's config. If the client starts servers in another folder, add `"env": { "NREKI_PROJECT_ROOT": "<absolute project path>" }`.
|
|
68
80
|
|
|
69
|
-
|
|
70
|
-
|-----------|----------------------------------------|-----------------------------------------------------------------------|
|
|
71
|
-
| `claude` | `.claude/` or `CLAUDE.md` | `CLAUDE.md` (NREKI block), `.claude/skills/nreki-optimizer/SKILL.md`, `.claude/hooks/nreki-enforcer.mjs`, `.claude/settings.json` |
|
|
72
|
-
| `cursor` | `.cursor/` or `.cursorrules` | `.cursor/rules/nreki.mdc` (with `alwaysApply: true` frontmatter) |
|
|
73
|
-
| `cline` | `.clinerules` (file or dir) | `.clinerules/nreki.md` |
|
|
74
|
-
| `copilot` | `.github/copilot-instructions.md` | `.github/copilot-instructions.md` (appended) |
|
|
75
|
-
| `generic` | none of the above | `AGENTS.md` |
|
|
81
|
+
Since 12.2.0 the npm package is **`nreki`**. Releases up to 12.0.0 were published as `@ruso-0/nreki`; if you configured that name, run `npx nreki init` or replace it with `nreki` in your MCP config.
|
|
76
82
|
|
|
77
83
|
First MCP run indexes the project automatically in the background — `fast_grep` returns RAM-resident substring matches immediately while NREKI's semantic index warms (v11.2.1+). Zero config for TS/JS; point a `tsconfig.json` at your code and NREKI detects the right validation mode.
|
|
78
84
|
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* bootstrap-root.ts — imported FIRST by index.ts, for its side effect.
|
|
3
|
+
*
|
|
4
|
+
* ES modules evaluate their imports in order before the importing module's
|
|
5
|
+
* body, so this runs before any other NREKI module can read process.cwd().
|
|
6
|
+
*/
|
|
7
|
+
export {};
|
|
8
|
+
//# sourceMappingURL=bootstrap-root.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bootstrap-root.d.ts","sourceRoot":"","sources":["../src/bootstrap-root.ts"],"names":[],"mappings":"AAAA;;;;;GAKG"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* bootstrap-root.ts — imported FIRST by index.ts, for its side effect.
|
|
3
|
+
*
|
|
4
|
+
* ES modules evaluate their imports in order before the importing module's
|
|
5
|
+
* body, so this runs before any other NREKI module can read process.cwd().
|
|
6
|
+
*/
|
|
7
|
+
import { applyProjectRoot } from "./project-root.js";
|
|
8
|
+
applyProjectRoot();
|
|
9
|
+
//# sourceMappingURL=bootstrap-root.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bootstrap-root.js","sourceRoot":"","sources":["../src/bootstrap-root.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAErD,gBAAgB,EAAE,CAAC"}
|
package/dist/index.d.ts
CHANGED
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA;;;;;;;;;;;;;;;GAeG;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA;;;;;;;;;;;;;;;GAeG;AAGH,OAAO,qBAAqB,CAAC;AA6D7B,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,QAAQ,GAAG,MAAM,GAAG,SAAS,GAAG,UAAU,CAElF"}
|