0xkobold 0.2.0 β†’ 0.3.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.
Files changed (60) hide show
  1. package/HEARTBEAT.md +40 -58
  2. package/README.md +387 -337
  3. package/dist/package.json +4 -2
  4. package/dist/src/auth/device-auth.js +202 -0
  5. package/dist/src/auth/device-auth.js.map +1 -0
  6. package/dist/src/auth/index.js +3 -0
  7. package/dist/src/auth/index.js.map +1 -0
  8. package/dist/src/channels/index.js +8 -0
  9. package/dist/src/channels/index.js.map +1 -0
  10. package/dist/src/channels/slack/webhook.js +128 -0
  11. package/dist/src/channels/slack/webhook.js.map +1 -0
  12. package/dist/src/channels/telegram/bot.js +223 -0
  13. package/dist/src/channels/telegram/bot.js.map +1 -0
  14. package/dist/src/channels/whatsapp/integration.js +325 -0
  15. package/dist/src/channels/whatsapp/integration.js.map +1 -0
  16. package/dist/src/cli/commands/check.js +69 -0
  17. package/dist/src/cli/commands/check.js.map +1 -0
  18. package/dist/src/cli/commands/migrate.js +24 -0
  19. package/dist/src/cli/commands/migrate.js.map +1 -0
  20. package/dist/src/cli/commands/tailscale.js +81 -0
  21. package/dist/src/cli/commands/tailscale.js.map +1 -0
  22. package/dist/src/cli/commands/telegram.js +111 -0
  23. package/dist/src/cli/commands/telegram.js.map +1 -0
  24. package/dist/src/cli/commands/tui.js +40 -22
  25. package/dist/src/cli/commands/tui.js.map +1 -1
  26. package/dist/src/cli/commands/whatsapp.js +116 -0
  27. package/dist/src/cli/commands/whatsapp.js.map +1 -0
  28. package/dist/src/cli/program.js +20 -0
  29. package/dist/src/cli/program.js.map +1 -1
  30. package/dist/src/config/index.js +2 -9
  31. package/dist/src/config/index.js.map +1 -1
  32. package/dist/src/config/manager.js +222 -0
  33. package/dist/src/config/manager.js.map +1 -0
  34. package/dist/src/documents/index.js +3 -0
  35. package/dist/src/documents/index.js.map +1 -0
  36. package/dist/src/documents/pdf.js +168 -0
  37. package/dist/src/documents/pdf.js.map +1 -0
  38. package/dist/src/gateway/client.js +318 -0
  39. package/dist/src/gateway/client.js.map +1 -0
  40. package/dist/src/infra/index.js +3 -0
  41. package/dist/src/infra/index.js.map +1 -0
  42. package/dist/src/infra/tailscale.js +163 -0
  43. package/dist/src/infra/tailscale.js.map +1 -0
  44. package/dist/src/media/audio.js +130 -0
  45. package/dist/src/media/audio.js.map +1 -0
  46. package/dist/src/media/index.js +4 -0
  47. package/dist/src/media/index.js.map +1 -0
  48. package/dist/src/media/vision.js +131 -0
  49. package/dist/src/media/vision.js.map +1 -0
  50. package/dist/src/migration/openclaw.js +498 -0
  51. package/dist/src/migration/openclaw.js.map +1 -0
  52. package/dist/src/sandbox/docker-runner.js +228 -0
  53. package/dist/src/sandbox/docker-runner.js.map +1 -0
  54. package/dist/src/sandbox/index.js +3 -0
  55. package/dist/src/sandbox/index.js.map +1 -0
  56. package/dist/src/skills/builtin/duplicate-detector.js +469 -0
  57. package/dist/src/skills/builtin/duplicate-detector.js.map +1 -0
  58. package/dist/src/skills/index.js +2 -0
  59. package/dist/src/skills/index.js.map +1 -1
  60. package/package.json +4 -2
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # 0xKobold
1
+ # 0xKobold v0.3.0 "The Gap Closer"
2
2
 
3
3
  ```
4
4
  ..
@@ -21,8 +21,8 @@
21
21
  .J-I ~I!.iCU->-1_<`ii>~:....:_1}It}!.::+tX%#@%MbMBQ%@@@@@@%%WbY]+-~`.
22
22
  XWOUMO{,Z@B-;1B]:I_->i^ ... `;;JOB#QB#M8@@@@@@8OOOQdZ{~i!i!:.
23
23
  ..iJB@@M[1@%Y<X@o][]]>:III,^, ....,Z@@@@@@@@@@@@@@8#WOMoZI~~~~+I..
24
- `~M@8X#@8Zf#@BUWb1{1?]1}]<!^ ...:b@@@@@@@@@@@@@8BW#dXZf[?-+l:`..
25
- .. :JB@@@@%%@@@B#@%W%OQ8BMQbU> ..>M%@@@@@@@@@@@#8WBMZII]_I:^
24
+ `~M@8X#@8Zf#@BUWb1{1?]1}]<!^ ...:b@@@@@@@@@@@@@8BW#dXZf[?-+l:`. ..
25
+ .. :JB@@@@%%@@@B#@%W%OQ8BMQbU> ..>M%@@@@@@@@@@@#%W8##OoXZXQCi^ ...
26
26
  .. ^?1YbMWO#@@@@@@@@@@@@@@OZ-` d@#@@@@@@@@#%W8##OoXZXQCi^ ...
