clawbee 2.0.0 → 2.1.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 +215 -52
- package/bin/clawbee.js +1022 -130
- package/lib/ai/provider.js +214 -0
- package/lib/automation/browser.js +154 -0
- package/lib/automation/system.js +193 -0
- package/lib/index.js +20 -0
- package/lib/integrations/discord.js +85 -0
- package/lib/integrations/slack.js +72 -0
- package/lib/integrations/telegram.js +95 -0
- package/lib/skills/manager.js +301 -0
- package/package.json +15 -15
- package/src/core/clawbee.ts +0 -124
- package/src/core/config.ts +0 -88
- package/src/core/memory.ts +0 -98
- package/src/index.ts +0 -14
- package/src/skills/manager.ts +0 -89
- package/src/types.ts +0 -73
package/README.md
CHANGED
|
@@ -2,48 +2,56 @@
|
|
|
2
2
|
|
|
3
3
|
**Your Personal AI, Endless Possibilities.**
|
|
4
4
|
|
|
5
|
-
ClawBee is an open-source AI assistant that runs locally on your machine and connects to any chat app you already use.
|
|
5
|
+
ClawBee is an open-source AI assistant that runs locally on your machine and connects to any chat app you already use. It's designed to automate your daily tasks while keeping your data private.
|
|
6
6
|
|
|
7
|
-
](https://www.npmjs.com/package/clawbee)
|
|
8
|
+
[](https://github.com/clawbeepro/clawbee/blob/main/LICENSE)
|
|
8
9
|
|
|
9
10
|
## ✨ Features
|
|
10
11
|
|
|
11
12
|
- 🖥️ **Runs Locally** - Your data stays on your machine
|
|
12
13
|
- 💬 **Any Chat App** - WhatsApp, Telegram, Discord, Slack, and more
|
|
13
14
|
- 🧠 **Persistent Memory** - Remembers context across conversations
|
|
14
|
-
- 🌐 **Browser Control** - Automate web tasks
|
|
15
|
+
- 🌐 **Browser Control** - Automate web tasks with Puppeteer
|
|
15
16
|
- 🔧 **Extensible** - Add skills from the marketplace or build your own
|
|
16
|
-
-
|
|
17
|
+
- 🔐 **Private & Secure** - Full control over your data
|
|
18
|
+
- 🤖 **Multi-AI Support** - OpenAI, Anthropic, Google, or local models (Ollama)
|
|
17
19
|
|
|
18
20
|
## 🚀 Quick Start
|
|
19
21
|
|
|
20
|
-
###
|
|
22
|
+
### Install via npm
|
|
21
23
|
|
|
22
24
|
```bash
|
|
23
|
-
|
|
25
|
+
npm install -g clawbee
|
|
26
|
+
clawbee onboard
|
|
24
27
|
```
|
|
25
28
|
|
|
26
|
-
###
|
|
29
|
+
### Install via One-liner
|
|
27
30
|
|
|
28
31
|
```bash
|
|
29
|
-
|
|
30
|
-
clawbee
|
|
32
|
+
# macOS/Linux
|
|
33
|
+
curl -fsSL https://clawbee.pro/install.sh | bash
|
|
34
|
+
|
|
35
|
+
# Windows (PowerShell)
|
|
36
|
+
irm https://clawbee.pro/install.ps1 | iex
|
|
31
37
|
```
|
|
32
38
|
|
|
33
|
-
###
|
|
39
|
+
### Install from Source
|
|
34
40
|
|
|
35
41
|
```bash
|
|
36
42
|
git clone https://github.com/clawbeepro/clawbee.git
|
|
37
43
|
cd clawbee
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
44
|
+
npm install
|
|
45
|
+
npm link
|
|
46
|
+
clawbee onboard
|
|
41
47
|
```
|
|
42
48
|
|
|
43
49
|
## 📖 Usage
|
|
44
50
|
|
|
51
|
+
### Basic Commands
|
|
52
|
+
|
|
45
53
|
```bash
|
|
46
|
-
#
|
|
54
|
+
# Initial setup
|
|
47
55
|
clawbee onboard
|
|
48
56
|
|
|
49
57
|
# Start the daemon
|
|
@@ -52,76 +60,230 @@ clawbee start
|
|
|
52
60
|
# Chat in terminal
|
|
53
61
|
clawbee chat
|
|
54
62
|
|
|
55
|
-
#
|
|
56
|
-
clawbee
|
|
57
|
-
clawbee connect telegram
|
|
58
|
-
clawbee connect discord
|
|
63
|
+
# Send a single message
|
|
64
|
+
clawbee chat -s "What's the weather like?"
|
|
59
65
|
|
|
60
66
|
# Check status
|
|
61
67
|
clawbee status
|
|
62
68
|
|
|
63
|
-
#
|
|
69
|
+
# View logs
|
|
70
|
+
clawbee logs
|
|
71
|
+
|
|
72
|
+
# Update ClawBee
|
|
73
|
+
clawbee update
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
### Connect Chat Platforms
|
|
77
|
+
|
|
78
|
+
```bash
|
|
79
|
+
# Connect Telegram
|
|
80
|
+
clawbee connect telegram
|
|
81
|
+
|
|
82
|
+
# Connect Discord
|
|
83
|
+
clawbee connect discord
|
|
84
|
+
|
|
85
|
+
# Connect Slack
|
|
86
|
+
clawbee connect slack
|
|
87
|
+
|
|
88
|
+
# Connect WhatsApp (coming soon)
|
|
89
|
+
clawbee connect whatsapp
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
### Manage Skills
|
|
93
|
+
|
|
94
|
+
```bash
|
|
95
|
+
# List installed skills
|
|
64
96
|
clawbee skills list
|
|
97
|
+
|
|
98
|
+
# Search for skills
|
|
99
|
+
clawbee skills search email
|
|
100
|
+
|
|
101
|
+
# Install a skill
|
|
65
102
|
clawbee skills install email-manager
|
|
66
|
-
clawbee skills search calendar
|
|
67
103
|
|
|
68
|
-
#
|
|
104
|
+
# Remove a skill
|
|
105
|
+
clawbee skills remove email-manager
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
### Configuration
|
|
109
|
+
|
|
110
|
+
```bash
|
|
111
|
+
# Show configuration
|
|
69
112
|
clawbee config show
|
|
70
|
-
|
|
71
|
-
|
|
113
|
+
|
|
114
|
+
# Set a value
|
|
115
|
+
clawbee config set ai.model gpt-4-turbo
|
|
116
|
+
clawbee config set ai.temperature 0.8
|
|
117
|
+
|
|
118
|
+
# Get a value
|
|
119
|
+
clawbee config get ai.provider
|
|
120
|
+
|
|
121
|
+
# Reset configuration
|
|
122
|
+
clawbee config reset
|
|
123
|
+
|
|
124
|
+
# Edit config file directly
|
|
125
|
+
clawbee config edit
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
### Memory Management
|
|
129
|
+
|
|
130
|
+
```bash
|
|
131
|
+
# Show conversation history
|
|
132
|
+
clawbee memory show
|
|
133
|
+
|
|
134
|
+
# Clear memory
|
|
135
|
+
clawbee memory clear
|
|
136
|
+
|
|
137
|
+
# Export memory
|
|
138
|
+
clawbee memory export
|
|
139
|
+
|
|
140
|
+
# Memory statistics
|
|
141
|
+
clawbee memory stats
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
## 🔌 AI Providers
|
|
145
|
+
|
|
146
|
+
ClawBee supports multiple AI providers:
|
|
147
|
+
|
|
148
|
+
| Provider | Models | API Key Required |
|
|
149
|
+
|----------|--------|------------------|
|
|
150
|
+
| OpenAI | GPT-4, GPT-4 Turbo, GPT-3.5 | Yes |
|
|
151
|
+
| Anthropic | Claude 3 Opus, Sonnet, Haiku | Yes |
|
|
152
|
+
| Google | Gemini Pro, Gemini Pro Vision | Yes |
|
|
153
|
+
| Ollama | Llama 2, Mistral, CodeLlama, etc. | No (local) |
|
|
154
|
+
|
|
155
|
+
### Setting up API Keys
|
|
156
|
+
|
|
157
|
+
```bash
|
|
158
|
+
# OpenAI
|
|
159
|
+
clawbee config set ai.apiKey sk-your-openai-key
|
|
160
|
+
|
|
161
|
+
# Anthropic
|
|
162
|
+
clawbee config set ai.apiKey sk-ant-your-anthropic-key
|
|
163
|
+
|
|
164
|
+
# Google
|
|
165
|
+
clawbee config set ai.apiKey your-google-api-key
|
|
72
166
|
```
|
|
73
167
|
|
|
74
|
-
|
|
168
|
+
### Using Local Models (Ollama)
|
|
169
|
+
|
|
170
|
+
1. Install Ollama: https://ollama.ai
|
|
171
|
+
2. Pull a model: `ollama pull llama2`
|
|
172
|
+
3. Configure ClawBee:
|
|
173
|
+
```bash
|
|
174
|
+
clawbee config set ai.provider local
|
|
175
|
+
clawbee config set ai.model llama2
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
## 🔗 Integrations
|
|
179
|
+
|
|
180
|
+
### Telegram
|
|
75
181
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
| Discord | ✅ Supported |
|
|
81
|
-
| Slack | ✅ Supported |
|
|
82
|
-
| Signal | 🚧 Coming Soon |
|
|
83
|
-
| iMessage | 🚧 Coming Soon |
|
|
182
|
+
1. Message @BotFather on Telegram
|
|
183
|
+
2. Create a new bot with `/newbot`
|
|
184
|
+
3. Copy the token
|
|
185
|
+
4. Run `clawbee connect telegram`
|
|
84
186
|
|
|
85
|
-
|
|
187
|
+
### Discord
|
|
86
188
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
189
|
+
1. Go to https://discord.com/developers/applications
|
|
190
|
+
2. Create a new application
|
|
191
|
+
3. Go to Bot section, create a bot
|
|
192
|
+
4. Enable MESSAGE CONTENT INTENT
|
|
193
|
+
5. Copy the token
|
|
194
|
+
6. Run `clawbee connect discord`
|
|
91
195
|
|
|
92
|
-
|
|
196
|
+
### Slack
|
|
197
|
+
|
|
198
|
+
1. Go to https://api.slack.com/apps
|
|
199
|
+
2. Create a new app
|
|
200
|
+
3. Add OAuth scopes: `chat:write`, `app_mentions:read`, `im:history`
|
|
201
|
+
4. Install app to workspace
|
|
202
|
+
5. Run `clawbee connect slack`
|
|
203
|
+
|
|
204
|
+
## 📁 File Structure
|
|
93
205
|
|
|
94
206
|
```
|
|
95
|
-
~/.config/clawbee/
|
|
207
|
+
~/.config/clawbee/
|
|
208
|
+
├── config.json # Main configuration
|
|
209
|
+
|
|
96
210
|
~/.local/share/clawbee/
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
211
|
+
├── skills/ # Installed skills
|
|
212
|
+
├── memory/ # Conversation memory
|
|
213
|
+
│ └── conversations.json
|
|
214
|
+
├── logs/ # Log files
|
|
215
|
+
│ └── clawbee.log
|
|
216
|
+
└── integrations/ # Integration data
|
|
100
217
|
```
|
|
101
218
|
|
|
102
219
|
## 🛠️ Development
|
|
103
220
|
|
|
221
|
+
### Building from Source
|
|
222
|
+
|
|
104
223
|
```bash
|
|
105
|
-
# Clone the repo
|
|
106
224
|
git clone https://github.com/clawbeepro/clawbee.git
|
|
107
225
|
cd clawbee
|
|
226
|
+
npm install
|
|
227
|
+
```
|
|
228
|
+
|
|
229
|
+
### Creating a Skill
|
|
230
|
+
|
|
231
|
+
```javascript
|
|
232
|
+
// skills/my-skill/manifest.json
|
|
233
|
+
{
|
|
234
|
+
"name": "my-skill",
|
|
235
|
+
"version": "1.0.0",
|
|
236
|
+
"description": "My custom skill",
|
|
237
|
+
"commands": [
|
|
238
|
+
{
|
|
239
|
+
"name": "mycommand",
|
|
240
|
+
"description": "Does something",
|
|
241
|
+
"handler": "handleCommand"
|
|
242
|
+
}
|
|
243
|
+
],
|
|
244
|
+
"triggers": [
|
|
245
|
+
{
|
|
246
|
+
"type": "keyword",
|
|
247
|
+
"pattern": "my trigger",
|
|
248
|
+
"handler": "handleTrigger"
|
|
249
|
+
}
|
|
250
|
+
]
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
// skills/my-skill/index.js
|
|
254
|
+
module.exports = {
|
|
255
|
+
handleCommand: async (args, context) => {
|
|
256
|
+
return "Command executed!";
|
|
257
|
+
},
|
|
258
|
+
handleTrigger: async (message, context) => {
|
|
259
|
+
return "Trigger activated!";
|
|
260
|
+
}
|
|
261
|
+
};
|
|
262
|
+
```
|
|
263
|
+
|
|
264
|
+
### Using as a Library
|
|
108
265
|
|
|
109
|
-
|
|
110
|
-
|
|
266
|
+
```javascript
|
|
267
|
+
const { AIProvider, SkillManager } = require('clawbee');
|
|
111
268
|
|
|
112
|
-
|
|
113
|
-
|
|
269
|
+
// Create AI provider
|
|
270
|
+
const ai = new AIProvider({
|
|
271
|
+
provider: 'openai',
|
|
272
|
+
apiKey: 'sk-...',
|
|
273
|
+
model: 'gpt-4'
|
|
274
|
+
});
|
|
114
275
|
|
|
115
|
-
|
|
116
|
-
|
|
276
|
+
// Chat
|
|
277
|
+
const response = await ai.chat([
|
|
278
|
+
{ role: 'user', content: 'Hello!' }
|
|
279
|
+
]);
|
|
117
280
|
|
|
118
|
-
|
|
119
|
-
pnpm test
|
|
281
|
+
console.log(response.content);
|
|
120
282
|
```
|
|
121
283
|
|
|
122
284
|
## 🤝 Contributing
|
|
123
285
|
|
|
124
|
-
We welcome contributions! Please see our [Contributing Guide](CONTRIBUTING.md)
|
|
286
|
+
We welcome contributions! Please see our [Contributing Guide](CONTRIBUTING.md).
|
|
125
287
|
|
|
126
288
|
1. Fork the repository
|
|
127
289
|
2. Create your feature branch (`git checkout -b feature/amazing-feature`)
|
|
@@ -140,6 +302,7 @@ MIT License - see the [LICENSE](LICENSE) file for details.
|
|
|
140
302
|
- [Skill Marketplace](https://clawbee.pro/marketplace)
|
|
141
303
|
- [Discord Community](https://discord.gg/clawbee)
|
|
142
304
|
- [GitHub](https://github.com/clawbeepro/clawbee)
|
|
305
|
+
- [npm](https://www.npmjs.com/package/clawbee)
|
|
143
306
|
|
|
144
307
|
---
|
|
145
308
|
|