ps-claw 1.0.8 → 1.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 +225 -94
- package/package.json +5 -2
- package/ps-claw.cmd +2 -0
- package/ps-claw.sh +2 -0
package/README.md
CHANGED
|
@@ -1,169 +1,300 @@
|
|
|
1
1
|
# PS Claw 🦞
|
|
2
2
|
|
|
3
|
-
**PS Claw**
|
|
3
|
+
**PS Claw** — Agente de IA autônomo leve com interface web estilo ChatGPT. Multi-canal (Telegram, Discord, WhatsApp) com suporte a modelos de múltiplos provedores (Claude, GPT-4, Gemini).
|
|
4
4
|
|
|
5
|
-
Fork enxuto com
|
|
5
|
+
Fork enxuto do [OpenClaw](https://github.com/openclaw/openclaw) focado em leveza, facilidade de uso e sem dependências pesadas.
|
|
6
6
|
|
|
7
7
|
---
|
|
8
8
|
|
|
9
|
-
## ⚡
|
|
9
|
+
## ⚡ Início Rápido (5 minutos)
|
|
10
10
|
|
|
11
11
|
### Requisitos
|
|
12
|
-
- [Node.js](https://nodejs.org/) v22.19
|
|
12
|
+
- [Node.js](https://nodejs.org/) **v22.19+** (baixe a versão LTS)
|
|
13
|
+
- npm (incluído com Node.js)
|
|
13
14
|
|
|
14
|
-
### Instalar
|
|
15
|
+
### 1️⃣ Instalar e executar
|
|
15
16
|
|
|
16
17
|
```bash
|
|
17
|
-
|
|
18
|
+
npx ps-claw@latest web
|
|
18
19
|
```
|
|
19
20
|
|
|
20
|
-
Pronto!
|
|
21
|
+
Pronto! A interface web abre em **http://localhost:3000** 🎉
|
|
21
22
|
|
|
22
|
-
|
|
23
|
-
npm i -g ps-claw
|
|
24
|
-
```
|
|
23
|
+
---
|
|
25
24
|
|
|
26
|
-
|
|
25
|
+
## 🌐 Interface Web
|
|
27
26
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
```
|
|
27
|
+
### O que é?
|
|
28
|
+
Interface visual estilo ChatGPT para conversar com o agente de IA. Salva histórico no navegador, permite trocar modelos, configurar gateways.
|
|
31
29
|
|
|
32
|
-
###
|
|
30
|
+
### Como usar?
|
|
33
31
|
|
|
34
32
|
```bash
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
33
|
+
# Abrir a interface web
|
|
34
|
+
npx ps-claw web
|
|
35
|
+
|
|
36
|
+
# Ou executar tudo junto (agente + web)
|
|
37
|
+
npx ps-claw all
|
|
39
38
|
```
|
|
40
39
|
|
|
40
|
+
Acesse: **http://localhost:3000**
|
|
41
|
+
|
|
42
|
+
### Configuração na interface
|
|
43
|
+
|
|
44
|
+
1. Vá para a aba **🔌 Gateways**
|
|
45
|
+
- Clique **+ Adicionar**
|
|
46
|
+
- URL: `http://localhost:18789` (PS Claw local) ou qualquer API OpenAI-compatível
|
|
47
|
+
- Nome: "Meu Gateway"
|
|
48
|
+
- Clique **Adicionar**
|
|
49
|
+
|
|
50
|
+
2. Vá para a aba **🤖 Modelos & Provedores**
|
|
51
|
+
- Adicione suas **chaves de API**:
|
|
52
|
+
- **Claude** (Anthropic): `sk-ant-...`
|
|
53
|
+
- **GPT-4** (OpenAI): `sk-...`
|
|
54
|
+
- **Gemini** (Google): `AIza...`
|
|
55
|
+
- **Mistral**: sua chave
|
|
56
|
+
- Selecione um modelo
|
|
57
|
+
- Clique no modelo para usá-lo
|
|
58
|
+
|
|
59
|
+
3. Volte para **💬 Chat** e comece a conversar! 💬
|
|
60
|
+
|
|
41
61
|
---
|
|
42
62
|
|
|
43
|
-
##
|
|
63
|
+
## 🔑 Chaves de API — Como obter
|
|
64
|
+
|
|
65
|
+
### 🟠 Anthropic (Claude)
|
|
66
|
+
|
|
67
|
+
1. Acesse https://console.anthropic.com
|
|
68
|
+
2. Faça login ou crie conta
|
|
69
|
+
3. Vá para **API Keys**
|
|
70
|
+
4. Clique **Create Key**
|
|
71
|
+
5. Copie a chave `sk-ant-...`
|
|
72
|
+
6. Cole na aba **Modelos** do PS Claw
|
|
73
|
+
|
|
74
|
+
**Grátis?** Sim, Claude oferece créditos iniciais ($5-$20). Depois é por uso.
|
|
75
|
+
|
|
76
|
+
### 🟢 OpenAI (GPT-4, GPT-4o)
|
|
77
|
+
|
|
78
|
+
1. Acesse https://platform.openai.com
|
|
79
|
+
2. Faça login ou crie conta
|
|
80
|
+
3. Vá para **API Keys**
|
|
81
|
+
4. Clique **Create new secret key**
|
|
82
|
+
5. Copie a chave `sk-...`
|
|
83
|
+
6. Cole na aba **Modelos** do PS Claw
|
|
84
|
+
|
|
85
|
+
**Grátis?** Sim, trial de $5-$18. Depois é por uso (mais barato que Claude).
|
|
86
|
+
|
|
87
|
+
### 🔵 Google (Gemini)
|
|
88
|
+
|
|
89
|
+
1. Acesse https://aistudio.google.com/apikey
|
|
90
|
+
2. Clique **Create API Key**
|
|
91
|
+
3. Selecione um projeto ou crie novo
|
|
92
|
+
4. Copie a chave `AIza...`
|
|
93
|
+
5. Cole na aba **Modelos** do PS Claw
|
|
44
94
|
|
|
45
|
-
|
|
95
|
+
**Grátis?** Sim, 60 chamadas por minuto para sempre.
|
|
46
96
|
|
|
47
|
-
|
|
97
|
+
### 🟣 Mistral
|
|
98
|
+
|
|
99
|
+
1. Acesse https://console.mistral.ai
|
|
100
|
+
2. Faça login ou crie conta
|
|
101
|
+
3. Vá para **API Keys**
|
|
102
|
+
4. Clique **Generate a new key**
|
|
103
|
+
5. Copie a chave
|
|
104
|
+
6. Cole na aba **Modelos** do PS Claw
|
|
105
|
+
|
|
106
|
+
**Grátis?** Sim, trial de crédito. Depois por uso.
|
|
107
|
+
|
|
108
|
+
---
|
|
109
|
+
|
|
110
|
+
## 🚀 Alternativas de Uso
|
|
111
|
+
|
|
112
|
+
### Via Git Clone (desenvolvedores)
|
|
48
113
|
|
|
49
114
|
```bash
|
|
50
|
-
ps-claw
|
|
51
|
-
ps-claw
|
|
52
|
-
|
|
53
|
-
ps-claw
|
|
54
|
-
ps-claw gateway status # Verifica status do gateway
|
|
55
|
-
ps-claw doctor # Diagnóstico do sistema
|
|
56
|
-
ps-claw models list # Lista modelos disponíveis
|
|
57
|
-
ps-claw secrets set openai # Configura chave OpenAI
|
|
58
|
-
ps-claw secrets set anthropic # Configura chave Anthropic
|
|
59
|
-
ps-claw configure # Configuração interativa
|
|
115
|
+
git clone https://github.com/Pedro21062014/ps-claw-v2.git
|
|
116
|
+
cd ps-claw-v2
|
|
117
|
+
npm install
|
|
118
|
+
npx ps-claw web
|
|
60
119
|
```
|
|
61
120
|
|
|
62
|
-
###
|
|
121
|
+
### Instalar Globalmente
|
|
63
122
|
|
|
64
123
|
```bash
|
|
124
|
+
npm install -g ps-claw@latest
|
|
65
125
|
ps-claw web
|
|
66
126
|
```
|
|
67
127
|
|
|
68
|
-
|
|
128
|
+
Se não funcionar em Windows, use `npx ps-claw web` em vez disso.
|
|
69
129
|
|
|
70
|
-
|
|
71
|
-
- 💬 **Chat** — conversas com histórico salvo localmente
|
|
72
|
-
- 🔗 **Gateways** — conectar e gerenciar APIs (OpenAI, Anthropic, Ollama, LM Studio, etc.)
|
|
73
|
-
- 🧠 **Modelos** — selecionar modelos por provedor (GPT-4o, Claude Opus 4.5, Gemini 2.5 Pro, DeepSeek...)
|
|
74
|
-
- ⚙️ **Config** — temperatura, max tokens, system prompt, chaves de API, export/import de configurações
|
|
130
|
+
### Atualizar
|
|
75
131
|
|
|
76
|
-
|
|
132
|
+
```bash
|
|
133
|
+
npx ps-claw update
|
|
134
|
+
# ou
|
|
135
|
+
npm install -g ps-claw@latest
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
---
|
|
139
|
+
|
|
140
|
+
## ⚙️ Configurações Avançadas
|
|
141
|
+
|
|
142
|
+
### Variáveis de Ambiente
|
|
77
143
|
|
|
78
144
|
```bash
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
145
|
+
# Porta da interface web (padrão: 3000)
|
|
146
|
+
set PS_CLAW_WEB_PORT=3000
|
|
147
|
+
|
|
148
|
+
# Porta do gateway PS Claw (padrão: 18789)
|
|
149
|
+
set PS_CLAW_GATEWAY_PORT=18789
|
|
150
|
+
|
|
151
|
+
# Token do gateway (se tiver autenticação)
|
|
152
|
+
set OPENCLAW_GATEWAY_TOKEN=seu_token_aqui
|
|
87
153
|
```
|
|
88
154
|
|
|
89
|
-
|
|
155
|
+
### Usar outro Gateway
|
|
156
|
+
|
|
157
|
+
Se você tem um PS Claw rodando em outro servidor:
|
|
158
|
+
|
|
159
|
+
1. Na interface, aba **🔌 Gateways**
|
|
160
|
+
2. Adicione a URL: `http://seu-servidor:18789`
|
|
161
|
+
3. Pronto! Usa esse gateway
|
|
162
|
+
|
|
163
|
+
### Usar API OpenAI-compatível
|
|
164
|
+
|
|
165
|
+
Muitos serviços são compatíveis com OpenAI API:
|
|
166
|
+
|
|
167
|
+
- **Ollama** (modelos locais): `http://localhost:11434`
|
|
168
|
+
- **Vllm** (inference server): `http://localhost:8000`
|
|
169
|
+
- **LiteLLM**: qualquer URL proxy
|
|
170
|
+
|
|
171
|
+
Configure na aba **Gateways** com a URL do seu servidor.
|
|
90
172
|
|
|
91
173
|
---
|
|
92
174
|
|
|
93
|
-
##
|
|
175
|
+
## 📱 Canais (Telegram, Discord, WhatsApp)
|
|
176
|
+
|
|
177
|
+
Você pode conectar o PS Claw a:
|
|
178
|
+
|
|
179
|
+
- **Telegram** — Adicionar bot ao chat
|
|
180
|
+
- **Discord** — Adicionar bot ao servidor
|
|
181
|
+
- **WhatsApp** — Integração via Twilio ou Baileys
|
|
182
|
+
- **Slack** — Bot em workspace
|
|
183
|
+
|
|
184
|
+
Configure na interface ou edite `.env`:
|
|
94
185
|
|
|
95
186
|
```bash
|
|
96
|
-
|
|
187
|
+
# .env.example
|
|
188
|
+
TELEGRAM_BOT_TOKEN=seu_token
|
|
189
|
+
DISCORD_BOT_TOKEN=seu_token
|
|
190
|
+
WHATSAPP_PHONE=seu_numero
|
|
97
191
|
```
|
|
98
192
|
|
|
99
|
-
|
|
193
|
+
Copie `.env.example` para `.env` e preencha.
|
|
194
|
+
|
|
195
|
+
---
|
|
196
|
+
|
|
197
|
+
## 🐳 Docker
|
|
100
198
|
|
|
101
199
|
```bash
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
200
|
+
# Build
|
|
201
|
+
docker build -t ps-claw .
|
|
202
|
+
|
|
203
|
+
# Run
|
|
204
|
+
docker run -p 3000:3000 ps-claw web
|
|
106
205
|
```
|
|
107
206
|
|
|
108
207
|
---
|
|
109
208
|
|
|
110
|
-
## ✅
|
|
209
|
+
## ✅ Recursos Incluídos
|
|
111
210
|
|
|
112
211
|
| Recurso | Status |
|
|
113
|
-
|
|
114
|
-
|
|
|
115
|
-
|
|
|
116
|
-
|
|
|
117
|
-
|
|
|
118
|
-
|
|
|
119
|
-
| Busca na web (DuckDuckGo, Brave) | ✅ |
|
|
120
|
-
| Suporte a MCP / Skills | ✅ |
|
|
212
|
+
|---------|--------|
|
|
213
|
+
| Interface web estilo ChatGPT | ✅ |
|
|
214
|
+
| Chat com histórico | ✅ |
|
|
215
|
+
| Múltiplos modelos | ✅ |
|
|
216
|
+
| Telegram, Discord, WhatsApp | ✅ |
|
|
217
|
+
| Busca na web | ✅ |
|
|
121
218
|
| Memória persistente | ✅ |
|
|
122
|
-
|
|
|
123
|
-
|
|
|
124
|
-
|
|
|
125
|
-
|
|
|
219
|
+
| CLI + API | ✅ |
|
|
220
|
+
| Suporte MCP/Skills | ✅ |
|
|
221
|
+
| Apps iOS/Android | ❌ removido |
|
|
222
|
+
| Geração de vídeo/música | ❌ removido |
|
|
223
|
+
| Transcrição em tempo real | ❌ removido |
|
|
126
224
|
|
|
127
225
|
---
|
|
128
226
|
|
|
129
|
-
##
|
|
227
|
+
## 🆘 Resolução de Problemas
|
|
228
|
+
|
|
229
|
+
### "ps-claw: comando não encontrado"
|
|
230
|
+
|
|
231
|
+
**Solução:** Use `npx ps-claw web` em vez de `ps-claw web`
|
|
232
|
+
|
|
233
|
+
### "localhost:3000 recusou conexão"
|
|
234
|
+
|
|
235
|
+
**Solução:** Verifique se algum programa já usa a porta 3000:
|
|
236
|
+
|
|
237
|
+
```bash
|
|
238
|
+
# Windows
|
|
239
|
+
netstat -ano | findstr :3000
|
|
240
|
+
|
|
241
|
+
# Mac/Linux
|
|
242
|
+
lsof -i :3000
|
|
243
|
+
```
|
|
244
|
+
|
|
245
|
+
Se estiver em uso, mude a porta:
|
|
130
246
|
|
|
131
247
|
```bash
|
|
132
|
-
|
|
248
|
+
set PS_CLAW_WEB_PORT=3001
|
|
249
|
+
npx ps-claw web
|
|
133
250
|
```
|
|
134
251
|
|
|
252
|
+
### "Gateway offline"
|
|
253
|
+
|
|
254
|
+
**Solução:** Verifique se:
|
|
255
|
+
|
|
256
|
+
1. A URL está correta (ex: `http://localhost:18789`)
|
|
257
|
+
2. O gateway está rodando (se for local, execute `npx ps-claw start`)
|
|
258
|
+
3. Firewall não está bloqueando
|
|
259
|
+
|
|
260
|
+
### "Chave de API inválida"
|
|
261
|
+
|
|
262
|
+
**Solução:**
|
|
263
|
+
|
|
264
|
+
1. Copie a chave completa (sem espaços)
|
|
265
|
+
2. Verifique se é uma chave válida (não expirou)
|
|
266
|
+
3. Cole de novo na aba **Modelos**
|
|
267
|
+
|
|
135
268
|
---
|
|
136
269
|
|
|
137
|
-
##
|
|
270
|
+
## 📚 Documentação Completa
|
|
138
271
|
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
│ └── build-all.mjs ← Script de build
|
|
144
|
-
├── web-ui/
|
|
145
|
-
│ ├── server.mjs ← Servidor da interface web
|
|
146
|
-
│ └── public/
|
|
147
|
-
│ └── index.html ← Interface web (Chat, Gateways, Modelos, Config)
|
|
148
|
-
├── src/ ← Código-fonte TypeScript
|
|
149
|
-
├── extensions/ ← Provedores (OpenAI, Anthropic, DeepSeek...)
|
|
150
|
-
├── packages/ ← Bibliotecas internas
|
|
151
|
-
├── .env.example ← Exemplo de configuração
|
|
152
|
-
└── package.json
|
|
153
|
-
```
|
|
272
|
+
- [OpenClaw (original)](https://github.com/openclaw/openclaw)
|
|
273
|
+
- [Anthropic Claude](https://console.anthropic.com/docs)
|
|
274
|
+
- [OpenAI API](https://platform.openai.com/docs)
|
|
275
|
+
- [Google Gemini](https://aistudio.google.com/app/apikey)
|
|
154
276
|
|
|
155
277
|
---
|
|
156
278
|
|
|
157
|
-
##
|
|
279
|
+
## 📄 Licença
|
|
158
280
|
|
|
159
|
-
|
|
281
|
+
MIT — Baseado no [OpenClaw](https://github.com/openclaw/openclaw) por Peter Steinberger
|
|
160
282
|
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
283
|
+
---
|
|
284
|
+
|
|
285
|
+
## 🤝 Contribuições
|
|
286
|
+
|
|
287
|
+
Pull requests bem-vindo! Para mudanças grandes, abra uma issue primeiro.
|
|
164
288
|
|
|
165
289
|
---
|
|
166
290
|
|
|
167
|
-
##
|
|
291
|
+
## 💬 Suporte
|
|
292
|
+
|
|
293
|
+
- GitHub Issues: https://github.com/Pedro21062014/ps-claw-v2/issues
|
|
294
|
+
- Discussões: https://github.com/Pedro21062014/ps-claw-v2/discussions
|
|
295
|
+
|
|
296
|
+
---
|
|
297
|
+
|
|
298
|
+
**Aproveite o PS Claw! 🦞**
|
|
168
299
|
|
|
169
|
-
|
|
300
|
+
Dúvidas? Abra uma issue no GitHub ou entre em contato! ✨
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ps-claw",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "PS Claw - AI Agent Gateway with multi-provider support, web UI, and CLI. Lightweight fork of OpenClaw.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ai",
|
|
@@ -33,7 +33,8 @@
|
|
|
33
33
|
"registry": "https://registry.npmjs.org/"
|
|
34
34
|
},
|
|
35
35
|
"bin": {
|
|
36
|
-
"ps-claw": "cli.mjs"
|
|
36
|
+
"ps-claw": "cli.mjs",
|
|
37
|
+
"psclaw": "cli.mjs"
|
|
37
38
|
},
|
|
38
39
|
"directories": {
|
|
39
40
|
"doc": "docs",
|
|
@@ -41,6 +42,8 @@
|
|
|
41
42
|
},
|
|
42
43
|
"files": [
|
|
43
44
|
"cli.mjs",
|
|
45
|
+
"ps-claw.cmd",
|
|
46
|
+
"ps-claw.sh",
|
|
44
47
|
"web-ui/",
|
|
45
48
|
"update.sh",
|
|
46
49
|
"README.md",
|
package/ps-claw.cmd
ADDED
package/ps-claw.sh
ADDED