27
27
  .. .`.:!~-CXd%@@@@@@@8oQ}}%@@@@@@@@@@@BWWBWMMdbf[->>^..
28
28
  ..... :{@@@@@@@OYUCQ8@@@@@@@@8BB8WMQModU?++:!I..
@@ -36,461 +36,511 @@
36
36
 
37
37
  > *"Your digital familiar - a personal AI assistant that learns, evolves, and helps you Build 24/7"*
38
38
 
39
- ## Hybrid Architecture
39
+ **v0.3.0 "The Gap Closer"** β€” Multi-channel, secure, distributed, and packed with features.
40
40
 
41
- Best of both worlds:
42
- - **Bun + Elysia** for blazing fast gateway
43
- - **@mariozechner/pi-agent-core** for proven agent loop
44
- - **Event bus** for decoupled architecture
45
- - **Hot-reload skills** - just edit .ts files
46
- - **Approval queue** for safety
47
- - **Multi-provider LLM** (Ollama default, Anthropic supported)
48
- - **Subagents** for parallel work
41
+ ---
42
+
43
+ ## What's New in v0.3.0
44
+
45
+ ### πŸš€ Major Features (12 Total)
46
+
47
+ | Feature | Status | Description |
48
+ |---------|--------|-------------|
49
+ | **WhatsApp** | βœ… | Baileys integration with QR pairing |
50
+ | **Telegram** | βœ… | Complete bot with webhooks |
51
+ | **Slack** | βœ… | Webhook & slash commands |
52
+ | **Docker Sandbox** | βœ… | Secure container execution |
53
+ | **Device Auth** | βœ… | Multi-device token management |
54
+ | **Vision (AI)** | βœ… | Claude Vision image analysis |
55
+ | **Audio** | βœ… | Whisper transcription |
56
+ | **PDF** | βœ… | Text extraction & metadata |
57
+ | **Remote Gateway** | βœ… | Connect TUI to VPS |
58
+ | **Tailscale** | βœ… | Zero-config VPN for remote access |
59
+ | **Duplicate Detection** | βœ… | Self-check before adding code |
60
+ | **OpenClaw Migration** | βœ… | Full migration tool |
61
+
62
+ ---
49
63
 
50
64
  ## Installation
51
65
 
52
66
  ### Via NPM (Recommended)
53
67
 
54
68
  ```bash
55
- # 1. Install Bun (if not already installed)
69
+ # Install Bun if needed
56
70
  curl -fsSL https://bun.sh/install | bash
57
- # Restart your terminal after installing Bun
58
71
 
59
- # 2. Install 0xKobold globally
72
+ # Install 0xKobold
60
73
  npm install -g 0xkobold
61
74
 
62
- # 3. Run interactive setup
75
+ # Setup
63
76
  0xkobold setup
64
77
 
65
- # 4. Start using it!
66
- 0xkobold # Start the TUI
67
- 0xkobold --mode plan # Or start in plan mode
68
- 0xkobold --mode build # Or start in build mode
78
+ # Start
79
+ 0xkobold
69
80
  ```
70
81
 
71
- ### Quick Start with npx (No Install)
82
+ ### Quick Start
72
83
 
73
84
  ```bash
74
- # Just want to try it out? Use npx:
75
85
  npx 0xkobold setup
76
86
  npx 0xkobold
77
87
  ```
78
88
 
79
- ### From Source (Development)
89
+ ---
80
90
 
81
- ```bash
82
- # Clone and install
83
- git clone https://github.com/moikapy/0xkobold.git
84
- cd 0xkobold
85
- bun install
91
+ ## Multi-Channel Support πŸ“±
86
92
 
87
- # Start Ollama (in another terminal)
88
- ollama run kimi-k2.5:cloud
93
+ Use your AI across multiple messaging platforms:
89
94
 
90
- # Start the TUI
91
- bun run tui
92
- ```
95
+ ```bash
96
+ # WhatsApp
97
+ 0xkobold whatsapp start # Scan QR code
98
+ 0xkobold whatsapp send 123456 "Hello"
93
99
 
94
- ## Project Structure
100
+ # Telegram
101
+ TELEGRAM_BOT_TOKEN=xxx 0xkobold telegram start
95
102
 
