@niroai/niro 0.17.0 → 0.18.0
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 +136 -0
- package/README.md +123 -302
- package/bin/niro.js +12 -1
- package/docs/agent-antigravity.md +37 -0
- package/docs/agent-claude-code.md +48 -0
- package/docs/agent-claude-desktop.md +47 -0
- package/docs/agent-cline.md +42 -0
- package/docs/agent-codex.md +45 -0
- package/docs/agent-copilot-cli.md +42 -0
- package/docs/agent-cursor.md +44 -0
- package/docs/agent-factory.md +42 -0
- package/docs/agent-gemini-cli.md +42 -0
- package/docs/agent-goose.md +42 -0
- package/docs/agent-kiro.md +37 -0
- package/docs/agent-opencode.md +37 -0
- package/docs/agent-vscode.md +45 -0
- package/docs/agent-windsurf.md +38 -0
- package/docs/answer-shapes.md +69 -0
- package/docs/builds-and-updates.md +68 -0
- package/docs/cloud-README.md +372 -0
- package/docs/configuring-a-folder.md +51 -0
- package/docs/connect-ci.md +24 -0
- package/docs/connect-overview.md +20 -0
- package/docs/connect-review-bots.md +17 -0
- package/docs/connect-team-server.md +12 -0
- package/docs/connect-terminal.md +49 -0
- package/docs/connect-web-agents.md +9 -0
- package/docs/connect-your-ai-assistant.md +59 -175
- package/docs/coverage-audit-and-consent.md +51 -0
- package/docs/evaluate-what-niro-did.md +271 -0
- package/docs/faq-assistants-and-mcp.md +122 -0
- package/docs/faq-feedback-and-receipts.md +33 -0
- package/docs/faq-indexing.md +127 -0
- package/docs/faq-install-and-setup.md +103 -0
- package/docs/faq-licence-and-plans.md +86 -0
- package/docs/faq-login-and-account.md +69 -0
- package/docs/faq-offline.md +34 -0
- package/docs/faq-performance.md +33 -0
- package/docs/faq-privacy-and-security.md +113 -0
- package/docs/faq-uninstall.md +47 -0
- package/docs/faq-updates.md +59 -0
- package/docs/faq-worktrees-and-branches.md +59 -0
- package/docs/faq-wrong-or-missing-answers.md +275 -0
- package/docs/hosted-only.md +33 -0
- package/docs/how-the-graph-works.md +47 -0
- package/docs/index.md +157 -0
- package/docs/licence-and-plans.md +72 -0
- package/docs/lifecycle-debug.md +48 -0
- package/docs/lifecycle-onboarding.md +32 -0
- package/docs/lifecycle-overview.md +77 -0
- package/docs/lifecycle-plan-and-design.md +44 -0
- package/docs/lifecycle-review.md +30 -0
- package/docs/lifecycle-security-and-privacy.md +35 -0
- package/docs/lifecycle-test.md +28 -0
- package/docs/lifecycle-write-code.md +35 -0
- package/docs/llms-full.txt +8015 -0
- package/docs/llms.txt +126 -0
- package/docs/playbook-add-a-feature.md +108 -0
- package/docs/playbook-change-safely.md +93 -0
- package/docs/playbook-data-and-events.md +107 -0
- package/docs/playbook-debug-after-a-change.md +96 -0
- package/docs/playbook-debug-config.md +95 -0
- package/docs/playbook-debug-exception.md +124 -0
- package/docs/playbook-debug-failing-service-call.md +119 -0
- package/docs/playbook-debug-slow-path.md +80 -0
- package/docs/playbook-debug-wrong-value.md +137 -0
- package/docs/playbook-onboard.md +95 -0
- package/docs/playbook-review-a-change.md +72 -0
- package/docs/playbook-test-a-change.md +73 -0
- package/docs/reference-cli.md +113 -0
- package/docs/reference-config-files.md +42 -0
- package/docs/reference-engine-commands.md +56 -0
- package/docs/reference-environment-variables.md +89 -0
- package/docs/reference-exit-codes.md +67 -0
- package/docs/reference-limits.md +75 -0
- package/docs/reference-mcp-tools.md +326 -0
- package/docs/reference-messages.md +180 -0
- package/docs/secrets-and-masking.md +48 -0
- package/docs/supported-c.md +130 -0
- package/docs/supported-cpp.md +157 -0
- package/docs/supported-csharp.md +211 -0
- package/docs/supported-go.md +258 -0
- package/docs/supported-java.md +226 -0
- package/docs/supported-javascript.md +223 -0
- package/docs/supported-kotlin.md +124 -0
- package/docs/supported-overview.md +89 -0
- package/docs/supported-php.md +157 -0
- package/docs/supported-python.md +224 -0
- package/docs/supported-ruby.md +162 -0
- package/docs/supported-rust.md +150 -0
- package/docs/supported-swift.md +133 -0
- package/docs/supported-typescript.md +220 -0
- package/docs/tokens-speed-and-accuracy.md +99 -0
- package/docs/troubleshooting.md +42 -0
- package/docs/uninstall.md +74 -0
- package/docs/what-leaves-your-machine.md +71 -0
- package/docs/where-things-are-stored.md +59 -0
- package/docs/worktrees-and-branches.md +55 -0
- package/package.json +5 -3
- package/src/commands/add-repo.js +5 -0
- package/src/commands/auditSend.js +67 -0
- package/src/commands/build.js +6 -0
- package/src/commands/docsSend.js +73 -0
- package/src/commands/engine.js +120 -0
- package/src/commands/engineRoutes.js +105 -0
- package/src/commands/guide.js +254 -0
- package/src/commands/init.js +6 -2
- package/src/commands/initLocal.js +96 -0
- package/src/commands/journalSend.js +47 -0
- package/src/commands/login.js +89 -12
- package/src/commands/mcp.js +22 -6
- package/src/commands/plan.js +99 -0
- package/src/commands/repoPush.js +33 -0
- package/src/commands/requestIntegration.js +38 -0
- package/src/commands/share.js +56 -0
- package/src/commands/start.js +451 -371
- package/src/commands/status.js +57 -0
- package/src/commands/takeover.js +6 -0
- package/src/commands/uninstall.js +180 -0
- package/src/commands/upgrade.js +38 -8
- package/src/commands/watch.js +420 -6
- package/src/index.js +174 -3
- package/src/lib/agentApi.js +32 -1
- package/src/lib/api.js +20 -6
- package/src/lib/auditUpload.js +293 -0
- package/src/lib/branchDrift.js +149 -0
- package/src/lib/choose.js +116 -0
- package/src/lib/cloudGuard.js +74 -0
- package/src/lib/credentials.js +2 -2
- package/src/lib/docsMarked.js +55 -0
- package/src/lib/docsState.js +213 -0
- package/src/lib/docsUpload.js +481 -0
- package/src/lib/engine.js +619 -0
- package/src/lib/folderSync.js +2 -1
- package/src/lib/graphCheck.js +40 -0
- package/src/lib/guide.js +293 -0
- package/src/lib/guideSearch.js +252 -0
- package/src/lib/integrationRequest.js +89 -0
- package/src/lib/journalUpload.js +147 -0
- package/src/lib/languages.js +129 -0
- package/src/lib/lease.js +375 -0
- package/src/lib/localBuild.js +285 -0
- package/src/lib/localEngine.js +210 -0
- package/src/lib/localOnboard.js +124 -0
- package/src/lib/localWorktrees.js +243 -0
- package/src/lib/machineCheck.js +58 -0
- package/src/lib/mcpClients.js +10 -1
- package/src/lib/migrationNotice.js +118 -0
- package/src/lib/modelFetch.js +153 -0
- package/src/lib/nestedOutput.js +23 -9
- package/src/lib/onboardingLog.js +34 -0
- package/src/lib/planUsage.js +165 -0
- package/src/lib/progressBar.js +46 -0
- package/src/lib/prompt.js +1 -1
- package/src/lib/redact.js +155 -0
- package/src/lib/release.js +33 -0
- package/src/lib/repoPush.js +495 -0
- package/src/lib/secret.js +1 -1
- package/src/lib/service.js +372 -63
- package/src/lib/shareCode.js +367 -0
- package/src/lib/shareExclusions.js +114 -0
- package/src/lib/shareFiles.js +129 -0
- package/src/lib/spinner.js +9 -5
- package/src/lib/watchDaemon.js +33 -10
- package/src/lib/watchState.js +12 -1
- package/src/lib/windowsPaths.js +67 -0
- package/src/mcp/lineCheck.js +382 -0
- package/src/mcp/lineName.js +92 -0
- package/src/mcp/localBackend.js +751 -0
- package/src/mcp/localMode.js +383 -0
- package/src/mcp/localSkill.js +189 -0
- package/src/mcp/server.js +610 -79
- package/src/mcp/setup.js +519 -131
- package/src/mcp/shellSearchHook.js +509 -0
- package/src/mcp/teardown.js +173 -91
- package/src/mcp/usingNiro.js +39 -0
- package/docs/working-on-branches.md +0 -162
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# Use Niro from the terminal
|
|
2
|
+
|
|
3
|
+
**You do not need a coding agent to use Niro.** Every question an agent can ask, you can ask from the shell.
|
|
4
|
+
|
|
5
|
+
## Ask the graph a question
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
niro ask
|
|
9
|
+
niro ask find_api_endpoints
|
|
10
|
+
niro ask get_reverse_call_chain method_fqn=InvoiceService.send depth=2
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
- With no tool named, `niro ask` lists the tools.
|
|
14
|
+
- With a tool, it takes inputs as `key=value` and prints the same answer an agent would get.
|
|
15
|
+
- `niro ask --help` shows more.
|
|
16
|
+
- The tools and their inputs are in [reference-mcp-tools.md](reference-mcp-tools.md).
|
|
17
|
+
<!-- source: src/commands/engineRoutes.js:28 ("Ask one graph tool from the shell and print its answer (no tool: list them)") -->
|
|
18
|
+
|
|
19
|
+
`niro ask` answers for the folder you run it in. To ask about another folder, `cd` there first.
|
|
20
|
+
<!-- source: niro-local src/niro_local/cli.py:2706-2707 (_cmd_ask: "One MCP tool's answer, printed, for this folder") -->
|
|
21
|
+
|
|
22
|
+
`niro ask` needs your sign-in, because it uses the licence. See [licence-and-plans.md](licence-and-plans.md).
|
|
23
|
+
<!-- source: src/commands/engineRoutes.js:28 (third field true: needs the licence) -->
|
|
24
|
+
|
|
25
|
+
## See the graph in a browser
|
|
26
|
+
|
|
27
|
+
```
|
|
28
|
+
niro ui
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
- **What it shows:** a page that draws the folder's graph. You can switch kinds of nodes and links on and off.
|
|
32
|
+
- **Where it runs:** at 127.0.0.1, on port 8601 by default. 127.0.0.1 means this computer only, so nothing else on your network can reach it.
|
|
33
|
+
- **What it can do:** only read. It changes nothing.
|
|
34
|
+
- **How to stop it:** it runs until you press Ctrl-C.
|
|
35
|
+
<!-- source: src/commands/engineRoutes.js:29; niro-local src/niro_local/ui/server.py:35-36; niro-local CLAUDE.md (2026-10-08 amendment: read-only, 127.0.0.1 only) -->
|
|
36
|
+
|
|
37
|
+
## Other everyday commands
|
|
38
|
+
|
|
39
|
+
| Command | What it does |
|
|
40
|
+
|---|---|
|
|
41
|
+
| `niro status` | Shows this folder's project, when the graph was last built, your plan, sharing, your agent and the background updates |
|
|
42
|
+
| `niro plan` | Shows your plan and how many lines are indexed |
|
|
43
|
+
| `niro build` | Rebuilds this folder's graph now |
|
|
44
|
+
| `niro modules` | Lists the folders inside this one that are separate services |
|
|
45
|
+
| `niro projects` | Lists every project on this computer and its folders |
|
|
46
|
+
|
|
47
|
+
<!-- source: src/index.js:77-86 (plan), :503-516 (status), :517-527 (build); src/commands/status.js:76-88 (status fields); src/commands/engineRoutes.js:34, :45 -->
|
|
48
|
+
|
|
49
|
+
Every command is listed in [reference-cli.md](reference-cli.md) and [reference-engine-commands.md](reference-engine-commands.md).
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# Agents in a web browser
|
|
2
|
+
|
|
3
|
+
**Agents in a web browser, such as Claude or ChatGPT on their websites, cannot use the local graph in a release yet. For web agents, use hosted Niro** (see [hosted-only.md](hosted-only.md)).
|
|
4
|
+
|
|
5
|
+
**Why:**
|
|
6
|
+
|
|
7
|
+
- **No licence.** A web agent would need the engine to answer over the network. The engine can do that, but a released engine gets its licence only from niro-cli, through a channel that exists only when niro-cli starts the engine itself. Served over the network, every tool answers "The Niro CLI has not handed this engine its licence yet." and then refuses.
|
|
8
|
+
- **No password or key.** The engine's network mode has no authentication: anyone who can reach the port could read the structure of your code. If it is started on an address other than this computer, it warns: "anything that can reach this port can read this graph."
|
|
9
|
+
<!-- source: niro-local src/niro_local/cli.py:2622-2637 (docstring: no authentication; a released engine still needs a licence, which arrives on pipes a spawned child gets), :1368 (LEASE_PENDING), :2653-2679, :2687-2693 (warning) -->
|
|
@@ -1,206 +1,90 @@
|
|
|
1
|
-
# Connect your
|
|
1
|
+
# Connect your coding agent to Niro
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
drive setup from chat instead of a terminal, see [Scenario 2](../README.md#scenario-2--onboard-a-folder-youre-working-in)
|
|
6
|
-
in the main README — the `niro-cli` skill can run these commands for you.
|
|
3
|
+
**`niro mcp install` connects your coding agents to Niro.** `niro start` runs it for you at the end of setup. Run it yourself to connect another agent later.
|
|
4
|
+
<!-- source: src/commands/start.js:61 (the "assistant" step); src/index.js:432-438 -->
|
|
7
5
|
|
|
8
6
|
## Before you start
|
|
9
7
|
|
|
10
|
-
```bash
|
|
11
|
-
npm install -g @niroai/niro
|
|
12
|
-
niro login # browser device flow — no API key to copy
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
After `niro login`, none of the commands below need an API key — the MCP server authenticates
|
|
16
|
-
with your device token. If you'd rather use an API key instead (e.g. a headless CI box), get
|
|
17
|
-
one from **console.niroai.dev > Settings > Account**; the wizard will ask for it when no
|
|
18
|
-
`niro login` session is found.
|
|
19
|
-
|
|
20
|
-
**Pointing at a different backend?** Every command below defaults to Niro's cloud
|
|
21
|
-
(`https://aiassistant.niroai.dev`). Add `--url <your-backend-url>` to any `niro mcp install`
|
|
22
|
-
command to use a self-hosted or dedicated instance instead (or set `NIRO_MCP_SERVER_URL`).
|
|
23
|
-
|
|
24
|
-
## All Niro tools are read-only
|
|
25
|
-
|
|
26
|
-
Every tool Niro exposes over MCP only *reads* your code graph — none can modify your code,
|
|
27
|
-
your projects, or anything else. That's why several of the installers below turn on
|
|
28
|
-
auto-approve for Niro's tools: there's nothing for a read-only tool call to break.
|
|
29
|
-
|
|
30
|
-
---
|
|
31
|
-
|
|
32
|
-
## Claude Code
|
|
33
|
-
|
|
34
|
-
```bash
|
|
35
|
-
niro mcp install --client claude-code
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
Registers the server (`claude mcp add --scope user`), adds a `PostCompact` + `UserPromptSubmit`
|
|
39
|
-
hook so Claude stays aware of Niro after context compaction, appends a short reminder to
|
|
40
|
-
`~/.claude/CLAUDE.md`, and installs the **`niro-skill`** (routes code questions through the
|
|
41
|
-
graph) and **`niro-cli`** skill (drives the CLI from chat) to `~/.claude/skills/`.
|
|
42
|
-
|
|
43
|
-
Verify: type `/mcp` inside Claude Code — `niro` should be listed as connected.
|
|
44
|
-
|
|
45
|
-
## Codex
|
|
46
|
-
|
|
47
|
-
```bash
|
|
48
|
-
niro mcp install --client codex
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-
Registers the server in `~/.codex/config.toml`, sets `default_tools_approval_mode = "auto"`
|
|
52
|
-
(safe — every niro tool is read-only), appends a reminder to `~/.codex/AGENTS.md`, and installs
|
|
53
|
-
the shared `niro-skill` + `niro-cli` skill to `~/.agents/skills/` (also read by Windsurf).
|
|
54
|
-
|
|
55
|
-
Verify: `/mcp` inside the Codex TUI.
|
|
56
|
-
|
|
57
|
-
Note that `AGENTS.md` is read once at the start of a session, so on a long task the reminder to
|
|
58
|
-
prefer niro's tools carries less weight than it does in Claude Code, where a per-tool-call hook
|
|
59
|
-
reinforces it. A per-prompt hook for Codex is in progress.
|
|
60
|
-
|
|
61
|
-
## Cursor
|
|
62
|
-
|
|
63
|
-
```bash
|
|
64
|
-
niro mcp install --client cursor
|
|
65
|
-
```
|
|
66
|
-
|
|
67
|
-
Writes `~/.cursor/mcp.json`, adds `"niro:*"` to `~/.cursor/permissions.json`'s `mcpAllowlist`
|
|
68
|
-
(so Agent doesn't ask before every tool call), and writes a project rule to
|
|
69
|
-
`.cursor/rules/niro.mdc` in the current repo.
|
|
70
|
-
|
|
71
|
-
Requires Cursor's Agent **Auto-run** mode enabled (Settings) for the allowlist to take effect —
|
|
72
|
-
"Ask every time" ignores it.
|
|
73
|
-
|
|
74
|
-
## VS Code (GitHub Copilot)
|
|
75
|
-
|
|
76
|
-
```bash
|
|
77
|
-
niro mcp install --client vscode
|
|
78
|
-
```
|
|
79
|
-
|
|
80
|
-
Writes the user-profile `mcp.json` (`servers.niro`) — the same file VS Code's
|
|
81
|
-
**MCP: Open User Configuration** command opens.
|
|
82
|
-
|
|
83
|
-
Verify: run **MCP: List Servers** from the Command Palette, or check the Chat view's tools icon.
|
|
84
|
-
First use of a new server needs a one-time trust confirmation.
|
|
85
|
-
|
|
86
|
-
## Windsurf
|
|
87
|
-
|
|
88
|
-
```bash
|
|
89
|
-
niro mcp install --client windsurf
|
|
90
8
|
```
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
`~/.codeium/windsurf/memories/global_rules.md`, and installs the shared `niro-skill` +
|
|
94
|
-
`niro-cli` skill to `~/.agents/skills/` (also read by Codex).
|
|
95
|
-
|
|
96
|
-
## Claude Desktop
|
|
97
|
-
|
|
98
|
-
```bash
|
|
99
|
-
niro mcp install --client claude-desktop
|
|
9
|
+
npm install -g @niroai/niro
|
|
10
|
+
niro start
|
|
100
11
|
```
|
|
101
12
|
|
|
102
|
-
|
|
103
|
-
|
|
13
|
+
`niro start` signs you in through your browser. **`niro mcp install` needs that sign-in.** If you signed in another way (`niro login --api-key` or `--password`), it refuses with "Not signed in. Run niro login".
|
|
14
|
+
<!-- source: src/mcp/setup.js:574-583 (hasCliToken), :2950-2955 -->
|
|
104
15
|
|
|
105
|
-
##
|
|
16
|
+
## Install
|
|
106
17
|
|
|
107
|
-
```bash
|
|
108
|
-
niro mcp install --client gemini-cli
|
|
109
18
|
```
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
Verify / reload: run `/mcp reload` inside Gemini CLI.
|
|
115
|
-
|
|
116
|
-
## GitHub Copilot CLI
|
|
117
|
-
|
|
118
|
-
```bash
|
|
119
|
-
niro mcp install --client copilot-cli
|
|
19
|
+
niro mcp install # pick from a list
|
|
20
|
+
niro mcp install --client cursor # one agent
|
|
21
|
+
niro mcp install --client codex,cursor # several
|
|
22
|
+
niro mcp install --list # see the agents it knows
|
|
120
23
|
```
|
|
24
|
+
<!-- source: src/index.js:432-438; src/mcp/setup.js:683 (--list), :3000 (the picker) -->
|
|
121
25
|
|
|
122
|
-
|
|
123
|
-
|
|
26
|
+
When it finishes, it prints one line per agent and then "Restart your AI assistant to start using Niro." **Restart the agent: it reads its settings only when it starts.**
|
|
27
|
+
<!-- source: src/mcp/setup.js:3071-3085 -->
|
|
124
28
|
|
|
125
|
-
|
|
29
|
+
## The 14 agents
|
|
126
30
|
|
|
127
|
-
|
|
31
|
+
| Agent | `--client` | Page |
|
|
32
|
+
|---|---|---|
|
|
33
|
+
| Claude Code | `claude-code` | [agent-claude-code.md](agent-claude-code.md) |
|
|
34
|
+
| Codex | `codex` | [agent-codex.md](agent-codex.md) |
|
|
35
|
+
| Claude Desktop | `claude-desktop` | [agent-claude-desktop.md](agent-claude-desktop.md) |
|
|
36
|
+
| Cursor | `cursor` | [agent-cursor.md](agent-cursor.md) |
|
|
37
|
+
| Windsurf | `windsurf` | [agent-windsurf.md](agent-windsurf.md) |
|
|
38
|
+
| VS Code (GitHub Copilot) | `vscode` | [agent-vscode.md](agent-vscode.md) |
|
|
39
|
+
| Gemini CLI | `gemini-cli` | [agent-gemini-cli.md](agent-gemini-cli.md) |
|
|
40
|
+
| GitHub Copilot CLI | `copilot-cli` | [agent-copilot-cli.md](agent-copilot-cli.md) |
|
|
41
|
+
| Factory (droid) | `factory` | [agent-factory.md](agent-factory.md) |
|
|
42
|
+
| Goose | `goose` | [agent-goose.md](agent-goose.md) |
|
|
43
|
+
| OpenCode | `opencode` | [agent-opencode.md](agent-opencode.md) |
|
|
44
|
+
| Cline | `cline` | [agent-cline.md](agent-cline.md) |
|
|
45
|
+
| Kiro | `kiro` | [agent-kiro.md](agent-kiro.md) |
|
|
46
|
+
| Antigravity | `antigravity` | [agent-antigravity.md](agent-antigravity.md) |
|
|
47
|
+
<!-- source: src/mcp/setup.js:279-414 (CLIENTS) -->
|
|
128
48
|
|
|
129
|
-
|
|
130
|
-
niro mcp install --client factory
|
|
131
|
-
```
|
|
49
|
+
## How each agent learns to use Niro
|
|
132
50
|
|
|
133
|
-
|
|
134
|
-
`~/.factory/AGENTS.md`. droid reloads automatically when the config file changes.
|
|
51
|
+
Connecting an agent gives it the tools. Whether it reaches for them first depends on what else the agent is told:
|
|
135
52
|
|
|
136
|
-
|
|
53
|
+
- **Claude Code** gets hooks: small commands Claude Code runs at fixed moments. They remind it to use Niro and show an impact check before an edit. It also gets two skills and a section in `~/.claude/CLAUDE.md`.
|
|
54
|
+
- **Codex and Windsurf** get the same two skills, in `~/.agents/skills`, plus instruction text.
|
|
55
|
+
- **Cursor, Cline, Kiro, Gemini CLI, Copilot CLI, Factory and OpenCode** get instruction text (a rule file) only.
|
|
56
|
+
- **Claude Desktop, VS Code, Goose and Antigravity** get the connection only.
|
|
57
|
+
<!-- source: src/mcp/setup.js:782-800 (Claude Code), :2393-2427 (skills in ~/.agents/skills), :2079-2100, :2436-2592 (rule and instruction files); docs/usecases/impact-gate.md:155 ("Only Claude Code has the hook") -->
|
|
137
58
|
|
|
138
|
-
|
|
139
|
-
niro mcp install --client goose
|
|
140
|
-
```
|
|
59
|
+
## All Niro tools only read
|
|
141
60
|
|
|
142
|
-
|
|
143
|
-
|
|
61
|
+
Every Niro tool reads the graph or your files, and none changes your code. One tool, `mark_task_complete`, records the summary your agent writes at the end of a task. That summary is sent to Niro with the tool-usage record (see [what-leaves-your-machine.md](what-leaves-your-machine.md)).
|
|
62
|
+
<!-- source: niro-local src/niro_local/journal/store.py:86-90, :121, :235, :270 (the report is stored in the journal); src/lib/journalUpload.js:9-37 (the journal is uploaded) -->
|
|
144
63
|
|
|
145
|
-
|
|
146
|
-
YAML block to paste in by hand instead of guessing at a risky merge.
|
|
64
|
+
Because the tools only read, some installers let them run without asking you each time:
|
|
147
65
|
|
|
148
|
-
|
|
66
|
+
- **Cursor:** `niro:*` is added to Cursor's allowlist.
|
|
67
|
+
- **Kiro:** `autoApprove: ["*"]` is set.
|
|
68
|
+
- **Codex:** `default_tools_approval_mode = "writes"` is set, so Codex asks only for tools that write.
|
|
69
|
+
<!-- source: src/mcp/setup.js:445-503 (Cursor allowlist), :382-395 (Kiro autoApprove), :2138, :2305-2318 (Codex) -->
|
|
149
70
|
|
|
150
|
-
|
|
151
|
-
niro mcp install --client opencode
|
|
152
|
-
```
|
|
71
|
+
## Other MCP clients
|
|
153
72
|
|
|
154
|
-
|
|
155
|
-
`~/.config/opencode/AGENTS.md`. Restart OpenCode after.
|
|
73
|
+
If your agent is not in the list, choose "Other (print the config)" in the picker. It prints a block like this to paste into your agent's MCP settings:
|
|
156
74
|
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
```bash
|
|
160
|
-
niro mcp install --client cline
|
|
75
|
+
```json
|
|
76
|
+
{ "mcpServers": { "niro": { "command": "niro", "args": ["mcp", "serve"] } } }
|
|
161
77
|
```
|
|
162
78
|
|
|
163
|
-
|
|
164
|
-
|
|
79
|
+
The printed block also carries the settings your setup needs. Use the printed block, not this example.
|
|
80
|
+
<!-- source: src/mcp/setup.js:658-667, :241-247 -->
|
|
165
81
|
|
|
166
|
-
##
|
|
82
|
+
## Remove Niro from an agent
|
|
167
83
|
|
|
168
|
-
```bash
|
|
169
|
-
niro mcp install --client kiro
|
|
170
84
|
```
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
read-only) and adds a global steering file at `~/.kiro/steering/niro.md`. Kiro reconnects MCP
|
|
174
|
-
servers automatically when you save the config.
|
|
175
|
-
|
|
176
|
-
## Antigravity
|
|
177
|
-
|
|
178
|
-
```bash
|
|
179
|
-
niro mcp install --client antigravity
|
|
180
|
-
```
|
|
181
|
-
|
|
182
|
-
Writes `~/.gemini/config/mcp_config.json`. Reload via **Agent Settings → Customizations →
|
|
183
|
-
Installed MCP Servers → Refresh** (or `/mcp` in the Antigravity CLI).
|
|
184
|
-
|
|
185
|
-
---
|
|
186
|
-
|
|
187
|
-
## Test it
|
|
188
|
-
|
|
189
|
-
After connecting any client, restart it (where noted above) and ask:
|
|
190
|
-
|
|
191
|
-
> "What calls `chargeCard()`? Use Niro tools."
|
|
192
|
-
> "What breaks if I change the `Invoice` schema?"
|
|
193
|
-
> "Is there existing code that parses webhooks, before I write a new one?"
|
|
194
|
-
|
|
195
|
-
If the assistant answers from the graph instead of grepping files, you're connected.
|
|
196
|
-
|
|
197
|
-
## Disconnect
|
|
198
|
-
|
|
199
|
-
```bash
|
|
200
|
-
niro mcp uninstall --client <id> # one client
|
|
201
|
-
niro mcp uninstall --all -y # every client, no confirm
|
|
85
|
+
niro mcp uninstall --client cursor
|
|
86
|
+
niro mcp uninstall --all
|
|
202
87
|
```
|
|
203
88
|
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
[README](../README.md#scenario-11--disconnect-an-ai-assistant-uninstall-the-mcp) for details.
|
|
89
|
+
This removes everything the install added: the connection, the hooks, the instruction text, the skills, and the Cursor allowlist entry. It removes the Cursor rule only in the current folder. Your sign-in stays.
|
|
90
|
+
<!-- source: src/mcp/teardown.js:1-27, :431-438, :645-653 -->
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# The coverage audit
|
|
2
|
+
|
|
3
|
+
**The coverage audit is how Niro learns what it fails to read in real code.** While building, the engine notes the lines it could not make sense of. For example, a call it could not link, or a framework it does not know. A small, masked piece of the code around each such line is sent to Niro, so support for that kind of code can be added.
|
|
4
|
+
<!-- source: src/commands/engineRoutes.js:37 ("What the last builds found wrong with their own graph"); src/lib/auditUpload.js -->
|
|
5
|
+
|
|
6
|
+
## What exactly is sent
|
|
7
|
+
|
|
8
|
+
For each flagged line:
|
|
9
|
+
|
|
10
|
+
- **the method that holds it**, or, outside a method, the 10 lines before and the 40 lines after;
|
|
11
|
+
- **one line for each name that piece uses** that is defined in the same file;
|
|
12
|
+
- **every other line of the file is sent blank**, so line numbers still match. A whole file is never sent;
|
|
13
|
+
- **the file's path inside the repository**, so the gap can be found.
|
|
14
|
+
<!-- source: niro-local src/niro_local/cli.py:2413-2415; src/niro_local/audit/queue.py:838-846; src/niro_local/audit/collect.py:208-216 -->
|
|
15
|
+
<!-- source: src/lib/redact.js:89-121; CHANGELOG.md (Unreleased: the audit sends only a snippet) -->
|
|
16
|
+
|
|
17
|
+
Before it leaves your computer:
|
|
18
|
+
|
|
19
|
+
- **secrets are masked** by the engine, in the code and in the path;
|
|
20
|
+
- the names of **authors and companies** become `<author>` and `<company>`.
|
|
21
|
+
<!-- source: src/lib/auditUpload.js:216-220; src/lib/redact.js:1-18 -->
|
|
22
|
+
|
|
23
|
+
Separately, the audit sends a list of the libraries and kinds of files the build saw. That list carries no file names or paths.
|
|
24
|
+
<!-- source: src/lib/auditUpload.js:237-244 -->
|
|
25
|
+
|
|
26
|
+
## When and on which plans
|
|
27
|
+
|
|
28
|
+
**The audit is sent on every plan.** It does not depend on the code-sharing switch. The background watcher sends it every 5 minutes. You can also send it yourself with `niro audit-send`.
|
|
29
|
+
<!-- source: src/lib/auditUpload.js:27-30 ("the coverage audit is sent on every plan"); src/commands/watch.js:423-426 -->
|
|
30
|
+
|
|
31
|
+
There is no switch to turn it off in `niro`. For what Niro may keep and do with what it receives, read Niro's Data Processing Agreement, summarised in [what-leaves-your-machine.md](what-leaves-your-machine.md#niros-data-processing-agreement).
|
|
32
|
+
|
|
33
|
+
## See it before it is sent
|
|
34
|
+
|
|
35
|
+
```
|
|
36
|
+
niro audit # what is waiting to be sent
|
|
37
|
+
niro audit --export DIR # write the waiting items to a folder, to read them
|
|
38
|
+
```
|
|
39
|
+
<!-- source: src/commands/engineRoutes.js:37 (audit, all arguments passed to the engine), :65-84; niro-local src/niro_local/cli.py:478 (--export DIR) -->
|
|
40
|
+
|
|
41
|
+
## Code sharing is a separate choice
|
|
42
|
+
|
|
43
|
+
**"Share redacted code" is a switch on your account, in the console under Settings, Privacy.** Switching it on is your consent; nothing more is asked on your computer. It does two things:
|
|
44
|
+
|
|
45
|
+
- it removes the line limit on the Free plan;
|
|
46
|
+
- the background watcher shares the files Niro indexes in each folder on your computer, by itself, with secrets masked and author and company names removed first: the whole indexed set the first time, then only changed files. A folder you keep out with `niro share exclude <folder>` is never sent.
|
|
47
|
+
|
|
48
|
+
`niro audit-push-repo` is separate from the switch. It is how you send one folder's indexed files to Niro when something is wrong and you want us to look at it. It works with the switch on or off, on every plan: typing it and answering yes is the consent. The files are the same and are masked the same way. For a folder you excluded, it asks "Send it anyway?" first and sends only on yes.
|
|
49
|
+
|
|
50
|
+
Turning the switch off stops the sharing: nothing more is sent after the next check. `niro uninstall` does not turn the switch off. Turn it off in the console.
|
|
51
|
+
<!-- source: src/commands/plan.js:63-67; src/lib/shareCode.js; src/lib/shareExclusions.js; src/lib/repoPush.js; src/commands/uninstall.js:97-101 -->
|