@nex-ai/nex 0.2.0 → 0.2.2

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.
Files changed (2) hide show
  1. package/README.md +168 -246
  2. package/package.json +17 -3
package/README.md CHANGED
@@ -1,219 +1,118 @@
1
- # Nex: Compounding Intelligence for AI agents
1
+ # Nex: Compounding Intelligence for AI Agents
2
2
 
3
3
  [![npm version](https://img.shields.io/npm/v/@nex-ai/nex)](https://www.npmjs.com/package/@nex-ai/nex)
4
4
  [![Discord](https://img.shields.io/badge/Discord-Join%20Community-5865F2?logo=discord&logoColor=white)](https://discord.gg/gjSySC3PzV)
5
5
 
6
- Turn all your AI agent conversations into a unified knowledge graph. Supports Claude Code, Codex, OpenClaw, Cursor, OpenCode, etc. Adds additional context from Email, Meetings, Slack, HubSpot, Salesforce.
6
+ Nex turns AI agent conversations into a unified knowledge graph. Tell something to one agent, recall it from any other. Context follows you across tools no copy-pasting, no re-explaining.
7
7
 
8
- Tell something to OpenClaw. Ask about it in Claude Code. Reference it from Cursor. Context follows you across tools — no copy-pasting, no re-explaining, no lost context.
8
+ Supports Claude Code, OpenClaw, Cursor, Windsurf, Codex, Aider, Continue, Zed, and more. Adds context from Email, Meetings, Slack, HubSpot, Salesforce.
9
9
 
10
10
  <a href="https://discord.gg/gjSySC3PzV"><img src="https://img.shields.io/badge/Join%20our%20Discord-5865F2?style=for-the-badge&logo=discord&logoColor=white" alt="Join our Discord" /></a>
11
11
 
12
12
  Talk to the team, share feedback, and connect with other developers building AI agents with Nex.
13
13
 
14
- ## How It Works
14
+ ## Quick Start
15
15
 
16
- ```
17
- You → OpenClaw: "Maria Rodriguez, CTO of TechFlow, wants to expand to Europe in Q3. Budget is $2M."
18
-
19
- You → Claude Code: "What do you know about Maria Rodriguez?"
20
- Claude Code: "Maria Rodriguez is the CTO of TechFlow. They're planning European expansion
21
- in Q3 with a $2M budget."
16
+ ### Install
22
17
 
23
- You → Cursor: "Which companies are planning European expansion?"
24
- Cursor: "TechFlow Maria Rodriguez (CTO) confirmed Q3 timeline, $2M budget."
25
- ```
26
-
27
- One fact entered once. Available everywhere, instantly.
18
+ ```bash
19
+ # Option A: standalone binary (no Node.js required, auto-installs nex-cli)
20
+ curl -fsSL https://raw.githubusercontent.com/nex-crm/nex-as-a-skill/main/install.sh | sh
28
21
 
29
- ## Integration Options
22
+ # Option B: install the nex-cli binary directly
23
+ curl -fsSL https://raw.githubusercontent.com/nex-crm/nex-cli/main/install.sh | sh
30
24
 
31
- | | CLI + MCP Server | OpenClaw Plugin | Claude Code Plugin | Scripts |
32
- |---|---|---|---|---|
33
- | **Platforms** | Any terminal, Claude Desktop, ChatGPT, Cursor, Windsurf | OpenClaw | Claude Code CLI | OpenClaw (script-based) |
34
- | **Auto-recall** | Via `nex recall` / MCP tool calls | Yes (smart filter) | Yes (smart filter) | No (manual) |
35
- | **Auto-capture** | Via `nex capture` | Yes | Yes | No (manual) |
36
- | **Notifications** | Daily digest + proactive alerts (Channels API) | No | No | No |
37
- | **Commands** | 50+ CLI commands, 50+ MCP tools, `nex mcp` | 4 tools + 4 commands | 5 slash commands + MCP | bash scripts |
38
- | **Setup** | `nex setup` | Copy plugin | `nex setup` | Set `NEX_API_KEY` |
25
+ # Option C: install via npm (or bun/pnpm)
26
+ npm install -g @nex-ai/nex
27
+ ```
39
28
 
40
- ## Quick Start (Recommended)
29
+ ### Sign up and configure
41
30
 
42
31
  ```bash
43
- # Install and run setup handles everything in one step
44
- npm install -g @nex-ai/nex
32
+ # Create an account (or log in if you already have one)
33
+ nex register --email you@company.com
34
+
35
+ # Auto-detect your AI platforms and install hooks, MCP, slash commands
45
36
  nex setup
46
37
  ```
47
38
 
48
- `nex setup` registers your API key, auto-detects your AI platforms (Claude Code, Cursor, Windsurf, etc.), installs hooks, scans project files, and creates config. One command, fully configured.
39
+ `nex setup` detects your platforms (Claude Code, Cursor, Windsurf, etc.), installs hooks, scans project files, and writes config. After setup:
49
40
 
50
41
  ```bash
51
- # Now use it from any agent
52
42
  nex ask "who is Maria Rodriguez?"
53
43
  nex remember "Met with Maria, CTO of TechFlow. European expansion Q3, $2M budget."
54
44
  ```
55
45
 
56
- ## Copy-Paste Prompt For Any AI Agent
57
-
58
- Drop this prompt into any terminal-capable AI agent when you want it to bootstrap Nex for you end to end:
59
-
60
- ```text
61
- Install and fully bootstrap Nex in this project from start to finish.
62
-
63
- 1. If the `nex` CLI is missing, install it globally with `npm install -g @nex-ai/nex`.
64
- 2. If Nex is not authenticated yet, ask me for the email address I want to use for registration, then continue. If Nex is already authenticated, reuse the existing account and key.
65
- 3. Run `nex setup` and complete the full install flow for every detected AI coding platform in this environment.
66
- 4. After setup, inspect integrations and connect the first available unconnected integration. Prefer this order when multiple choices are available: gmail, google-calendar, slack, salesforce, hubspot, attio, outlook, outlook-calendar. If OAuth is required, open the browser flow and wait for it to complete.
67
- 5. Run a fresh file scan for the current directory so the workspace is up to date.
68
- 6. After the scan finishes, trigger Nex compounding jobs by calling the authenticated `POST https://app.nex.ai/api/developers/v1/compounding/trigger` endpoint for these job types: `consolidation`, `pattern_detection`, and `playbook_synthesis`. Use the active Nex API key from the current environment or the config written by Nex setup.
69
- 7. Fetch the last 24 hours of insights with the insights endpoint or `nex insight list --last 24h`, then give me a clean digest with sections for Highlights, Risks, Opportunities, Open Loops, and Recommended Next Actions.
70
- 8. Finish by showing me:
71
- - what Nex installed
72
- - which integration was connected
73
- - how many files were scanned and ingested
74
- - whether the compounding/playbooks trigger succeeded
75
- - the formatted 24-hour insight digest
76
-
77
- Do not stop after partial setup. Only pause if you need my email for registration or if an OAuth flow requires my interaction.
78
- ```
79
-
80
- This works best in agents that can run shell commands and open OAuth URLs.
46
+ ## Skills & Platform Rules
81
47
 
82
- ---
48
+ The core of this repo is a set of skills, slash commands, and agent instructions that teach any AI platform how to use Nex.
83
49
 
84
- <details>
85
- <summary>Manual setup per platform (if you prefer step-by-step)</summary>
50
+ ### Slash Commands (`plugin-commands/`)
86
51
 
87
- ### CLI (any terminal, any AI agent)
52
+ Drop these `.md` files into your agent's commands directory to get Nex slash commands:
88
53
 
89
- ```bash
90
- npx @nex-ai/nex register --email you@company.com
91
- ```
92
-
93
- That's it. Now use it:
54
+ | Command | What it does |
55
+ |---------|-------------|
56
+ | `/nex:recall <query>` | Search your knowledge base |
57
+ | `/nex:remember <text>` | Store information for later recall |
58
+ | `/nex:entities <query>` | Find people, companies, topics |
59
+ | `/nex:scan <dir>` | Scan project files into Nex |
60
+ | `/nex:integrate <provider>` | Connect an OAuth integration |
61
+ | `/nex:register <email>` | One-time account registration |
62
+ | `/nex:notify` | Check recent notifications |
94
63
 
95
- ```bash
96
- # Ask your knowledge graph
97
- nex ask "who is Maria Rodriguez?"
64
+ For Claude Code: `cp plugin-commands/*.md ~/.claude/commands/`
98
65
 
99
- # Ingest information
100
- nex remember "Met with Maria Rodriguez, CTO of TechFlow. European expansion Q3, $2M budget."
66
+ ### Platform Rules (`platform-rules/`)
101
67
 
102
- # Or pipe from stdin
103
- cat meeting-notes.txt | nex remember
68
+ Pre-written agent instructions that teach each platform how to use Nex tools. Copy the relevant file into your editor's config:
104
69
 
105
- # Search CRM records
106
- nex search "TechFlow"
70
+ | Platform | File | Destination |
71
+ |----------|------|-------------|
72
+ | Cursor | `cursor-rules.md` | `.cursor/rules/` |
73
+ | Windsurf | `windsurf-rules.md` | `.windsurf/rules/` |
74
+ | GitHub Copilot | `vscode-instructions.md` | `.github/instructions/` |
75
+ | Zed | `zed-rules.md` | `.zed/rules/` |
76
+ | Aider | `aider-conventions.md` | `.aider/conventions/` |
77
+ | Cline | `cline-rules.md` | `.cline/rules/` |
78
+ | Continue | `continue-rules.md` | `.continue/rules/` |
79
+ | KiloCode | `kilocode-rules.md` | `.kilocode/rules/` |
80
+ | Codex | `codex-agents.md` | `.codex/agents/` |
81
+ | OpenCode | `opencode-agents.md` | `.opencode/agents/` |
107
82
 
108
- # CRUD operations
109
- nex record list person --limit 10
110
- nex task create --title "Follow up with Maria" --priority high
111
- nex insight list --last 24h
83
+ ### Platform Plugins (`platform-plugins/`)
112
84
 
113
- # Build auto-recall hooks for any agent
114
- nex recall "what do I know about TechFlow?" # Returns <nex-context> XML block
85
+ Deeper integrations for editors that support plugin APIs:
115
86
 
116
- # Build auto-capture hooks
117
- nex capture "Agent conversation text..." # Rate-limited, filtered
118
- ```
87
+ - **Continue** (`continue-provider.ts`) — Nex as a context provider for autocomplete
88
+ - **OpenCode** (`opencode-plugin.ts`) Session lifecycle hooks for context preservation
89
+ - **KiloCode** (`kilocode-modes.yaml`) — Nex memory mode definitions
90
+ - **Windsurf** (`windsurf-workflows/`) — Native workflow definitions for ask, remember, search, notify
119
91
 
120
- Install globally: `npm install -g @nex-ai/nex`
92
+ ## Plugins
121
93
 
122
- ### MCP Server (Claude Desktop, Cursor, Windsurf)
94
+ ### Claude Code Plugin
123
95
 
124
- The MCP server is bundled inside `@nex-ai/nex`. No separate package needed.
96
+ Full auto-recall and auto-capture via Claude Code hooks. Queries Nex before each prompt and captures conversation facts after each response.
125
97
 
126
- ```json
127
- {
128
- "mcpServers": {
129
- "nex": {
130
- "command": "nex-mcp",
131
- "env": { "NEX_API_KEY": "sk-your_key_here" }
132
- }
133
- }
134
- }
98
+ ```bash
99
+ cd claude-code-plugin && bun install && bun run build
135
100
  ```
136
101
 
137
- Or without a global install:
102
+ Then add hooks to `~/.claude/settings.json` (see [`settings.json`](claude-code-plugin/settings.json) for the template) and register the MCP server:
138
103
 
139
- ```json
140
- {
141
- "mcpServers": {
142
- "nex": {
143
- "command": "npx",
144
- "args": ["-y", "@nex-ai/nex", "mcp"],
145
- "env": { "NEX_API_KEY": "sk-your_key_here" }
146
- }
147
- }
148
- }
104
+ ```bash
105
+ cp claude-code-plugin/commands/*.md ~/.claude/commands/
106
+ claude mcp add nex -- nex-mcp
149
107
  ```
150
108
 
151
- No API key? The server starts in registration mode call the `register` tool with your email.
152
-
153
- ### Proactive Notifications (Claude Code Channels)
154
-
155
- The MCP server includes a built-in notification channel that pushes context updates directly into your Claude Code session — without you having to ask. This uses the [Claude SDK Channels API](https://code.claude.com/docs/en/channels-reference).
156
-
157
- **What you get:**
158
-
159
- | Notification | What it does | Frequency |
160
- |---|---|---|
161
- | **Daily digest** | Summarizes all context collected in the last 24 hours: deal updates, new relationships, upcoming events, actionable items | Once per day (on first session start after 24h) |
162
- | **Proactive alerts** | Pushes new insights as they're discovered — deal changes, relationship shifts, risks, opportunities | Every 15 minutes (configurable) |
163
-
164
- **How to enable:**
165
-
166
- 1. Install Nex globally (if not already):
167
- ```bash
168
- npm install -g @nex-ai/nex
169
- ```
170
-
171
- 2. Add the MCP server to your project (`.mcp.json`):
172
- ```json
173
- {
174
- "mcpServers": {
175
- "nex": {
176
- "command": "nex-mcp",
177
- "env": {}
178
- }
179
- }
180
- }
181
- ```
182
-
183
- 3. Start Claude Code with channels enabled:
184
- ```bash
185
- claude --dangerously-load-development-channels server:nex
186
- ```
187
-
188
- 4. That's it. Notifications arrive as `<channel>` events in your session:
189
- ```
190
- ← nex: [technical_stack] MCP server utilizes experimental channel capability...
191
- ← nex: [deal_update | high] Meridian counter-offer moved to 12% equity split...
192
- ```
193
-
194
- **Configuration:**
195
-
196
- | Environment variable | Default | Description |
197
- |---|---|---|
198
- | `NEX_NOTIFY_INTERVAL_MINUTES` | `15` | How often to poll for new insights |
109
+ The fastest path is just `nex setup`it does all of this automatically.
199
110
 
200
- Set it in your `.mcp.json`:
201
- ```json
202
- {
203
- "mcpServers": {
204
- "nex": {
205
- "command": "nex-mcp",
206
- "env": { "NEX_NOTIFY_INTERVAL_MINUTES": "5" }
207
- }
208
- }
209
- }
210
- ```
211
-
212
- **State persistence:** Digest and notification timestamps are stored in `~/.nex/channel-state.json`. Delete this file to force a fresh digest on next session start.
111
+ See [`claude-code-plugin/README.md`](claude-code-plugin/README.md) for details.
213
112
 
214
- **Requirements:** Claude Code v2.1.80+, claude.ai login (API keys not supported for Channels), `--dangerously-load-development-channels` flag during research preview.
113
+ ### OpenClaw Plugin
215
114
 
216
- ### OpenClaw Plugin (auto-recall + auto-capture)
115
+ 15+ tools, auto-recall, and auto-capture for OpenClaw agents.
217
116
 
218
117
  ```bash
219
118
  cp -r openclaw-plugin /path/to/openclaw/plugins/nex
@@ -230,9 +129,7 @@ Add to `openclaw.json`:
230
129
  "entries": {
231
130
  "nex": {
232
131
  "enabled": true,
233
- "config": {
234
- "apiKey": "sk-your_key_here"
235
- }
132
+ "config": { "apiKey": "sk-your_key_here" }
236
133
  }
237
134
  }
238
135
  }
@@ -241,104 +138,113 @@ Add to `openclaw.json`:
241
138
 
242
139
  See [`openclaw-plugin/README.md`](openclaw-plugin/README.md) for details.
243
140
 
244
- ### Claude Code Plugin (auto-recall + auto-capture)
141
+ ### MCP Server (Claude Desktop, Cursor, Windsurf)
245
142
 
246
- ```bash
247
- cd claude-code-plugin && bun install && bun run build
143
+ ```json
144
+ {
145
+ "mcpServers": {
146
+ "nex": {
147
+ "command": "nex-mcp",
148
+ "env": { "NEX_API_KEY": "sk-your_key_here" }
149
+ }
150
+ }
151
+ }
248
152
  ```
249
153
 
250
- Add hooks to `~/.claude/settings.json`:
154
+ Or without a global install:
251
155
 
252
156
  ```json
253
157
  {
254
- "hooks": {
255
- "UserPromptSubmit": [{
256
- "matcher": "",
257
- "hooks": [{
258
- "type": "command",
259
- "command": "NEX_API_KEY=sk-your_key node /path/to/claude-code-plugin/dist/auto-recall.js",
260
- "timeout": 10000
261
- }]
262
- }],
263
- "Stop": [{
264
- "matcher": "",
265
- "hooks": [{
266
- "type": "command",
267
- "command": "NEX_API_KEY=sk-your_key node /path/to/claude-code-plugin/dist/auto-capture.js",
268
- "timeout": 5000,
269
- "async": true
270
- }]
271
- }]
158
+ "mcpServers": {
159
+ "nex": {
160
+ "command": "npx",
161
+ "args": ["-y", "@nex-ai/nex", "mcp"],
162
+ "env": { "NEX_API_KEY": "sk-your_key_here" }
163
+ }
272
164
  }
273
165
  }
274
166
  ```
275
167
 
276
- Slash commands and MCP server:
168
+ ### Shell-only Agents (no Node.js)
169
+
170
+ Bash scripts for agents that can only run shell commands. Requires `curl` and `jq`.
277
171
 
278
172
  ```bash
279
- cp claude-code-plugin/commands/*.md ~/.claude/commands/ # /nex:recall, /nex:remember, /nex:scan, /nex:entities
280
- claude mcp add nex -- nex-mcp # Full toolset
173
+ bash scripts/nex-openclaw-register.sh your@email.com "Your Name"
174
+ printf '{"query":"who is Maria?"}' | bash scripts/nex-api.sh POST /v1/context/ask
175
+ bash scripts/nex-scan-files.sh --dir . --max-files 10
281
176
  ```
282
177
 
283
- See [`claude-code-plugin/README.md`](claude-code-plugin/README.md) for details.
178
+ ## Copy-Paste Bootstrap Prompt
284
179
 
285
- ### Scripts (OpenClaw script-based)
180
+ Drop this into any terminal-capable AI agent to bootstrap Nex end-to-end:
286
181
 
287
- For OpenClaw agents without the plugin, bash scripts provide direct API access:
182
+ ```text
183
+ Install and fully bootstrap Nex in this project from start to finish.
288
184
 
289
- ```bash
290
- # Register and get API key
291
- bash scripts/nex-openclaw-register.sh your@email.com "Your Name"
185
+ 1. If the `nex` CLI is missing, install it globally with `npm install -g @nex-ai/nex`.
186
+ 2. If Nex is not authenticated yet, ask me for the email address I want to use for registration, then continue. If Nex is already authenticated, reuse the existing account and key.
187
+ 3. Run `nex setup` and complete the full install flow for every detected AI coding platform in this environment.
188
+ 4. After setup, inspect integrations and connect the first available unconnected integration. Prefer this order when multiple choices are available: gmail, google-calendar, slack, salesforce, hubspot, attio, outlook, outlook-calendar. If OAuth is required, open the browser flow and wait for it to complete.
189
+ 5. Run a fresh file scan for the current directory so the workspace is up to date.
190
+ 6. After the scan finishes, trigger Nex compounding jobs by calling the authenticated `POST https://app.nex.ai/api/developers/v1/compounding/trigger` endpoint for these job types: `consolidation`, `pattern_detection`, and `playbook_synthesis`. Use the active Nex API key from the current environment or the config written by Nex setup.
191
+ 7. Fetch the last 24 hours of insights with the insights endpoint or `nex insight list --last 24h`, then give me a clean digest with sections for Highlights, Risks, Opportunities, Open Loops, and Recommended Next Actions.
192
+ 8. Finish by showing me:
193
+ - what Nex installed
194
+ - which integration was connected
195
+ - how many files were scanned and ingested
196
+ - whether the compounding/playbooks trigger succeeded
197
+ - the formatted 24-hour insight digest
292
198
 
293
- # Query context
294
- printf '{"query":"who is Maria?"}' | bash scripts/nex-api.sh POST /v1/context/ask
199
+ Do not stop after partial setup. Only pause if you need my email for registration or if an OAuth flow requires my interaction.
200
+ ```
295
201
 
296
- # Ingest text
297
- printf '{"content":"Meeting notes..."}' | bash scripts/nex-api.sh POST /v1/context/text
202
+ ## Development
298
203
 
299
- # Scan project files
300
- bash scripts/nex-scan-files.sh --dir . --max-files 10
204
+ ### Repo structure
205
+
206
+ ```text
207
+ src/ # Bootstrapper binary source (compiled via Bun)
208
+ bin/ # Thin Node.js shims that delegate to nex-cli (npm fallback)
209
+ install.sh # curl-pipe installer for the standalone binary
210
+ claude-code-plugin/ # Claude Code hooks (auto-recall, auto-capture)
211
+ openclaw-plugin/ # OpenClaw plugin (15+ tools, auto-recall, auto-capture)
212
+ plugin-commands/ # Slash command definitions (.md files)
213
+ platform-rules/ # Agent instructions for 10 platforms
214
+ platform-plugins/ # Editor integrations (Continue, OpenCode, KiloCode, Windsurf)
215
+ scripts/ # Bash API wrappers for shell-only agents
216
+ server.json # MCP Registry manifest
301
217
  ```
302
218
 
303
- See the [scripts directory](scripts/) for details.
219
+ ### Build and test
304
220
 
305
- </details>
221
+ ```bash
222
+ # Standalone binary (compiles via Bun)
223
+ bun run build:binary # native platform
224
+ bun run build:all # all 4 targets (darwin/linux × arm64/x64)
306
225
 
307
- ## Shared Config
226
+ # Shims (syntax check only)
227
+ npm test
308
228
 
309
- All surfaces share configuration for cross-tool compatibility:
229
+ # Claude Code plugin
230
+ cd claude-code-plugin && bun install && bun run build && bun test
310
231
 
311
- | File | Purpose | Shared by |
312
- |------|---------|-----------|
313
- | `~/.nex-mcp.json` | API key + workspace info | All surfaces |
314
- | `~/.nex/file-scan-manifest.json` | File change tracking | All surfaces |
315
- | `~/.nex/rate-limiter.json` | Rate limit timestamps | OC, MCP, CC |
316
- | `~/.nex/recall-state.json` | Recall debounce state | CC |
232
+ # OpenClaw plugin
233
+ cd openclaw-plugin && bun install && bun run build && bun test
234
+ ```
317
235
 
318
- Register once via any surface → all other surfaces pick up the key automatically.
236
+ ### How it works
319
237
 
320
- ## Architecture
238
+ **Standalone binary** (`src/nex.ts`): Compiled via `bun build --compile`. Finds `nex-cli` on PATH or common locations and delegates all commands. If `nex-cli` isn't installed, auto-downloads it on first run. Detects `nex-mcp` symlink invocation to transparently prepend `mcp` to args.
321
239
 
322
- ```
323
- ┌─────────────────────┐
324
- │ Nex Context Graph │
325
- │ (people, companies, │
326
- │ insights, tasks...)
327
- └──────────┬──────────┘
328
-
329
- ┌────────────────────────┼────────────────────────┐
330
- │ │ │ │
331
- ┌───▼────┐ ┌─────▼───────┐ ┌───────▼──────┐ ┌───▼──────────┐
332
- │ CLI │ │ MCP Server │ │ OpenClaw │ │ Claude Code │
333
- │ 50+ │ │ 50+ tools │ │ Plugin │ │ Plugin │
334
- │ cmds │ │ + scan │ │ + recall │ │ + recall │
335
- └───┬────┘ └─────┬───────┘ └──────┬──────┘ └──────┬───────┘
336
- │ │ │ │
337
- Any agent Claude Desktop OpenClaw agents Claude Code
338
- Aider ChatGPT Clawgent Any project
339
- Codex Cursor WhatsApp
340
- Custom Windsurf
341
- ```
240
+ **npm package** (`bin/nex.js`): Thin Node.js shim with the same delegation logic, for `npx @nex-ai/nex` and MCP Registry compatibility.
241
+
242
+ ### CI/CD
243
+
244
+ - **CI** (`ci.yml`): Validates shims, builds + tests both plugins, builds + smoke tests the binary on every PR
245
+ - **Release** (`release.yml`): Cross-compiles 4 binary targets on `v*` tags, creates GitHub Release with checksums
246
+ - **Publish** (`publish-cli.yml`): Auto-publishes to npm on push to main
247
+ - **MCP Registry** (`publish-mcp.yml`): Publishes `server.json` to the MCP Registry on version tags
342
248
 
343
249
  ## Environment Variables
344
250
 
@@ -347,18 +253,34 @@ Register once via any surface → all other surfaces pick up the key automatical
347
253
  | `NEX_API_KEY` | Yes (or register) | — |
348
254
  | `NEX_DEV_URL` | No (dev only) | `https://app.nex.ai` |
349
255
  | `NEX_SCAN_ENABLED` | No | `true` |
350
- | `NEX_SCAN_EXTENSIONS` | No | `.md,.txt,.rtf,.html,.htm,.csv,.tsv,.json,.yaml,.yml,.toml,.xml,.js,.ts,.jsx,.tsx,.py,.rb,.go,.rs,.java,.sh,.bash,.zsh,.fish,.org,.rst,.adoc,.tex,.log,.env,.ini,.cfg,.conf,.properties` |
351
256
  | `NEX_SCAN_MAX_FILES` | No | `5` |
352
257
  | `NEX_SCAN_DEPTH` | No | `20` |
353
- | `NEX_SCAN_MAX_FILE_SIZE` | No | `100000` (bytes) |
354
- | `NEX_SCAN_IGNORE_DIRS` | No | `node_modules,.git,dist,build,.next,__pycache__,vendor,.venv,.claude,coverage,.turbo,.cache` |
355
258
  | `NEX_NOTIFY_INTERVAL_MINUTES` | No | `15` |
356
259
 
357
- ## Testing
260
+ ## Architecture
261
+
262
+ ```mermaid
263
+ graph TD
264
+ API["Nex Context Graph<br/><i>app.nex.ai API</i>"]
265
+ CLI["nex-cli binary"]
358
266
 
359
- - **Shims**: `npm test` (syntax validation of bin/ shims)
360
- - **OpenClaw plugin**: `cd openclaw-plugin && npx vitest run`
361
- - **Claude Code plugin**: `cd claude-code-plugin && bun test`
267
+ API --- CLI
268
+
269
+ NEX["nex binary / npm shim"]
270
+ MCP["MCP Server<br/><i>nex-mcp</i>"]
271
+ OC["OpenClaw Plugin"]
272
+ CC["Claude Code Plugin"]
273
+
274
+ CLI --- NEX
275
+ CLI --- MCP
276
+ CLI --- OC
277
+ CLI --- CC
278
+
279
+ NEX -.- T1["Any terminal"]
280
+ MCP -.- T2["Claude Desktop · Cursor<br/>Windsurf · ChatGPT"]
281
+ OC -.- T3["OpenClaw agents"]
282
+ CC -.- T4["Claude Code"]
283
+ ```
362
284
 
363
285
  ## License
364
286
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nex-ai/nex",
3
- "version": "0.2.0",
3
+ "version": "0.2.2",
4
4
  "description": "Nex CLI provides organizational context & memory to AI agents. Connect email, CRM, Slack, meetings, and 100+ tools into one knowledge graph. Delegates to the nex-cli binary.",
5
5
  "mcpName": "io.github.nex-crm/nex",
6
6
  "type": "module",
@@ -32,7 +32,13 @@
32
32
  "integrations"
33
33
  ],
34
34
  "scripts": {
35
- "test": "node --check bin/nex.js && node --check bin/nex-mcp.js"
35
+ "test": "node --check bin/nex.js && node --check bin/nex-mcp.js",
36
+ "build:binary": "bun build --compile --minify src/nex.ts --outfile dist/nex",
37
+ "build:all": "bun run build:darwin-arm64 && bun run build:darwin-x64 && bun run build:linux-arm64 && bun run build:linux-x64",
38
+ "build:darwin-arm64": "bun build --compile --minify --target=bun-darwin-arm64 src/nex.ts --outfile dist/nex-darwin-arm64",
39
+ "build:darwin-x64": "bun build --compile --minify --target=bun-darwin-x64 src/nex.ts --outfile dist/nex-darwin-x64",
40
+ "build:linux-arm64": "bun build --compile --minify --target=bun-linux-arm64 src/nex.ts --outfile dist/nex-linux-arm64",
41
+ "build:linux-x64": "bun build --compile --minify --target=bun-linux-x64 src/nex.ts --outfile dist/nex-linux-x64"
36
42
  },
37
43
  "repository": {
38
44
  "type": "git",
@@ -48,5 +54,13 @@
48
54
  "publishConfig": {
49
55
  "access": "public"
50
56
  },
51
- "license": "MIT"
57
+ "license": "MIT",
58
+ "devDependencies": {
59
+ "@biomejs/biome": "^2.4.9",
60
+ "@commitlint/cli": "^19.0.0",
61
+ "@commitlint/config-conventional": "^19.0.0",
62
+ "@secretlint/secretlint-rule-preset-recommend": "^11.4.0",
63
+ "lefthook": "^1.11.0",
64
+ "secretlint": "^11.4.0"
65
+ }
52
66
  }