96
- ```
97
- 0xkobold/
98
- β”œβ”€β”€ src/
99
- β”‚ β”œβ”€β”€ agent/ # Pi Agent Core adapter with subagent support
100
- β”‚ β”œβ”€β”€ approval/ # Approval queue for risky operations
101
- β”‚ β”œβ”€β”€ channels/ # Discord integration
102
- β”‚ β”œβ”€β”€ config/ # Zod config system
103
- β”‚ β”œβ”€β”€ discord/ # Discord bot
104
- β”‚ β”œβ”€β”€ event-bus/ # Decoupled event system
105
- β”‚ β”œβ”€β”€ gateway/ # Elysia WebSocket gateway
106
- β”‚ β”œβ”€β”€ llm/ # Ollama + Anthropic providers
107
- β”‚ β”œβ”€β”€ memory/ # JSON persistence
108
- β”‚ β”œβ”€β”€ skills/ # Hot-reload skill system
109
- β”‚ └── index.ts # Main entry
110
- β”œβ”€β”€ skills/ # Your custom skills (hot-reloaded)
111
- └── package.json
103
+ # Slack
104
+ 0xkobold slack send "Hello team!"
105
+
106
+ # Discord
107
+ 0xkobold gateway start --discord
112
108
  ```
113
109
 
114
- ## Creating Skills
110
+ ---
115
111
 
116
- Skills are plain TypeScript files in the `skills/` folder:
112
+ ## Remote/VPS Deployment 🌐
117
113
 
118
- ```typescript
119
- // skills/hello.ts
120
- import type { Skill } from '../src/skills/types';
121
-
122
- export const helloSkill: Skill = {
123
- name: 'hello',
124
- description: 'Say hello to someone',
125
- risk: 'safe',
126
-
127
- toolDefinition: {
128
- type: 'function',
129
- function: {
130
- name: 'hello',
131
- description: 'Say hello to someone',
132
- parameters: {
133
- type: 'object',
134
- properties: {
135
- name: { type: 'string', description: 'Name to greet' },
136
- },
137
- required: ['name'],
138
- },
139
- },
140
- },
114
+ Run AI on VPS, use lightweight TUI locally:
141
115
 
142
- async execute(args) {
143
- return { message: `Hello, ${args.name}!` };
144
- },
145
- };
116
+ ### VPS Side
117
+ ```bash
118
+ # On your VPS
119
+ 0xkobold gateway start --host 0.0.0.0
146
120
 
147
- export default helloSkill;
121
+ # Or with Tailscale (no port forwarding!)
122
+ 0xkobold tailscale start
148
123
  ```
149
124
 
150
- The skill is automatically hot-reloaded when you save!
151
-
152
- ## Safety
125
+ ### Laptop Side
126
+ ```bash
127
+ # Direct connection
128
+ 0xkobold tui --remote wss://vps.example.com:7777
153
129
 
154
- Risk levels:
155
- - `safe` - No approval needed (math, string operations)
156
- - `medium` - Confirmation for write operations (file write, web requests)
157
- - `high` - Explicit approval for dangerous operations (shell, delete)
130
+ # Via Tailscale (secure, private)
131
+ 0xkobold tui --remote $(0xkobold tailscale url)
132
+ ```
158
133
 
159
- ## Subagents
134
+ ---
160
135
 
161
- Spawn child agents for parallel work:
136
+ ## Security Features πŸ›‘οΈ
162
137
 
138
+ ### Docker Sandboxing
163
139
  ```typescript
164
- const result = await agent.spawn('Research this topic');
165
- ```
166
-
167
- The `spawn_subagent` skill is built-in and lets agents create child agents automatically.
140
+ import { getDockerRunner } from "0xkobold/sandbox";
168
141
 
169
- ## Multi-Agent Workspace System πŸ—οΈ [v0.2.0+]
142
+ const runner = getDockerRunner({
143
+ image: "node:20-slim",
144
+ memoryLimit: "512m",
145
+ network: "none", // Isolated
146
+ });
170
147
 
171
- Run multiple persistent AI agents with isolated workspaces. Each agent has its own context, memory, and capabilities.
172
-
173
- ```
174
- β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
175
- β”‚ Gateway (Standalone) β”‚ ◄── Coordinates all agents
176
- β”‚ Port: 18789 β”‚
177
- β””β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
178
- β”‚ β”‚
179
- β”Œβ”€β”€β”€β”€β–Όβ”€β”€β”€β”€β” β”Œβ”€β”€β”€β–Όβ”€β”€β”€β”€β”
180
- β”‚ Dev β”‚ β”‚ Ops β”‚ ◄── Main Agents (persistent)
181
- β”‚ Agent β”‚ β”‚ Agent β”‚
182
- β””β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”¬β”€β”€β”€β”€β”˜
183
- β”‚ β”‚
184
- β”Œβ”€β”€β”€β”€β–Όβ”€β”€β”€β”€β” β”Œβ”€β”€β”€β–Όβ”€β”€β”€β”€β”
185
- β”‚Scout β”‚ β”‚Health β”‚ ◄── Subagents (ephemeral)
186
- β”‚Planner β”‚ β”‚Checker β”‚
187
- β”‚Worker β”‚ β”‚Deploy β”‚
188
- β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”˜
148
+ await runner.run({
149
+ command: "node",
150
+ args: ["-e", "console.log('Safe execution')"],
151
+ });
189
152
  ```
190
153
 
191
- ### Why Multi-Agent?
154
+ ### Device Authentication
155
+ ```bash
156
+ 0xkobold device init "My Laptop"
157
+ 0xkobold device token generate
158
+ 0xkobold device list
159
+ ```
192
160
 
193
- Instead of one agent doing everything:
194
- - **Dev Agent**: Codes features, reviews PRs
195
- - **Ops Agent**: Monitors services, deploys to production
196
- - **Docs Agent**: Auto-generates documentation
197
- - **Research Agent**: Explores new technologies
161
+ ---
198
162
 
199
- Each with isolated workspaces, scheduled tasks, and specialized capabilities.
163
+ ## Media Support πŸ–ΌοΈ
200
164
 
201
- ### Quick Start: Multi-Agent
165
+ ### Vision (Image Analysis)
166
+ ```typescript
167
+ import { VisionAnalyzer } from "0xkobold/media";
202
168
 
