vutler-nexus 1.0.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/README.md ADDED
@@ -0,0 +1,414 @@
1
+ # 🤖 Vutler Nexus - Complete Local Agent Runtime
2
+
3
+ Vutler Nexus is a complete local AI agent runtime that provides a powerful, privacy-focused AI assistant that runs entirely on your machine. Now powered by **Claude Code CLI** - use your existing Claude Max subscription for unlimited local AI with **$0 additional costs**!
4
+
5
+ ## ✨ Features
6
+
7
+ ### 🧠 **Complete Agent Runtime**
8
+ - **Claude Code CLI Integration**: Uses your Max subscription - no API costs!
9
+ - **Smart Context Loading**: Auto-loads workspace files as system context
10
+ - **Tool Execution**: File operations, shell commands, memory management
11
+ - **Conversation Management**: Persistent chat history and memory
12
+
13
+ ### 💰 **Zero LLM Costs**
14
+ - **Primary**: Claude Code CLI (uses your Max subscription - $0 extra)
15
+ - **Fallback**: Anthropic API (pay-per-token if you need it)
16
+ - **Automatic Detection**: Detects and recommends the best option
17
+
18
+ ### 🌐 **Local Web Interface**
19
+ - **Modern Dark UI**: Beautiful Vutler-branded interface on `localhost:3939`
20
+ - **Real-time Streaming**: Live responses from Claude CLI
21
+ - **Settings Dashboard**: Configure everything through the web UI
22
+ - **Chat Management**: Export conversations, clear history, status monitoring
23
+
24
+ ### 📁 **Intelligent File System**
25
+ - **Workspace Integration**: Seamlessly works with your project directories
26
+ - **Context Files**: Auto-loads SOUL.md, MEMORY.md, USER.md, IDENTITY.md, TOOLS.md
27
+ - **Memory System**: Daily memory files with searchable history
28
+ - **File Tools**: Read, write, search files through natural language
29
+
30
+ ### ☁️ **Cloud Integration** (Optional)
31
+ - **Secure Tunnel**: Connect to Vutler Cloud for remote access
32
+ - **Privacy-First**: Your data stays local, only metadata syncs
33
+ - **Multi-Device**: Access your agent from anywhere
34
+
35
+ ### 🛡️ **Security & Privacy**
36
+ - **Local-First**: All processing happens on your machine via Claude CLI
37
+ - **Sandboxed Execution**: Optional shell access with safety controls
38
+ - **No Data Collection**: Your conversations and files stay private
39
+ - **Configurable Features**: Enable only what you need
40
+
41
+ ## 🚀 Quick Start
42
+
43
+ ### Prerequisites
44
+
45
+ **Option 1: Claude Code CLI (Recommended)**
46
+ ```bash
47
+ # Install Claude CLI (requires Claude Max subscription)
48
+ pip install claude-cli
49
+
50
+ # Verify installation
51
+ claude --version
52
+ ```
53
+
54
+ **Option 2: Anthropic API (Fallback)**
55
+ - Get API key from [console.anthropic.com](https://console.anthropic.com/)
56
+
57
+ ### Installation
58
+
59
+ ```bash
60
+ # Install globally
61
+ npm install -g @vutler/nexus
62
+
63
+ # Or run directly with npx
64
+ npx @vutler/nexus init
65
+ ```
66
+
67
+ ### Setup
68
+
69
+ ```bash
70
+ # Interactive setup - automatically detects Claude CLI
71
+ vutler-nexus init
72
+ ```
73
+
74
+ This will:
75
+ - ✅ **Detect Claude CLI** and recommend it (uses Max subscription)
76
+ - ⚙️ Configure agent name and workspace
77
+ - ☁️ Optional cloud integration
78
+ - 🔧 Feature preferences
79
+
80
+ ### Launch
81
+
82
+ ```bash
83
+ # Start the complete agent runtime
84
+ vutler-nexus start
85
+
86
+ # Open http://localhost:3939 in your browser
87
+ # Or chat directly in terminal:
88
+ vutler-nexus chat
89
+ ```
90
+
91
+ ## 📖 Commands
92
+
93
+ ### Core Commands
94
+
95
+ | Command | Description |
96
+ |---------|-------------|
97
+ | `vutler-nexus init` | Interactive setup wizard (detects Claude CLI) |
98
+ | `vutler-nexus start` | Start agent runtime + web server + cloud tunnel |
99
+ | `vutler-nexus stop` | Gracefully stop all services |
100
+ | `vutler-nexus status` | Show complete system status including Claude CLI |
101
+ | `vutler-nexus chat` | Terminal-based chat interface |
102
+ | `vutler-nexus config` | View/edit configuration |
103
+
104
+ ### Utility Commands
105
+
106
+ | Command | Description |
107
+ |---------|-------------|
108
+ | `vutler-nexus workspace` | Show workspace information and file status |
109
+ | `vutler-nexus version` | Version and system information |
110
+ | `vutler-nexus --help` | Complete command reference |
111
+
112
+ ### CLI Options
113
+
114
+ ```bash
115
+ # Start without web interface
116
+ vutler-nexus start --no-web
117
+
118
+ # Start without cloud connection
119
+ vutler-nexus start --no-cloud
120
+
121
+ # Set configuration values
122
+ vutler-nexus config --set llm.provider=claude-code
123
+ vutler-nexus config --set agent.name="JARVIS"
124
+
125
+ # Edit config file
126
+ vutler-nexus config --edit
127
+ ```
128
+
129
+ ## ⚙️ Configuration
130
+
131
+ Nexus stores configuration in `~/.vutler/config.json`:
132
+
133
+ ```json
134
+ {
135
+ "cloudUrl": "app.vutler.ai",
136
+ "token": "your-pairing-token",
137
+ "workspace": "/Users/you/.vutler/workspace",
138
+ "webPort": 3939,
139
+ "llm": {
140
+ "provider": "claude-code",
141
+ "model": "claude-sonnet-4-20250514",
142
+ "claudePath": "claude",
143
+ "maxTokens": 4096,
144
+ "temperature": 0.7
145
+ },
146
+ "agent": {
147
+ "name": "Jarvis",
148
+ "systemPrompt": "auto",
149
+ "contextFiles": ["SOUL.md", "MEMORY.md", "USER.md", "IDENTITY.md", "TOOLS.md"]
150
+ },
151
+ "features": {
152
+ "webInterface": true,
153
+ "cloudSync": true,
154
+ "localChat": true,
155
+ "fileAccess": true,
156
+ "shellAccess": false
157
+ }
158
+ }
159
+ ```
160
+
161
+ ### LLM Providers
162
+
163
+ **claude-code** (Recommended)
164
+ - Uses your Claude Max subscription
165
+ - No additional API costs
166
+ - Requires `claude` CLI installed
167
+ - Unlimited usage within Max limits
168
+
169
+ **anthropic-api** (Fallback)
170
+ - Direct API integration
171
+ - Requires API key and pay-per-token
172
+ - Use when Claude CLI not available
173
+
174
+ ### Workspace Structure
175
+
176
+ Your workspace directory contains:
177
+
178
+ ```
179
+ ~/.vutler/workspace/
180
+ ├── SOUL.md # Agent personality and core instructions
181
+ ├── MEMORY.md # Long-term curated memories
182
+ ├── USER.md # Information about you
183
+ ├── IDENTITY.md # Agent identity and capabilities
184
+ ├── TOOLS.md # Tool configurations and preferences
185
+ └── memory/
186
+ ├── 2024-01-01.md # Daily memory files
187
+ ├── 2024-01-02.md
188
+ └── ...
189
+ ```
190
+
191
+ ## 🧠 LLM Integration
192
+
193
+ ### Claude Code CLI (Primary)
194
+
195
+ **Why Claude Code CLI?**
196
+ - 💰 **Zero extra costs** - uses your Max subscription
197
+ - ⚡ **Fast local execution** - no API round trips
198
+ - 🔐 **Maximum privacy** - everything stays local
199
+ - 🚀 **Unlimited usage** within Max plan limits
200
+
201
+ **Setup:**
202
+ ```bash
203
+ pip install claude-cli
204
+ claude --version
205
+ ```
206
+
207
+ **Models Supported:**
208
+ - Claude Sonnet (default)
209
+ - Claude Opus
210
+ - Claude Haiku
211
+
212
+ ### Anthropic API (Fallback)
213
+
214
+ **When to use:**
215
+ - Claude CLI not available
216
+ - Need specific API features
217
+ - Running on systems without Python
218
+
219
+ **Supported Models:**
220
+ - **Claude Sonnet 4** (recommended) - `claude-sonnet-4-20250514`
221
+ - **Claude Opus 4** (most powerful) - `claude-opus-4-6`
222
+ - **Claude Haiku 4** (fastest) - `claude-haiku-4-20250514`
223
+
224
+ ### Context Loading
225
+
226
+ When `systemPrompt: "auto"` (default), Nexus automatically loads and concatenates your workspace context files:
227
+
228
+ 1. **SOUL.md** - Agent personality, goals, style
229
+ 2. **MEMORY.md** - Long-term memories and learnings
230
+ 3. **USER.md** - Information about you and preferences
231
+ 4. **IDENTITY.md** - Agent capabilities and identity
232
+ 5. **TOOLS.md** - Tool configurations and local notes
233
+
234
+ This creates a rich, personalized system prompt that makes your agent uniquely yours.
235
+
236
+ ## 🛠️ Agent Tools
237
+
238
+ Your agent has powerful built-in tools:
239
+
240
+ ### File Operations
241
+ - `read_file(path)` - Read any file in workspace
242
+ - `write_file(path, content)` - Write/create files
243
+ - `list_files(directory)` - Browse directories
244
+ - `search_files(query, extensions)` - Full-text search
245
+
246
+ ### Memory Management
247
+ - `append_memory(content)` - Add to today memory file
248
+ - Auto-loads recent memory for context
249
+ - Search through historical memory files
250
+
251
+ ### Shell Access (Optional)
252
+ - `execute_shell(command)` - Run terminal commands
253
+ - Sandboxed to workspace directory
254
+ - 30-second timeout protection
255
+ - Disabled by default for security
256
+
257
+ ### Web Interface
258
+ - Real-time status monitoring
259
+ - Configuration management
260
+ - Chat history and export
261
+ - File browser integration
262
+
263
+ ## 🌐 Web Interface
264
+
265
+ Access your agent via beautiful web interface:
266
+
267
+ ### Chat Page (`/`)
268
+ - Real-time streaming responses from Claude CLI
269
+ - Message history with timestamps
270
+ - Export conversations as JSON
271
+ - Clear history and toggle streaming
272
+
273
+ ### Settings Page (`/settings.html`)
274
+ - **Provider Selection**: Choose Claude CLI or Anthropic API
275
+ - **Auto-Detection**: Shows Claude CLI availability
276
+ - **Cost Display**: Shows $0 for Claude CLI, usage costs for API
277
+ - Complete configuration management
278
+ - Status monitoring and diagnostics
279
+
280
+ ### API Endpoints
281
+
282
+ Build custom integrations:
283
+
284
+ ```javascript
285
+ // Chat with the agent
286
+ POST /api/chat
287
+ {
288
+ "message": "Hello!",
289
+ "stream": true
290
+ }
291
+
292
+ // Get status (includes Claude CLI info)
293
+ GET /api/status
294
+
295
+ // Test Claude CLI availability
296
+ GET /api/test-claude-cli
297
+
298
+ // Update config
299
+ POST /api/config
300
+ {
301
+ "agent": { "name": "JARVIS" }
302
+ }
303
+ ```
304
+
305
+ ## 🔗 Cloud Integration
306
+
307
+ Connect to Vutler Cloud for remote access:
308
+
309
+ 1. **Get Pairing Token**: Visit [app.vutler.ai](https://app.vutler.ai)
310
+ 2. **Configure**: `vutler-nexus config --set token=your-token`
311
+ 3. **Connect**: Cloud tunnel automatically starts with `vutler-nexus start`
312
+
313
+ ### Privacy & Security
314
+ - **Local Processing**: LLM calls happen via local Claude CLI
315
+ - **Metadata Only**: Only connection status and basic info syncs
316
+ - **End-to-End**: Your conversations stay on your machine
317
+ - **Optional**: Works completely offline without cloud
318
+
319
+ ## 🔧 Development
320
+
321
+ ### Project Structure
322
+
323
+ ```
324
+ packages/nexus/
325
+ ├── bin/cli.js # Enhanced CLI with Claude CLI support
326
+ ├── lib/
327
+ │ ├── config.js # Configuration (claude-code default)
328
+ │ ├── tunnel.js # WebSocket cloud tunnel
329
+ │ ├── agent-runtime.js # Claude CLI integration and tools
330
+ │ ├── file-manager.js # Workspace file operations
331
+ │ ├── web-server.js # Express web interface
332
+ │ └── web/ # Static web assets
333
+ │ ├── index.html # Main chat interface
334
+ │ ├── settings.html # Configuration UI with provider selection
335
+ │ ├── style.css # Vutler dark theme
336
+ │ ├── chat.js # Chat functionality
337
+ │ └── settings.js # Settings with Claude CLI support
338
+ ├── package.json # Dependencies (removed Anthropic SDK)
339
+ └── README.md # This file
340
+ ```
341
+
342
+ ### Local Development
343
+
344
+ ```bash
345
+ # Clone and setup
346
+ git clone <repo>
347
+ cd vutler/packages/nexus
348
+ npm install
349
+
350
+ # Test commands
351
+ node bin/cli.js --help
352
+ node bin/cli.js init
353
+ node bin/cli.js start
354
+ ```
355
+
356
+ ## 🚨 Troubleshooting
357
+
358
+ ### Common Issues
359
+
360
+ **"Claude CLI not found"**
361
+ - Install: `pip install claude-cli`
362
+ - Verify: `claude --version`
363
+ - Or use Anthropic API fallback
364
+
365
+ **"LLM not configured"**
366
+ - Run setup: `vutler-nexus init`
367
+ - Check status: `vutler-nexus status`
368
+
369
+ **"Port already in use"**
370
+ - Change web port: `vutler-nexus config --set webPort=3940`
371
+ - Or find what's using port: `lsof -i :3939`
372
+
373
+ **"Workspace not found"**
374
+ - Check workspace path: `vutler-nexus workspace`
375
+ - Recreate workspace: `vutler-nexus config --set workspace=/new/path`
376
+
377
+ **"Cloud connection failed"**
378
+ - Check your pairing token: `vutler-nexus status`
379
+ - Try without cloud: `vutler-nexus start --no-cloud`
380
+
381
+ ### Getting Help
382
+
383
+ 1. **Status Check**: `vutler-nexus status`
384
+ 2. **Logs**: Check terminal output when running `vutler-nexus start`
385
+ 3. **Configuration**: `vutler-nexus config` to see current settings
386
+ 4. **Reset**: Delete `~/.vutler/config.json` and run `vutler-nexus init`
387
+
388
+ ## 💰 Cost Comparison
389
+
390
+ | Provider | Cost | Speed | Privacy |
391
+ |----------|------|--------|---------|
392
+ | **Claude Code CLI** | **$0** (Max subscription) | ⚡ Fast (local) | 🔐 Maximum |
393
+ | Anthropic API | ~$3-15/month typical usage | 🌐 Network dependent | 🔒 API calls |
394
+
395
+ **Recommendation**: Use Claude Code CLI with your Max subscription for unlimited local AI at no extra cost!
396
+
397
+ ## 📄 License
398
+
399
+ UNLICENSED - Proprietary software by Starbox Group
400
+
401
+ ## 🎯 Built for Alex's Setup
402
+
403
+ This agent is specifically designed to work with Claude Max subscriptions and automatically detects:
404
+
405
+ - **Claude Code CLI availability** and recommends it
406
+ - **OpenClaw workspace** at `/Users/lopez/.openclaw/workspace/`
407
+ - **Existing context files**: SOUL.md, MEMORY.md, USER.md, etc.
408
+ - **Zero additional costs** by leveraging your Max subscription
409
+
410
+ The agent will auto-configure itself for cost-free operation using your existing Claude subscription.
411
+
412
+ ---
413
+
414
+ **🚀 Ready to get started?** Run `vutler-nexus init` and let it detect your Claude CLI for unlimited AI at $0 extra cost!