openclaw-skills-cli 0.1.0 → 0.1.2

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  # openclaw-skills-cli
2
2
 
3
- Official CLI for [Skillia](https://openclaw-skills-registry-dashboard.vercel.app) - The OpenClaw Skills Registry.
3
+ Official CLI for [OpenSkills](https://openclaw-skills-registry-dashboard.vercel.app) - The OpenSkills Registry.
4
4
 
5
5
  ## Installation
6
6
 
@@ -25,7 +25,7 @@ openclaw-skills search security
25
25
  ### Install a Skill
26
26
  ```bash
27
27
  # Free skills
28
- openclaw-skills install skillia/ai-governance-audit
28
+ openclaw-skills install openskills/ai-governance-audit
29
29
 
30
30
  # Paid skills (requires license token)
31
31
  openclaw-skills install --license-token <token> namespace/skill-name
@@ -33,7 +33,7 @@ openclaw-skills install --license-token <token> namespace/skill-name
33
33
 
34
34
  ### Publish a Skill
35
35
 
36
- 1. Create an API token at [Skillia Account](https://openclaw-skills-registry-dashboard.vercel.app/account)
36
+ 1. Create an API token at [OpenSkills Account](https://openclaw-skills-registry-dashboard.vercel.app/account)
37
37
  2. Login with your token:
38
38
  ```bash
39
39
  openclaw-skills login <your-api-token>
@@ -71,6 +71,6 @@ MIT
71
71
 
72
72
  ## Links
73
73
 
74
- - [Skillia Marketplace](https://openclaw-skills-registry-dashboard.vercel.app)
74
+ - [OpenSkills Marketplace](https://openclaw-skills-registry-dashboard.vercel.app)
75
75
  - [Documentation](https://openclaw-skills-registry-dashboard.vercel.app/developers)
76
76
  - [GitHub](https://github.com/jotajota1302/skills-registry)
@@ -141,27 +141,45 @@ async function installToolOrDomain(namespace, name, targetVersion, installConfig
141
141
  const spinner = (0, ora_1.default)(`Instalando ${chalk_1.default.cyan(namespace)}/${chalk_1.default.bold(name)}${chalk_1.default.gray('@' + targetVersion)}...`).start();
142
142
  // Try direct download from filesUrl first, fallback to API
143
143
  const installConfigData = await (0, client_js_1.getInstallConfig)(namespace, name);
144
- let files;
144
+ let filesData;
145
145
  if ('filesUrl' in installConfigData && installConfigData.filesUrl) {
146
146
  // Download from Supabase Storage
147
147
  const response = await fetch(installConfigData.filesUrl);
148
148
  if (response.ok) {
149
- files = await response.json();
149
+ filesData = await response.json();
150
150
  }
151
151
  else {
152
152
  // Fallback to version API
153
153
  const versionData = await (0, client_js_1.getVersion)(namespace, name, targetVersion);
154
- files = versionData.files || {};
154
+ filesData = versionData.files || {};
155
155
  }
156
156
  }
157
157
  else {
158
- const versionData = await (0, client_js_1.getVersion)(namespace, name, targetVersion);
159
- files = versionData.files || {};
158
+ filesData = installConfigData.files || {};
160
159
  }
161
- for (const [filePath, content] of Object.entries(files)) {
162
- const fullPath = path.join(installDir, filePath);
163
- fs.mkdirSync(path.dirname(fullPath), { recursive: true });
164
- fs.writeFileSync(fullPath, content, 'utf-8');
160
+ // Handle both formats: object (new) or base64 tarball (legacy)
161
+ if (typeof filesData === 'string') {
162
+ // Legacy format: base64-encoded gzipped tarball
163
+ spinner.text = `Extrayendo archivos...`;
164
+ const { execSync } = await import('node:child_process');
165
+ const tmpFile = path.join(os.tmpdir(), `skill-${Date.now()}.tar.gz`);
166
+ // Decode base64 and write to temp file
167
+ const buffer = Buffer.from(filesData, 'base64');
168
+ fs.writeFileSync(tmpFile, buffer);
169
+ // Extract tarball to install directory
170
+ fs.mkdirSync(installDir, { recursive: true });
171
+ execSync(`tar -xzf "${tmpFile}" -C "${installDir}"`, { stdio: 'ignore' });
172
+ // Cleanup
173
+ fs.unlinkSync(tmpFile);
174
+ }
175
+ else {
176
+ // New format: object with file paths and contents
177
+ const files = filesData;
178
+ for (const [filePath, content] of Object.entries(files)) {
179
+ const fullPath = path.join(installDir, filePath);
180
+ fs.mkdirSync(path.dirname(fullPath), { recursive: true });
181
+ fs.writeFileSync(fullPath, content, 'utf-8');
182
+ }
165
183
  }
166
184
  try {
167
185
  await (0, client_js_1.registerInstall)(namespace, name, targetVersion);
package/dist/config.js CHANGED
@@ -21,7 +21,7 @@ function getApiUrl() {
21
21
  const envUrl = process.env.SKILLS_REGISTRY_URL;
22
22
  if (envUrl)
23
23
  return envUrl;
24
- return config.get('apiUrl') || 'http://localhost:3000';
24
+ return config.get('apiUrl') || 'https://openclaw-skills-registry.onrender.com';
25
25
  }
26
26
  function setApiUrl(url) {
27
27
  config.set('apiUrl', url);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openclaw-skills-cli",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "description": "CLI tool for OpenClaw Skills Registry",
5
5
  "main": "dist/cli.js",
6
6
  "bin": {
@@ -1,209 +0,0 @@
1
- # 📦 Instrucciones para Publicar CLI en npm
2
-
3
- ## ✅ Preparación Completada
4
-
5
- - ✅ Package renombrado a `openclaw-skills-cli` (sin scope)
6
- - ✅ README.md creado para página npm
7
- - ✅ .npmignore configurado
8
- - ✅ CLI compilado y listo
9
- - ✅ Todas las referencias actualizadas en el código
10
-
11
- ---
12
-
13
- ## 🚀 Pasos para Publicar (José)
14
-
15
- ### **Paso 1: Crear Cuenta npm** (5 minutos)
16
-
17
- 1. Ve a https://www.npmjs.com/signup
18
- 2. Rellena el formulario:
19
- - **Username:** `jotajota1302` (o el que prefieras)
20
- - **Email:** Tu email
21
- - **Password:** Contraseña segura
22
- 3. Verifica tu email (te llegará un correo de confirmación)
23
-
24
- ---
25
-
26
- ### **Paso 2: Login desde la Terminal** (1 minuto)
27
-
28
- Abre una terminal y ejecuta:
29
-
30
- ```bash
31
- npm login
32
- ```
33
-
34
- Te pedirá:
35
- - **Username:** (el que elegiste)
36
- - **Password:** (tu contraseña)
37
- - **Email:** (tu email)
38
-
39
- **Nota:** Si te pide autenticación web, sigue el link que te muestre.
40
-
41
- ---
42
-
43
- ### **Paso 3: Verificar que Estás Logueado**
44
-
45
- ```bash
46
- npm whoami
47
- ```
48
-
49
- Debería mostrar tu username. Si muestra error, repite `npm login`.
50
-
51
- ---
52
-
53
- ### **Paso 4: Publicar el CLI** (30 segundos)
54
-
55
- ```bash
56
- cd ~/Desktop/PROYECTOS/activos/openclaw-skills-registry/cli
57
- npm publish
58
- ```
59
-
60
- **Resultado esperado:**
61
- ```
62
- + openclaw-skills-cli@0.1.0
63
- ```
64
-
65
- **Si sale error "name already taken":**
66
- ```bash
67
- # Edita package.json y cambia el nombre
68
- nano package.json
69
- # Cambia "openclaw-skills-cli" por "openclaw-skills" o "skills-cli-openclaw"
70
- # Luego repite: npm publish
71
- ```
72
-
73
- ---
74
-
75
- ### **Paso 5: Verificar Publicación** (1 minuto)
76
-
77
- Abre una nueva terminal (sin el proyecto) y prueba:
78
-
79
- ```bash
80
- npx openclaw-skills-cli@latest --version
81
- ```
82
-
83
- Debería mostrar: `0.1.0`
84
-
85
- ---
86
-
87
- ### **Paso 6: Test Completo**
88
-
89
- Prueba instalar una skill:
90
-
91
- ```bash
92
- npx openclaw-skills-cli search security
93
- ```
94
-
95
- Debería mostrar resultados de skills de seguridad.
96
-
97
- ---
98
-
99
- ## ✅ Después de Publicar
100
-
101
- Una vez publicado, **TODOS los comandos en /clients funcionarán:**
102
-
103
- ```bash
104
- # Esto ya funcionará:
105
- npx openclaw-skills-cli install skillia/ai-governance-audit
106
-
107
- # Y esto también:
108
- npm i -g openclaw-skills-cli
109
- openclaw-skills install skill/name
110
- ```
111
-
112
- ---
113
-
114
- ## 🎯 Verificación Final
115
-
116
- 1. Ve a: https://www.npmjs.com/package/openclaw-skills-cli
117
- 2. Deberías ver tu paquete publicado con README, versión, stats, etc.
118
-
119
- ---
120
-
121
- ## 📊 Métricas npm
122
-
123
- Después de publicar, podrás ver en npm:
124
- - Descargas semanales
125
- - Dependents (quién usa tu paquete)
126
- - GitHub stars
127
- - Versiones publicadas
128
-
129
- ---
130
-
131
- ## 🔄 Publicar Actualizaciones Futuras
132
-
133
- Cuando quieras publicar una nueva versión:
134
-
135
- ```bash
136
- cd cli
137
-
138
- # Opción A: Patch (0.1.0 → 0.1.1)
139
- npm version patch
140
-
141
- # Opción B: Minor (0.1.0 → 0.2.0)
142
- npm version minor
143
-
144
- # Opción C: Major (0.1.0 → 1.0.0)
145
- npm version major
146
-
147
- # Publicar
148
- npm publish
149
- ```
150
-
151
- ---
152
-
153
- ## ⚠️ Troubleshooting
154
-
155
- ### Error: "You must be logged in"
156
- ```bash
157
- npm logout
158
- npm login
159
- ```
160
-
161
- ### Error: "402 Payment Required"
162
- Solo para scoped packages (@org/pkg). Nosotros usamos `openclaw-skills-cli` (sin scope), así que NO deberías ver este error.
163
-
164
- ### Error: "403 Forbidden"
165
- ```bash
166
- # Verifica que estás logueado:
167
- npm whoami
168
-
169
- # Si no muestra tu usuario:
170
- npm login
171
- ```
172
-
173
- ### Error: "name already taken"
174
- Cambia el nombre en `package.json` y repite:
175
- ```bash
176
- # Opciones alternativas:
177
- "name": "openclaw-skills"
178
- "name": "skills-cli-openclaw"
179
- "name": "openclaw-registry-cli"
180
- ```
181
-
182
- ---
183
-
184
- ## 📞 Si Tienes Problemas
185
-
186
- Avísame por Telegram y te ayudo en tiempo real.
187
-
188
- ---
189
-
190
- ## 🎉 Resultado Esperado
191
-
192
- **Antes:**
193
- ```bash
194
- $ npx openclaw-skills-cli install skill
195
- → 404 Not Found
196
- ```
197
-
198
- **Después:**
199
- ```bash
200
- $ npx openclaw-skills-cli install skill
201
- → ✓ Installing skill...
202
- ```
203
-
204
- **Clientes podrán instalar skills sin problemas** ✅
205
-
206
- ---
207
-
208
- **Preparado por:** JARVIS
209
- **Fecha:** 2026-02-27 18:05 GMT+1