203
- ```bash
204
- # Initialize your first agent workspace
205
- 0xkobold agent init dev-agent --description "Main development agent"
169
+ const vision = new VisionAnalyzer({
170
+ provider: "claude",
171
+ apiKey: process.env.ANTHROPIC_API_KEY,
172
+ });
206
173
 
207
- # Create workspace structure
208
- # ~/.0xkobold/agents/dev-agent/
209
- # β”œβ”€β”€ config.json # Agent configuration
210
- # β”œβ”€β”€ workspace/ # Working directory
211
- # β”œβ”€β”€ memory/ # Agent-specific memory
212
- # └── logs/ # Execution logs
174
+ const result = await vision.analyzeImage("./image.png");
175
+ console.log(result.description);
176
+ console.log(result.objects);
177
+ ```
213
178
 
214
- # Start the agent
215
- 0xkobold agent start dev-agent
179
+ ### Audio Transcription
180
+ ```typescript
181
+ import { AudioTranscriber } from "0xkobold/media";
216
182
 
217
- # Check status
218
- 0xkobold agent status dev-agent
183
+ const audio = new AudioTranscriber({
184
+ provider: "openai",
185
+ apiKey: process.env.OPENAI_API_KEY,
186
+ });
219
187
 
220
- # Switch TUI to this agent
221
- 0xkobold agent select dev-agent
188
+ const result = await audio.transcribeFile("./voice.mp3");
189
+ console.log(result.text);
190
+ console.log(result.segments); // Timestamps
222
191
  ```
223
192
 
224
- ### Agent Commands
193
+ ### PDF Processing
194
+ ```typescript
195
+ import { extractPDF } from "0xkobold/documents";
225
196
 
226
- ```
227
- /agent-init <name> # Create new agent workspace
228
- /agent-start <name> # Start agent process
229
- /agent-stop <name> # Stop agent process
230
- /agent-status [name] # Check agent status
231
- /agent-select <name> # Switch TUI to agent
232
- /agents # List all agents
197
+ const result = await extractPDF("./document.pdf");
198
+ console.log(result.text);
199
+ console.log(result.metadata.title);
200
+ console.log(result.pages);
233
201
  ```
234
202
 
235
- ## Autonomous Subagents πŸ€–
203
+ ---
236
204
 
237
- **No commands needed.** Just describe your task, and the agent automatically decides when to use subagents.
205
+ ## Duplicate Detection πŸ”
238
206
 
239
- ### How It Works
207
+ Check before adding to avoid duplication:
240
208
 
241
- ```
242
- You: "Implement user authentication system"
209
+ ```bash
210
+ # Check before implementing
211
+ 0xkobold check "WhatsApp integration"
243
212
 
244
- Agent: πŸ€– Analyzing task...
245
- Complexity: COMPLEX
246
- Strategy: Scout β†’ Planner β†’ Workers β†’ Reviewer
213
+ # Check specific function
214
+ 0xkobold check -f calculateSum
247
215
 
248
- βœ… Scout finds auth code
249
- βœ… Planner designs secure flow
250
- βœ… Workers implements components
251
- βœ… Reviewer approves changes
252
- πŸŽ‰ All done!
216
+ # Check class
217
+ 0xkobold check -c UserManager
253
218
  ```
254
219
 
255
- ### Complexity Detection
220
+ **Output:**
221
+ ```
222
+ ⚑ SIMILAR IMPLEMENTATIONS FOUND
223
+ Best match: 90% at src/channels/whatsapp/integration.ts
256
224
 
257
- The agent analyzes your request:
225
+ Suggestion: Review existing code before creating new implementation.
226
+ ```
258
227
 
