ps-claw 2026.5.30
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/LICENSE +24 -0
- package/README.md +149 -0
- package/dist/entry.js +163 -0
- package/dist/entry.mjs +163 -0
- package/dist/web-ui/public/index.html +1179 -0
- package/dist/web-ui/server.mjs +192 -0
- package/package.json +1961 -0
- package/patches/.gitkeep +1 -0
- package/pnpm-workspace.yaml +121 -0
- package/ps-claw.mjs +661 -0
- package/src/agents/templates/HEARTBEAT.md +3 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 OpenClaw Foundation
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
22
|
+
|
|
23
|
+
Third-party notices for incorporated or adapted code are recorded in
|
|
24
|
+
THIRD_PARTY_NOTICES.md.
|
package/README.md
ADDED
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
# PS Claw 🦞
|
|
2
|
+
|
|
3
|
+
**PS Claw** é uma versão leve do [OpenClaw](https://github.com/openclaw/openclaw) — agente de IA autônomo multi-canal com interface web estilo ChatGPT.
|
|
4
|
+
|
|
5
|
+
Fork enxuto com foco em leveza e facilidade de uso, sem apps mobile, geração de mídia pesada ou componentes desnecessários.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## ⚡ Instalação rápida
|
|
10
|
+
|
|
11
|
+
### Requisitos
|
|
12
|
+
- [Node.js](https://nodejs.org/) v22.19 ou superior
|
|
13
|
+
- [pnpm](https://pnpm.io/) ou npm
|
|
14
|
+
|
|
15
|
+
### 1. Clonar o repositório
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
git clone https://github.com/Pedro21062014/ps-claw-v2.git
|
|
19
|
+
cd ps-claw-v2
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
### 2. Instalar dependências
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
npm install
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
### 3. Configurar
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
cp .env.example .env
|
|
32
|
+
# Edite o .env com sua chave de API
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
### 4. Iniciar o PS Claw
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
node openclaw.mjs
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
### 5. Abrir a interface web
|
|
42
|
+
|
|
43
|
+
Em outro terminal:
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
node web-ui/server.mjs
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
Acesse **http://localhost:3000** no navegador e aproveite a interface! 🎉
|
|
50
|
+
|
|
51
|
+
---
|
|
52
|
+
|
|
53
|
+
## 🌐 Interface Web
|
|
54
|
+
|
|
55
|
+
O PS Claw vem com uma interface estilo ChatGPT embutida. Para usar:
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
# Terminal 1 — inicia o agente
|
|
59
|
+
node openclaw.mjs
|
|
60
|
+
|
|
61
|
+
# Terminal 2 — inicia a interface web
|
|
62
|
+
node web-ui/server.mjs
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
Depois acesse: **http://localhost:3000**
|
|
66
|
+
|
|
67
|
+
### Funcionalidades da interface
|
|
68
|
+
- 💬 Chat com o agente em tempo real
|
|
69
|
+
- 🗂️ Histórico de conversas salvo localmente
|
|
70
|
+
- 🔄 Troca de modelo (Claude, GPT-4o, Gemini...)
|
|
71
|
+
- ⚙️ Painel de configurações
|
|
72
|
+
- 📱 Responsivo para mobile
|
|
73
|
+
|
|
74
|
+
### Variáveis de ambiente da interface
|
|
75
|
+
|
|
76
|
+
```bash
|
|
77
|
+
PS_CLAW_WEB_PORT=3000 # Porta da interface (padrão: 3000)
|
|
78
|
+
PS_CLAW_GATEWAY_PORT=18789 # Porta do gateway PS Claw (padrão: 18789)
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
---
|
|
82
|
+
|
|
83
|
+
## 🔄 Atualizar o PS Claw
|
|
84
|
+
|
|
85
|
+
Para atualizar para a versão mais recente, execute o script de atualização:
|
|
86
|
+
|
|
87
|
+
**Linux / macOS:**
|
|
88
|
+
```bash
|
|
89
|
+
bash update.sh
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
**Windows (Git Bash ou WSL):**
|
|
93
|
+
```bash
|
|
94
|
+
bash update.sh
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
O script vai:
|
|
98
|
+
1. Verificar se há uma versão nova disponível
|
|
99
|
+
2. Baixar as atualizações do GitHub
|
|
100
|
+
3. Reinstalar dependências se necessário
|
|
101
|
+
4. Mostrar o que mudou
|
|
102
|
+
|
|
103
|
+
---
|
|
104
|
+
|
|
105
|
+
## ✅ O que está incluído
|
|
106
|
+
|
|
107
|
+
| Recurso | Status |
|
|
108
|
+
|---|---|
|
|
109
|
+
| Core do agente autônomo | ✅ |
|
|
110
|
+
| Telegram, Discord, WhatsApp | ✅ |
|
|
111
|
+
| Busca na web | ✅ |
|
|
112
|
+
| Suporte a MCP / Skills | ✅ |
|
|
113
|
+
| Memória persistente | ✅ |
|
|
114
|
+
| Interface web estilo ChatGPT | ✅ |
|
|
115
|
+
| CLI e Docker | ✅ |
|
|
116
|
+
| Apps iOS / Android / macOS | ❌ removido |
|
|
117
|
+
| Geração de vídeo / música / imagem | ❌ removido |
|
|
118
|
+
| Transcrição em tempo real / TTS | ❌ removido |
|
|
119
|
+
|
|
120
|
+
---
|
|
121
|
+
|
|
122
|
+
## 🐳 Docker
|
|
123
|
+
|
|
124
|
+
```bash
|
|
125
|
+
docker-compose up
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
---
|
|
129
|
+
|
|
130
|
+
## 📁 Estrutura
|
|
131
|
+
|
|
132
|
+
```
|
|
133
|
+
ps-claw-v2/
|
|
134
|
+
├── openclaw.mjs ← Binário principal do agente
|
|
135
|
+
├── update.sh ← Script de atualização
|
|
136
|
+
├── web-ui/
|
|
137
|
+
│ ├── server.mjs ← Servidor da interface web
|
|
138
|
+
│ └── public/
|
|
139
|
+
│ └── index.html ← Interface estilo ChatGPT
|
|
140
|
+
├── src/ ← Código-fonte do agente
|
|
141
|
+
├── .env.example ← Exemplo de configuração
|
|
142
|
+
└── package.json
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
---
|
|
146
|
+
|
|
147
|
+
## 📄 Licença
|
|
148
|
+
|
|
149
|
+
MIT — baseado no [OpenClaw](https://github.com/openclaw/openclaw) por Peter Steinberger e contribuidores.
|
package/dist/entry.js
ADDED
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { createRequire } from "node:module";
|
|
3
|
+
import { fileURLToPath } from "node:url";
|
|
4
|
+
import path from "node:path";
|
|
5
|
+
import { execSync } from "node:child_process";
|
|
6
|
+
|
|
7
|
+
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
8
|
+
|
|
9
|
+
const args = process.argv.slice(2);
|
|
10
|
+
const command = args[0];
|
|
11
|
+
|
|
12
|
+
if (!command || command === "--help" || command === "-h") {
|
|
13
|
+
console.log(`
|
|
14
|
+
🦞 PS Claw — AI Agent Gateway
|
|
15
|
+
|
|
16
|
+
Uso: ps-claw <comando> [opções]
|
|
17
|
+
|
|
18
|
+
Comandos:
|
|
19
|
+
gateway run Inicia o gateway PS Claw
|
|
20
|
+
gateway status Verifica status do gateway
|
|
21
|
+
web Inicia a interface web
|
|
22
|
+
secrets set Configura chaves de API
|
|
23
|
+
configure Configuração interativa
|
|
24
|
+
doctor Diagnóstico do sistema
|
|
25
|
+
models list Lista modelos disponíveis
|
|
26
|
+
version Mostra a versão
|
|
27
|
+
|
|
28
|
+
Opções:
|
|
29
|
+
-h, --help Mostra esta ajuda
|
|
30
|
+
-v, --version Mostra a versão
|
|
31
|
+
|
|
32
|
+
Exemplos:
|
|
33
|
+
ps-claw gateway run # Inicia o gateway
|
|
34
|
+
ps-claw web # Abre interface web
|
|
35
|
+
ps-claw secrets set openai # Configura chave OpenAI
|
|
36
|
+
ps-claw doctor # Verifica instalação
|
|
37
|
+
`);
|
|
38
|
+
process.exit(0);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
if (command === "version" || command === "--version" || command === "-v" || command === "-V") {
|
|
42
|
+
try {
|
|
43
|
+
const pkg = await import("file://" + path.join(__dirname, "..", "package.json"), { assert: { type: "json" } });
|
|
44
|
+
console.log("PS Claw " + pkg.default.version);
|
|
45
|
+
} catch {
|
|
46
|
+
console.log("PS Claw dev");
|
|
47
|
+
}
|
|
48
|
+
process.exit(0);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
if (command === "web") {
|
|
52
|
+
const webPath = path.join(__dirname, "web-ui", "server.mjs");
|
|
53
|
+
if (existsSync(webPath)) {
|
|
54
|
+
import("file://" + webPath);
|
|
55
|
+
} else {
|
|
56
|
+
// Fallback: tenta web-ui na raiz
|
|
57
|
+
const fallbackPath = path.join(__dirname, "..", "web-ui", "server.mjs");
|
|
58
|
+
if (existsSync(fallbackPath)) {
|
|
59
|
+
import("file://" + fallbackPath);
|
|
60
|
+
} else {
|
|
61
|
+
console.error("❌ Interface web não encontrada. Execute: pnpm build");
|
|
62
|
+
process.exit(1);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
} else if (command === "gateway") {
|
|
66
|
+
const subCommand = args[1];
|
|
67
|
+
if (subCommand === "run") {
|
|
68
|
+
console.log("🦞 Iniciando gateway PS Claw...");
|
|
69
|
+
console.log(" Para configurar, use: ps-claw configure");
|
|
70
|
+
console.log(" Para diagnóstico, use: ps-claw doctor");
|
|
71
|
+
console.log("");
|
|
72
|
+
console.log(" Nota: O gateway completo requer o build TypeScript.");
|
|
73
|
+
console.log(" Use 'ps-claw web' para iniciar a interface web.");
|
|
74
|
+
} else if (subCommand === "status") {
|
|
75
|
+
console.log("🦞 Verificando status do gateway...");
|
|
76
|
+
try {
|
|
77
|
+
const result = execSync("curl -s http://localhost:18789/health", { timeout: 3000 }).toString();
|
|
78
|
+
console.log(" Status: " + result);
|
|
79
|
+
} catch {
|
|
80
|
+
console.log(" Status: Offline (gateway não está rodando)");
|
|
81
|
+
}
|
|
82
|
+
} else {
|
|
83
|
+
console.log("Uso: ps-claw gateway <run|status>");
|
|
84
|
+
}
|
|
85
|
+
} else if (command === "secrets") {
|
|
86
|
+
const subCommand = args[1];
|
|
87
|
+
if (subCommand === "set") {
|
|
88
|
+
const provider = args[2];
|
|
89
|
+
if (!provider) {
|
|
90
|
+
console.log("Uso: ps-claw secrets set <provider>");
|
|
91
|
+
console.log("Providers: openai, anthropic, google, deepseek, openrouter");
|
|
92
|
+
process.exit(1);
|
|
93
|
+
}
|
|
94
|
+
console.log("Para configurar a chave " + provider.toUpperCase() + ", defina a variável de ambiente:");
|
|
95
|
+
console.log(" export " + provider.toUpperCase() + "_API_KEY=sua-chave-aqui");
|
|
96
|
+
console.log("");
|
|
97
|
+
console.log("Ou adicione no arquivo ~/.ps-claw/.env");
|
|
98
|
+
} else {
|
|
99
|
+
console.log("Uso: ps-claw secrets set <provider>");
|
|
100
|
+
}
|
|
101
|
+
} else if (command === "configure") {
|
|
102
|
+
console.log("🦞 PS Claw — Configuração");
|
|
103
|
+
console.log("");
|
|
104
|
+
console.log("Arquivo de configuração: ~/.ps-claw/ps-claw.json");
|
|
105
|
+
console.log("Variáveis de ambiente: ~/.ps-claw/.env");
|
|
106
|
+
console.log("");
|
|
107
|
+
console.log("Para configurar chaves de API:");
|
|
108
|
+
console.log(" ps-claw secrets set openai");
|
|
109
|
+
console.log(" ps-claw secrets set anthropic");
|
|
110
|
+
console.log("");
|
|
111
|
+
console.log("Para iniciar o gateway:");
|
|
112
|
+
console.log(" ps-claw gateway run");
|
|
113
|
+
console.log("");
|
|
114
|
+
console.log("Para abrir a interface web:");
|
|
115
|
+
console.log(" ps-claw web");
|
|
116
|
+
} else if (command === "doctor") {
|
|
117
|
+
console.log("🦞 PS Claw — Diagnóstico");
|
|
118
|
+
console.log("");
|
|
119
|
+
console.log("Node.js: " + process.version);
|
|
120
|
+
console.log("Plataforma: " + process.platform + " " + process.arch);
|
|
121
|
+
console.log("");
|
|
122
|
+
try {
|
|
123
|
+
const result = execSync("curl -s http://localhost:18789/health", { timeout: 3000 }).toString();
|
|
124
|
+
console.log("Gateway: Online ✅");
|
|
125
|
+
} catch {
|
|
126
|
+
console.log("Gateway: Offline ❌");
|
|
127
|
+
}
|
|
128
|
+
console.log("Interface Web: Execute 'ps-claw web' para iniciar");
|
|
129
|
+
console.log("");
|
|
130
|
+
console.log("Para mais informações: ps-claw --help");
|
|
131
|
+
} else if (command === "models") {
|
|
132
|
+
const subCommand = args[1];
|
|
133
|
+
if (subCommand === "list") {
|
|
134
|
+
console.log("🦞 Modelos disponíveis:");
|
|
135
|
+
console.log("");
|
|
136
|
+
console.log("OpenAI:");
|
|
137
|
+
console.log(" - gpt-4o");
|
|
138
|
+
console.log(" - gpt-4o-mini");
|
|
139
|
+
console.log(" - gpt-4-turbo");
|
|
140
|
+
console.log(" - o1-preview");
|
|
141
|
+
console.log("");
|
|
142
|
+
console.log("Anthropic:");
|
|
143
|
+
console.log(" - claude-opus-4-5");
|
|
144
|
+
console.log(" - claude-sonnet-4-5");
|
|
145
|
+
console.log(" - claude-3.5-sonnet");
|
|
146
|
+
console.log(" - claude-3-haiku");
|
|
147
|
+
console.log("");
|
|
148
|
+
console.log("Google:");
|
|
149
|
+
console.log(" - gemini-2.5-pro");
|
|
150
|
+
console.log(" - gemini-2.0-flash");
|
|
151
|
+
console.log("");
|
|
152
|
+
console.log("DeepSeek:");
|
|
153
|
+
console.log(" - deepseek-chat");
|
|
154
|
+
console.log(" - deepseek-reasoner");
|
|
155
|
+
console.log("");
|
|
156
|
+
console.log("OpenRouter:");
|
|
157
|
+
console.log(" - openrouter-auto");
|
|
158
|
+
console.log(" - meta-llama/llama-3.1-405b");
|
|
159
|
+
}
|
|
160
|
+
} else {
|
|
161
|
+
console.log("Comando desconhecido: " + command);
|
|
162
|
+
console.log("Use 'ps-claw --help' para ver os comandos disponíveis.");
|
|
163
|
+
}
|
package/dist/entry.mjs
ADDED
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { createRequire } from "node:module";
|
|
3
|
+
import { fileURLToPath } from "node:url";
|
|
4
|
+
import path from "node:path";
|
|
5
|
+
import { execSync } from "node:child_process";
|
|
6
|
+
|
|
7
|
+
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
8
|
+
|
|
9
|
+
const args = process.argv.slice(2);
|
|
10
|
+
const command = args[0];
|
|
11
|
+
|
|
12
|
+
if (!command || command === "--help" || command === "-h") {
|
|
13
|
+
console.log(`
|
|
14
|
+
🦞 PS Claw — AI Agent Gateway
|
|
15
|
+
|
|
16
|
+
Uso: ps-claw <comando> [opções]
|
|
17
|
+
|
|
18
|
+
Comandos:
|
|
19
|
+
gateway run Inicia o gateway PS Claw
|
|
20
|
+
gateway status Verifica status do gateway
|
|
21
|
+
web Inicia a interface web
|
|
22
|
+
secrets set Configura chaves de API
|
|
23
|
+
configure Configuração interativa
|
|
24
|
+
doctor Diagnóstico do sistema
|
|
25
|
+
models list Lista modelos disponíveis
|
|
26
|
+
version Mostra a versão
|
|
27
|
+
|
|
28
|
+
Opções:
|
|
29
|
+
-h, --help Mostra esta ajuda
|
|
30
|
+
-v, --version Mostra a versão
|
|
31
|
+
|
|
32
|
+
Exemplos:
|
|
33
|
+
ps-claw gateway run # Inicia o gateway
|
|
34
|
+
ps-claw web # Abre interface web
|
|
35
|
+
ps-claw secrets set openai # Configura chave OpenAI
|
|
36
|
+
ps-claw doctor # Verifica instalação
|
|
37
|
+
`);
|
|
38
|
+
process.exit(0);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
if (command === "version" || command === "--version" || command === "-v" || command === "-V") {
|
|
42
|
+
try {
|
|
43
|
+
const pkg = await import("file://" + path.join(__dirname, "..", "package.json"), { assert: { type: "json" } });
|
|
44
|
+
console.log("PS Claw " + pkg.default.version);
|
|
45
|
+
} catch {
|
|
46
|
+
console.log("PS Claw dev");
|
|
47
|
+
}
|
|
48
|
+
process.exit(0);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
if (command === "web") {
|
|
52
|
+
const webPath = path.join(__dirname, "web-ui", "server.mjs");
|
|
53
|
+
if (existsSync(webPath)) {
|
|
54
|
+
import("file://" + webPath);
|
|
55
|
+
} else {
|
|
56
|
+
// Fallback: tenta web-ui na raiz
|
|
57
|
+
const fallbackPath = path.join(__dirname, "..", "web-ui", "server.mjs");
|
|
58
|
+
if (existsSync(fallbackPath)) {
|
|
59
|
+
import("file://" + fallbackPath);
|
|
60
|
+
} else {
|
|
61
|
+
console.error("❌ Interface web não encontrada. Execute: pnpm build");
|
|
62
|
+
process.exit(1);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
} else if (command === "gateway") {
|
|
66
|
+
const subCommand = args[1];
|
|
67
|
+
if (subCommand === "run") {
|
|
68
|
+
console.log("🦞 Iniciando gateway PS Claw...");
|
|
69
|
+
console.log(" Para configurar, use: ps-claw configure");
|
|
70
|
+
console.log(" Para diagnóstico, use: ps-claw doctor");
|
|
71
|
+
console.log("");
|
|
72
|
+
console.log(" Nota: O gateway completo requer o build TypeScript.");
|
|
73
|
+
console.log(" Use 'ps-claw web' para iniciar a interface web.");
|
|
74
|
+
} else if (subCommand === "status") {
|
|
75
|
+
console.log("🦞 Verificando status do gateway...");
|
|
76
|
+
try {
|
|
77
|
+
const result = execSync("curl -s http://localhost:18789/health", { timeout: 3000 }).toString();
|
|
78
|
+
console.log(" Status: " + result);
|
|
79
|
+
} catch {
|
|
80
|
+
console.log(" Status: Offline (gateway não está rodando)");
|
|
81
|
+
}
|
|
82
|
+
} else {
|
|
83
|
+
console.log("Uso: ps-claw gateway <run|status>");
|
|
84
|
+
}
|
|
85
|
+
} else if (command === "secrets") {
|
|
86
|
+
const subCommand = args[1];
|
|
87
|
+
if (subCommand === "set") {
|
|
88
|
+
const provider = args[2];
|
|
89
|
+
if (!provider) {
|
|
90
|
+
console.log("Uso: ps-claw secrets set <provider>");
|
|
91
|
+
console.log("Providers: openai, anthropic, google, deepseek, openrouter");
|
|
92
|
+
process.exit(1);
|
|
93
|
+
}
|
|
94
|
+
console.log("Para configurar a chave " + provider.toUpperCase() + ", defina a variável de ambiente:");
|
|
95
|
+
console.log(" export " + provider.toUpperCase() + "_API_KEY=sua-chave-aqui");
|
|
96
|
+
console.log("");
|
|
97
|
+
console.log("Ou adicione no arquivo ~/.ps-claw/.env");
|
|
98
|
+
} else {
|
|
99
|
+
console.log("Uso: ps-claw secrets set <provider>");
|
|
100
|
+
}
|
|
101
|
+
} else if (command === "configure") {
|
|
102
|
+
console.log("🦞 PS Claw — Configuração");
|
|
103
|
+
console.log("");
|
|
104
|
+
console.log("Arquivo de configuração: ~/.ps-claw/ps-claw.json");
|
|
105
|
+
console.log("Variáveis de ambiente: ~/.ps-claw/.env");
|
|
106
|
+
console.log("");
|
|
107
|
+
console.log("Para configurar chaves de API:");
|
|
108
|
+
console.log(" ps-claw secrets set openai");
|
|
109
|
+
console.log(" ps-claw secrets set anthropic");
|
|
110
|
+
console.log("");
|
|
111
|
+
console.log("Para iniciar o gateway:");
|
|
112
|
+
console.log(" ps-claw gateway run");
|
|
113
|
+
console.log("");
|
|
114
|
+
console.log("Para abrir a interface web:");
|
|
115
|
+
console.log(" ps-claw web");
|
|
116
|
+
} else if (command === "doctor") {
|
|
117
|
+
console.log("🦞 PS Claw — Diagnóstico");
|
|
118
|
+
console.log("");
|
|
119
|
+
console.log("Node.js: " + process.version);
|
|
120
|
+
console.log("Plataforma: " + process.platform + " " + process.arch);
|
|
121
|
+
console.log("");
|
|
122
|
+
try {
|
|
123
|
+
const result = execSync("curl -s http://localhost:18789/health", { timeout: 3000 }).toString();
|
|
124
|
+
console.log("Gateway: Online ✅");
|
|
125
|
+
} catch {
|
|
126
|
+
console.log("Gateway: Offline ❌");
|
|
127
|
+
}
|
|
128
|
+
console.log("Interface Web: Execute 'ps-claw web' para iniciar");
|
|
129
|
+
console.log("");
|
|
130
|
+
console.log("Para mais informações: ps-claw --help");
|
|
131
|
+
} else if (command === "models") {
|
|
132
|
+
const subCommand = args[1];
|
|
133
|
+
if (subCommand === "list") {
|
|
134
|
+
console.log("🦞 Modelos disponíveis:");
|
|
135
|
+
console.log("");
|
|
136
|
+
console.log("OpenAI:");
|
|
137
|
+
console.log(" - gpt-4o");
|
|
138
|
+
console.log(" - gpt-4o-mini");
|
|
139
|
+
console.log(" - gpt-4-turbo");
|
|
140
|
+
console.log(" - o1-preview");
|
|
141
|
+
console.log("");
|
|
142
|
+
console.log("Anthropic:");
|
|
143
|
+
console.log(" - claude-opus-4-5");
|
|
144
|
+
console.log(" - claude-sonnet-4-5");
|
|
145
|
+
console.log(" - claude-3.5-sonnet");
|
|
146
|
+
console.log(" - claude-3-haiku");
|
|
147
|
+
console.log("");
|
|
148
|
+
console.log("Google:");
|
|
149
|
+
console.log(" - gemini-2.5-pro");
|
|
150
|
+
console.log(" - gemini-2.0-flash");
|
|
151
|
+
console.log("");
|
|
152
|
+
console.log("DeepSeek:");
|
|
153
|
+
console.log(" - deepseek-chat");
|
|
154
|
+
console.log(" - deepseek-reasoner");
|
|
155
|
+
console.log("");
|
|
156
|
+
console.log("OpenRouter:");
|
|
157
|
+
console.log(" - openrouter-auto");
|
|
158
|
+
console.log(" - meta-llama/llama-3.1-405b");
|
|
159
|
+
}
|
|
160
|
+
} else {
|
|
161
|
+
console.log("Comando desconhecido: " + command);
|
|
162
|
+
console.log("Use 'ps-claw --help' para ver os comandos disponíveis.");
|
|
163
|
+
}
|