@nex-ai/nex 0.2.0 → 0.2.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/README.md +168 -246
- package/package.json +8 -2
package/README.md
CHANGED
|
@@ -1,219 +1,118 @@
|
|
|
1
|
-
# Nex: Compounding Intelligence for AI
|
|
1
|
+
# Nex: Compounding Intelligence for AI Agents
|
|
2
2
|
|
|
3
3
|
[](https://www.npmjs.com/package/@nex-ai/nex)
|
|
4
4
|
[](https://discord.gg/gjSySC3PzV)
|
|
5
5
|
|
|
6
|
-
|
|
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
|
-
|
|
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
|
-
##
|
|
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
|
-
|
|
24
|
-
|
|
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
|
-
|
|
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
|
-
|
|
32
|
-
|
|
33
|
-
|
|
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
|
-
|
|
29
|
+
### Sign up and configure
|
|
41
30
|
|
|
42
31
|
```bash
|
|
43
|
-
#
|
|
44
|
-
|
|
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`
|
|
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
|
-
##
|
|
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
|
-
|
|
85
|
-
<summary>Manual setup per platform (if you prefer step-by-step)</summary>
|
|
50
|
+
### Slash Commands (`plugin-commands/`)
|
|
86
51
|
|
|
87
|
-
|
|
52
|
+
Drop these `.md` files into your agent's commands directory to get Nex slash commands:
|
|
88
53
|
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
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
|
-
|
|
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
|
-
|
|
100
|
-
nex remember "Met with Maria Rodriguez, CTO of TechFlow. European expansion Q3, $2M budget."
|
|
66
|
+
### Platform Rules (`platform-rules/`)
|
|
101
67
|
|
|
102
|
-
|
|
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
|
-
|
|
106
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
117
|
-
|
|
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
|
-
|
|
92
|
+
## Plugins
|
|
121
93
|
|
|
122
|
-
###
|
|
94
|
+
### Claude Code Plugin
|
|
123
95
|
|
|
124
|
-
|
|
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
|
-
```
|
|
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
|
-
|
|
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
|
-
```
|
|
140
|
-
|
|
141
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
113
|
+
### OpenClaw Plugin
|
|
215
114
|
|
|
216
|
-
|
|
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
|
-
###
|
|
141
|
+
### MCP Server (Claude Desktop, Cursor, Windsurf)
|
|
245
142
|
|
|
246
|
-
```
|
|
247
|
-
|
|
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
|
-
|
|
154
|
+
Or without a global install:
|
|
251
155
|
|
|
252
156
|
```json
|
|
253
157
|
{
|
|
254
|
-
"
|
|
255
|
-
"
|
|
256
|
-
"
|
|
257
|
-
"
|
|
258
|
-
|
|
259
|
-
|
|
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
|
-
|
|
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
|
-
|
|
280
|
-
|
|
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
|
-
|
|
178
|
+
## Copy-Paste Bootstrap Prompt
|
|
284
179
|
|
|
285
|
-
|
|
180
|
+
Drop this into any terminal-capable AI agent to bootstrap Nex end-to-end:
|
|
286
181
|
|
|
287
|
-
|
|
182
|
+
```text
|
|
183
|
+
Install and fully bootstrap Nex in this project from start to finish.
|
|
288
184
|
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
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
|
-
|
|
294
|
-
|
|
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
|
-
|
|
297
|
-
printf '{"content":"Meeting notes..."}' | bash scripts/nex-api.sh POST /v1/context/text
|
|
202
|
+
## Development
|
|
298
203
|
|
|
299
|
-
|
|
300
|
-
|
|
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
|
-
|
|
219
|
+
### Build and test
|
|
304
220
|
|
|
305
|
-
|
|
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
|
-
|
|
226
|
+
# Shims (syntax check only)
|
|
227
|
+
npm test
|
|
308
228
|
|
|
309
|
-
|
|
229
|
+
# Claude Code plugin
|
|
230
|
+
cd claude-code-plugin && bun install && bun run build && bun test
|
|
310
231
|
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
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
|
-
|
|
236
|
+
### How it works
|
|
319
237
|
|
|
320
|
-
|
|
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
|
-
|
|
325
|
-
|
|
326
|
-
|
|
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
|
-
##
|
|
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
|
-
|
|
360
|
-
|
|
361
|
-
|
|
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.
|
|
3
|
+
"version": "0.2.1",
|
|
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",
|