259
- | Complexity | Trigger Words | Strategy |
260
- |------------|---------------|----------|
261
- | **Simple** | "fix typo", "update config" | Handle directly |
262
- | **Medium** | "implement feature" | Scout + Worker |
263
- | **Complex** | "redesign", "architecture" | Full workflow |
228
+ ---
264
229
 
265
- ### Control Autonomy
230
+ ## Migration from OpenClaw πŸ”„
266
231
 
267
- ```
268
- /autonomous-toggle simple # Only complex tasks use subagents
269
- /autonomous-toggle medium # Medium + complex (default)
270
- /autonomous-toggle complex # Only complex tasks
271
- /autonomous-toggle always # Everything uses subagents
272
- /autonomous-toggle off # Disable auto-delegation
232
+ Migrating from OpenClaw (koclaw)? We got you:
273
233
 
274
- /autonomous-status # Show current mode
275
- /delegation-plan <task> # Preview what would happen
276
- ```
277
-
278
- ### Explicit Delegation
234
+ ```bash
235
+ # Preview migration
236
+ 0xkobold migrate --dry-run
279
237
 
280
- ```
281
- /implement <feature> # Auto-detect and delegate
282
- /scout-and-plan <feature> # Scout β†’ Planner only
283
- /parallel "task 1" "task 2" # Run scouts in parallel
238
+ # Execute migration (with automatic backup)
239
+ 0xkobold migrate --live
284
240
  ```
285
241
 
286
- ### Built-in Subagents
242
+ **Migrated:**
243
+ - βœ… Configuration (with `.bak` backups)
244
+ - βœ… Agents
245
+ - βœ… Identity (both formats)
246
+ - βœ… Browser data
247
+ - βœ… Canvas/visual data
248
+ - βœ… Credentials (secure)
249
+ - βœ… Media files
250
+ - βœ… Cron jobs
251
+ - βœ… Workspace & databases
252
+ - βœ… Channel sessions
287
253
 
288
- | Agent | Purpose | Tools |
289
- |-------|---------|-------|
290
- | **scout** | Fast reconnaissance | read, search, list |
291
- | **planner** | Create implementation plans | read, search |
292
- | **worker** | Full implementation | all tools |
293
- | **reviewer** | Code review | read, search |
254
+ ---
255
+
256
+ ## Project Structure
294
257
 
295
- Create custom agents:
296
258
  ```
297
- /subagent-create health-checker
298
- # Edit ~/.0xkobold/agents/health-checker.md
259
+ 0xkobold/
260
+ β”œβ”€β”€ src/
261
+ β”‚ β”œβ”€β”€ agent/ # Agent runtime
262
+ β”‚ β”œβ”€β”€ approval/ # Safety approvals
263
+ β”‚ β”œβ”€β”€ auth/ # Device authentication
264
+ β”‚ β”œβ”€β”€ channels/ # WhatsApp, Telegram, Slack
265
+ β”‚ β”œβ”€β”€ cli/ # CLI commands
266
+ β”‚ β”œβ”€β”€ config/ # Configuration management
267
+ β”‚ β”œβ”€β”€ discord/ # Discord bot
268
+ β”‚ β”œβ”€β”€ documents/ # PDF processing
269
+ β”‚ β”œβ”€β”€ gateway/ # WebSocket gateway
270
+ β”‚ β”‚ β”œβ”€β”€ client.ts # Remote client
271
+ β”‚ β”‚ └── server.ts # Server
272
+ β”‚ β”œβ”€β”€ infra/ # Infrastructure (Tailscale)
273
+ β”‚ β”œβ”€β”€ media/ # Vision, Audio
274
+ β”‚ β”œβ”€β”€ migration/ # OpenClaw migration
275
+ β”‚ β”œβ”€β”€ sandbox/ # Docker isolation
276
+ β”‚ β”œβ”€β”€ skills/ # Skills framework
277
+ β”‚ β”‚ └── builtin/
278
+ β”‚ β”‚ └── duplicate-detector.ts
279
+ β”‚ └── workspace/ # Workspace management
280
+ β”œβ”€β”€ skills/ # Your custom skills
281
+ └── package.json
299
282
  ```
300
283
 
301
- ## Subagent Workflows
284
+ ---
285
+
286
+ ## Configuration
302
287
 
303
- Pre-built workflows for common tasks:
288
+ Global config: `~/.0xkobold/config.json`
304
289
 
305
- ### /implement - Full Implementation
290
+ ### Option 1: Ollama (Local - Default)
306
291
 
292
+ ```json
293
+ {
294
+ "version": "0.3.0",
295
+ "llm": {
296
+ "provider": "ollama",
297
+ "model": "qwen2.5-coder:14b",
298
+ "baseUrl": "http://localhost:11434",
299
+ "maxTokens": 4000,
300
+ "temperature": 0.7
301
+ },
302
+ "gateway": {
303
+ "port": 7777,
304
+ "host": "localhost"
305
+ }
306
+ }
307
307
  ```
308
- /implement add Redis caching
309
308
 
310
- Workflow:
311
- 1. Scout finds current caching code
312
- 2. Planner designs Redis integration
313
- 3. Workers implement Redis client
314
- 4. Reviewer checks error handling
309
+ **Setup:**
310
+ ```bash
311
+ # Install Ollama
312
+ curl -fsSL https://ollama.com/install.sh | sh
313
+
314
+ # Pull a model
315
+ ollama pull qwen2.5-coder:14b
315
316
 
316
- βœ… Complete in 4 steps
317
+ # Start Ollama
318
+ ollama serve
317
319
  ```
318
320
 
319
- ### /scout-and-plan - Planning Only
321
+ ### Option 2: Claude (Cloud)
320
322
 
323
+ ```json
324
+ {
325
+ "version": "0.3.0",
326
+ "llm": {
327
+ "provider": "claude",
328
+ "model": "claude-3-sonnet-20240229",
329
+ "apiKey": "sk-ant-xxx",
330
+ "maxTokens": 4000,
331
+ "temperature": 0.7
332
+ }
333
+ }
321
334
  ```
322
- /scout-and-plan refactor auth to OAuth2
323
-
324
- Workflow:
325
- 1. Scout analyzes current auth
326
- 2. Planner creates OAuth2 migration plan
327
335
 
328
- πŸ“‹ Plan ready (no implementation)
336
+ **Setup:**
337
+ ```bash
338
+ # Get API key from https://console.anthropic.com
339
+ export ANTHROPIC_API_KEY=sk-ant-xxx
329
340
  ```
330
341
 
331
- ### /parallel - Parallel Reconnaissance
342
+ ### Option 3: OpenAI (Cloud)
332
343
 
344
+ ```json
345
+ {
346
+ "version": "0.3.0",
347
+ "llm": {
348
+ "provider": "openai",
349
+ "model": "gpt-4",
350
+ "apiKey": "sk-xxx",
351
+ "maxTokens": 4000,
352
+ "temperature": 0.7
353
+ }
354
+ }
333
355
  ```
334
- /parallel "Find auth code" "Find models" "Check dependencies"
335
356
 
336
- Runs 3 scouts simultaneously β†’ Aggregates results
357
+ ### Full Example with All Features
358
+
359
+ ```json
360
+ {
361
+ "version": "0.3.0",
362
+ "persona": {
363
+ "name": "0xKobold",
364
+ "emoji": "πŸ‰"
365
+ },
366
+ "llm": {
367
+ "provider": "ollama",
368
+ "model": "qwen2.5-coder:14b",
369
+ "baseUrl": "http://localhost:11434",
370
+ "maxTokens": 4000,
371
+ "temperature": 0.7
372
+ },
373
+ "gateway": {
374
+ "enabled": true,
375
+ "port": 7777,
376
+ "host": "localhost",
377
+ "remote": {
378
+ "enabled": false
379
+ }
380
+ },
381
+ "channels": {
382
+ "discord": { "enabled": false },
383
+ "whatsapp": { "enabled": true },
384
+ "telegram": { "enabled": false },
385
+ "slack": { "enabled": false }
386
+ }
387
+ }
337
388
  ```
338
389
 
339
- ## Ollama Cloud 🌩️
390
+ ---
340
391
 
341
- 0xKobold now supports Ollama Cloud for access to larger models without running Ollama locally.
392
+ ## CLI Commands
342
393
 
343
- ### Setup Cloud Access
394
+ ### Core
395
+ ```bash
396
+ 0xkobold setup # Interactive setup
397
+ 0xkobold tui # Start TUI (default)
398
+ 0xkobold tui --local # Local project mode
399
+ 0xkobold tui --remote <url> # Connect to remote gateway
400
+ ```
344
401
 
345
- 1. Get your API key from [ollama.com/settings/keys](https://ollama.com/settings/keys)
402
+ ### Channels
403
+ ```bash
404
+ 0xkobold whatsapp start|stop|status|send
405
+ 0xkobold telegram start|stop|status
406
+ 0xkobold slack webhook <message>
407
+ ```
346
408
 
347
- 2. Login via the TUI:
348
- ```
349
- /login
350
- # Select "Ollama Cloud"
351
- # Paste your API key
352
- ```
409
+ ### Gateway & Networking
410
+ ```bash
411
+ 0xkobold gateway start|stop|status
412
+ 0xkobold tailscale status # Check Tailscale IP
413
+ 0xkobold tailscale url # Get gateway URL
414
+ ```
353
415
 
354
- 3. Switch between modes:
355
- ```
356
- /ollama-mode cloud # Use cloud exclusively
357
- /ollama-mode local # Use local Ollama
358
- /ollama-mode auto # Auto-detect (default)
359
- ```
416
+ ### Security
417
+ ```bash
418
+ 0xkobold device init <name>
419
+ 0xkobold device token generate
420
+ 0xkobold device list
421
+ ```
360
422
 
361
- ### Cloud Models Available
423
+ ### Development
424
+ ```bash
425
+ 0xkobold check <description|function|class>
426
+ 0xkobold migrate --dry-run|live
427
+ 0xkobold status
428
+ 0xkobold logs
429
+ ```
362
430
 
363
- - **GPT-OSS 120B** - State-of-the-art open source
364
- - **Qwen 2.5 72B/32B** - Alibaba's instruction-tuned model
365
- - **DeepSeek R1 671B** - Reasoning-capable model
366
- - **Llama 3.2** - Meta's latest open weights
431
+ ---
367
432
 
368
- ### Quick Commands
433
+ ## Compared to OpenClaw
369
434
 
370
- - `/ollama-mode` - Show current mode and status
371
- - `/ollama-status` - Check cloud connection
372
- - `/ollama-local` - Switch to local mode
373
- - `/ollama-cloud` - Switch to cloud mode
435
+ | Metric | OpenClaw | 0xKobold v0.3.0 | Advantage |
436
+ |--------|----------|-----------------|-----------|
437
+ | **Lines of Code** | ~60,000 | ~8,000 | 7.5x simpler |
438
+ | **Dependencies** | 100+ | ~20 | 5x lighter |
439
+ | **Setup Time** | 30 min | 5 min | 6x faster |
440
+ | **Channels** | 5 | 4 | Feature parity |
441
+ | **Security** | βœ… | βœ… | Feature parity |
442
+ | **Media** | βœ… | βœ… | Feature parity |
443
+ | **Remote/VPS** | βœ… | βœ… | Feature parity |
444
+ | **Tailscale** | βœ… | βœ… | Feature parity |
374
445
 
375
- Your API key is securely stored in `~/.0xkobold/auth.json` with 0600 permissions.
446
+ **Our Philosophy:** OpenClaw power, 10x simpler.
376
447
 
377
- ## Commands
448
+ ---
378
449
 
379
- ```bash
380
- # Global install (recommended)
381
- npm install -g 0xkobold
450
+ ## API Usage
382
451
 
383
- # Interactive TUI (default)
384
- 0xkobold
385
- # or explicitly
386
- 0xkobold tui
387
-
388
- # Project mode (per-directory config)
389
- 0xkobold local
390
-
391
- # Gateway service
392
- 0xkobold start # Start daemon
393
- 0xkobold start -f # Start foreground
394
- 0xkobold stop # Stop daemon
395
- 0xkobold status # Check status
396
- 0xkobold logs # View logs
397
-
398
- # Agent management (v0.2.0+)
399
- 0xkobold agent init <name> # Create agent workspace
400
- 0xkobold agent start <name> # Start agent process
401
- 0xkobold agent stop <name> # Stop agent process
402
- 0xkobold agent status [name] # Check agent status
403
- 0xkobold agent list # List all agents
404
- 0xkobold agent logs <name> # View agent logs
405
-
406
- # Using npx (no install)
407
- npx 0xkobold
408
- npx 0xkobold tui --local
409
- ```
410
-
411
- ### CLI Commands (In TUI)
452
+ ### Gateway Client (Remote)
453
+ ```typescript
454
+ import { GatewayClient } from "0xkobold/gateway";
412
455
 
413
- **Agent Management (v0.2.0+)**
414
- ```
415
- /agent-init <name> # Create new agent workspace
416
- /agent-start <name> # Start agent process
417
- /agent-stop <name> # Stop agent process
418
- /agent-status [name] # Check agent status
419
- /agent-select <name> # Switch TUI to agent
420
- /agents # List all agents with status
421
- ```
456
+ const client = new GatewayClient({
457
+ url: "wss://your-vps.com:7777",
458
+ token: "xxx",
459
+ autoReconnect: true,
460
+ });
422
461
 
423
- **Autonomous Subagents**
462
+ await client.connect();
463
+ client.chat("Hello from my laptop");
424
464
  ```
425
- /implement <feature> # Auto-delegate based on complexity
426
- /scout-and-plan <feature> # Scout β†’ Planner only
427
- /parallel "task 1" "task 2" # Run scouts in parallel
428
-
429
- /autonomous-toggle [mode] # Control delegation
430
- /autonomous-status # Show current mode
431
- /delegation-plan <task> # Preview delegation strategy
432
465
 
433
- /subagents # List available subagents
434
- /subagent-create <name> # Create custom subagent
435
- ```
466
+ ### Sandbox
467
+ ```typescript
468
+ import { getDockerRunner } from "0xkobold/sandbox";
436
469
 
437
- **Ollama Cloud**
438
- ```
439
- /ollama-mode [local|cloud|auto] # Switch provider mode
440
- /ollama-status # Check cloud connection
441
- /login # Authenticate with Ollama Cloud
442
- ```
470
+ const runner = getDockerRunner({
471
+ memoryLimit: "256m",
472
+ cpuLimit: "0.5",
473
+ network: "none",
474
+ });
443
475
 
444
- **Mode Switching**
445
- ```
446
- /plan # Switch to plan mode
447
- /build # Switch to build mode
448
- /mode # Show current mode
449
- /modes # List available modes
476
+ const result = await runner.run({
477
+ command: "node",
478
+ args: ["script.js"],
479
+ });
450
480
  ```
451
481
 
452
- ## Configuration
482
+ ### Duplicate Detection
483
+ ```typescript
484
+ import { getDuplicateDetector } from "0xkobold/skills";
453
485
 
454
- Config is stored in `~/.config/kobold/kobold.json`:
486
+ const detector = getDuplicateDetector();
487
+ const result = await detector.check("New feature");
455
488
 
456
- ```json
457
- {
458
- "meta": {
459
- "version": "1.0.0"
460
- },
461
- "providers": {
462
- "ollama": {
463
- "enabled": true,
464
- "model": "kimi-k2.5:cloud"
465
- }
466
- },
467
- "gateway": {
468
- "enabled": true,
469
- "port": 18789
470
- },
471
- "discord": {
472
- "enabled": false,
473
- "token": "${DISCORD_BOT_TOKEN}"
474
- }
489
+ if (result.exists) {
490
+ console.log("Already exists!", result.matches[0].file);
475
491
  }
476
492
  ```
477
493
 
478
- Or use **Local Mode** for per-project configs:
479
- ```bash
480
- 0xkobold local # Creates/uses ./kobold.json in current directory
481
- ```
494
+ ---
495
+
496
+ ## Architecture
497
+
498
+ ```
499
+ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
500
+ β”‚ YOUR LAPTOP (Local) β”‚
501
+ β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
502
+ β”‚ β”‚ TUI (Bun) │◄──────►│ GatewayClient (WS) β”‚ β”‚
503
+ β”‚ β”‚ - Terminal β”‚ β”‚ - Remote Connection β”‚ β”‚
504
+ β”‚ β”‚ - File Ops β”‚ β”‚ - Auth Tokens β”‚ β”‚
505
+ β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
506
+ β”‚ β”‚ β”‚ β”‚
507
+ β”‚ β”‚ Local Files β”‚ WebSocket β”‚
508
+ β”‚ β”‚ β”‚ β”‚
509
+ β”‚ β”Œβ”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
510
+ β”‚ β”‚ .0xkobold/ (project) β”‚ β”‚ ~/.0xkobold/ β”‚ β”‚
511
+ β”‚ β”‚ - workspace.db β”‚ β”‚ - config.json β”‚ β”‚
512
+ β”‚ β”‚ - MEMORY.md β”‚ β”‚ - identity β”‚ β”‚
513
+ β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
514
+ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
515
+ β”‚
516
+ β”‚ wss:// or Tailscale
517
+ β–Ό
518
+ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
519
+ β”‚ VPS (Remote) OR Local β”‚
520
+ β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
521
+ β”‚ β”‚ Gateway Server (Bun) β”‚ β”‚
522
+ β”‚ β”‚ - WebSocket Server β”‚ β”‚
523
+ β”‚ β”‚ - Multi-client Support β”‚ β”‚
524
+ β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
525
+ β”‚ β”‚ β”‚
526
+ β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
527
+ β”‚ β–Ό β–Ό β–Ό β”‚
528
+ β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
529
+ β”‚ β”‚ Claude β”‚ β”‚ Docker β”‚ β”‚ Channels β”‚ β”‚
530
+ β”‚ β”‚ API β”‚ β”‚ Sandboxβ”‚ β”‚ (Discordβ”‚ β”‚
531
+ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ WhatsAppβ”‚ β”‚
532
+ β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
533
+ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
534
+ ```
535
+
536
+ ---
482
537
 
483
- ## Architecture Differences from OpenClaw
538
+ ## License
484
539
 
485
- | Aspect | OpenClaw | 0xKobold |
486
- |--------|----------|----------|
487
- | **Gateway** | Bun.serve | Elysia.js (3x faster) |
488
- | **Orchestration** | Tight coupling | Event bus (decoupled) |
489
- | **Agent Loop** | Custom | @mariozechner/pi-agent-core |
490
- | **Skills** | Compiled | Hot-reload .ts files |
491
- | **Approval** | Basic | Risk-based queue |
492
- | **Dependencies** | Many | Minimal (~10) |
540
+ MIT Β© 2025
493
541
 
494
- ## License
542
+ ---
543
+
544
+ **Built while you sleep by your Digital Familiar** πŸ‰
495
545
 
496
- MIT
546
+ *Join the future of personal AI at [0xkobold](https://github.com/moikapy/0xkobold)*