cli-ai-skills 1.4.0 β 1.6.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 +165 -209
- package/bin/cli.js +236 -38
- package/lib/bundles.js +44 -0
- package/lib/search.js +54 -0
- package/package.json +8 -3
package/README.md
CHANGED
|
@@ -1,308 +1,264 @@
|
|
|
1
|
-
#
|
|
1
|
+
# cli-ai-skills v1.5.0
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
π **NPX Installer for AI Skills**
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
npx cli-ai-skills install
|
|
7
|
-
```
|
|
5
|
+
Install reusable skills for GitHub Copilot CLI, Claude Code, and OpenAI Codex in one command.
|
|
8
6
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
-
|
|
12
|
-
- π **Smart Version Detection** - Automatically detects outdated skills
|
|
13
|
-
- π¦ **Multi-Platform Support** - GitHub Copilot CLI and Claude Code
|
|
14
|
-
- π **Global or Local** - Install globally or per-repository
|
|
15
|
-
- π **Symlink Support** - Auto-updates with repository changes
|
|
16
|
-
- π **Progress Gauge** - Visual progress tracking
|
|
17
|
-
- π **Python Requirements** - Auto-installs Python dependencies for skills that need them
|
|
18
|
-
- π₯ **Doctor Command** - Diagnose installation issues
|
|
7
|
+

|
|
8
|
+

|
|
9
|
+

|
|
19
10
|
|
|
20
11
|
## π Quick Start
|
|
21
12
|
|
|
22
|
-
### Install All Skills
|
|
23
|
-
|
|
24
|
-
```bash
|
|
25
|
-
npx cli-ai-skills install --all
|
|
26
|
-
```
|
|
27
|
-
|
|
28
|
-
### Install Specific Skill
|
|
29
|
-
|
|
30
13
|
```bash
|
|
31
|
-
|
|
32
|
-
|
|
14
|
+
# Zero-config installation (interactive)
|
|
15
|
+
npx cli-ai-skills
|
|
33
16
|
|
|
34
|
-
|
|
17
|
+
# Auto-install all platforms (skip prompts)
|
|
18
|
+
npx cli-ai-skills -y -q
|
|
35
19
|
|
|
36
|
-
|
|
37
|
-
npx cli-ai-skills
|
|
20
|
+
# Install specific bundle
|
|
21
|
+
npx cli-ai-skills --bundle essential -y
|
|
38
22
|
```
|
|
39
23
|
|
|
40
|
-
|
|
41
|
-
- **Scope**: Global or Local
|
|
42
|
-
- **Platforms**: GitHub Copilot CLI, Claude Code, or both
|
|
43
|
-
- **Skills**: Which skills to install
|
|
44
|
-
|
|
45
|
-
## π¦ Available Skills
|
|
46
|
-
|
|
47
|
-
- **prompt-engineer** - Transform prompts using 11 established frameworks
|
|
48
|
-
- **skill-creator** - Create new skills interactively
|
|
49
|
-
- **youtube-summarizer** - Extract and summarize YouTube videos
|
|
50
|
-
- **audio-transcriber** π - Transcribe audio to text with meeting minutes and summaries
|
|
24
|
+
## π¦ What It Does
|
|
51
25
|
|
|
52
|
-
|
|
26
|
+
1. π **Detects** installed AI CLI tools (Copilot, Claude, Codex)
|
|
27
|
+
2. π **Lists** all 4 available AI skills
|
|
28
|
+
3. βοΈ **Installs** skills to the correct platform directories
|
|
29
|
+
4. β
**Validates** installation success
|
|
53
30
|
|
|
54
|
-
##
|
|
31
|
+
## β‘ Command Shortcuts
|
|
55
32
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
Install
|
|
33
|
+
| Shortcut | Full Form | Purpose |
|
|
34
|
+
|----------|-----------|---------|
|
|
35
|
+
| `i` | `install` | Install skills (default) |
|
|
36
|
+
| `ls` | `list` | List installed skills |
|
|
37
|
+
| `up` | `update` | Update skills |
|
|
38
|
+
| `rm` | `uninstall` | Remove skills |
|
|
39
|
+
| `doc` | `doctor` | Check installation |
|
|
59
40
|
|
|
41
|
+
Examples:
|
|
60
42
|
```bash
|
|
61
|
-
# Install
|
|
62
|
-
npx cli-ai-skills
|
|
63
|
-
|
|
64
|
-
# Install specific skills
|
|
65
|
-
npx cli-ai-skills install prompt-engineer skill-creator
|
|
66
|
-
|
|
67
|
-
# Install for specific platform
|
|
68
|
-
npx cli-ai-skills install --copilot
|
|
69
|
-
npx cli-ai-skills install --claude
|
|
70
|
-
|
|
71
|
-
# Install locally (in current repository)
|
|
72
|
-
npx cli-ai-skills install --local
|
|
73
|
-
|
|
74
|
-
# Silent installation (skip prompts)
|
|
75
|
-
npx cli-ai-skills install --all --yes
|
|
43
|
+
npx cli-ai-skills i -y # Install with confirmation skip
|
|
44
|
+
npx cli-ai-skills ls -q # List quietly
|
|
45
|
+
npx cli-ai-skills up # Check for updates
|
|
76
46
|
```
|
|
77
47
|
|
|
78
|
-
|
|
79
|
-
- `-a, --all` - Install all available skills
|
|
80
|
-
- `-g, --global` - Install globally (default)
|
|
81
|
-
- `-l, --local` - Install in current repository
|
|
82
|
-
- `--copilot` - Install only for GitHub Copilot CLI
|
|
83
|
-
- `--claude` - Install only for Claude Code
|
|
84
|
-
- `-y, --yes` - Skip confirmations
|
|
85
|
-
- `--copy` - Copy files instead of symlinks
|
|
86
|
-
|
|
87
|
-
### `list`
|
|
48
|
+
## π© Short Flags
|
|
88
49
|
|
|
89
|
-
|
|
50
|
+
| Flag | Full Form | Purpose |
|
|
51
|
+
|------|-----------|---------|
|
|
52
|
+
| `-a` | `--all` | Operate on all platforms |
|
|
53
|
+
| `-g` | `--global` | Global installation |
|
|
54
|
+
| `-l` | `--local` | Local installation |
|
|
55
|
+
| `-y` | `--yes` | Skip all prompts |
|
|
56
|
+
| `-q` | `--quiet` | Minimal output |
|
|
90
57
|
|
|
58
|
+
Combine flags:
|
|
91
59
|
```bash
|
|
92
|
-
npx cli-ai-skills
|
|
60
|
+
npx cli-ai-skills i -a -y -q # Install all, skip prompts, quiet
|
|
93
61
|
```
|
|
94
62
|
|
|
95
|
-
|
|
96
|
-
- β
Installed skills with versions
|
|
97
|
-
- β οΈ Skills with updates available
|
|
98
|
-
- β¬ Skills not yet installed
|
|
99
|
-
|
|
100
|
-
### `update [skills...]`
|
|
63
|
+
## π¦ Curated Bundles
|
|
101
64
|
|
|
102
|
-
|
|
65
|
+
Instead of installing everything, choose a bundle:
|
|
103
66
|
|
|
104
67
|
```bash
|
|
105
|
-
#
|
|
106
|
-
npx cli-ai-skills
|
|
68
|
+
# Essential (skill-creator, prompt-engineer)
|
|
69
|
+
npx cli-ai-skills --bundle essential -y
|
|
107
70
|
|
|
108
|
-
#
|
|
109
|
-
npx cli-ai-skills
|
|
110
|
-
```
|
|
71
|
+
# Content (youtube-summarizer, audio-transcriber)
|
|
72
|
+
npx cli-ai-skills --bundle content -y
|
|
111
73
|
|
|
112
|
-
|
|
74
|
+
# Developer (skill-creator)
|
|
75
|
+
npx cli-ai-skills --bundle developer -y
|
|
113
76
|
|
|
114
|
-
|
|
77
|
+
# All (complete toolkit)
|
|
78
|
+
npx cli-ai-skills --bundle all -y
|
|
79
|
+
```
|
|
115
80
|
|
|
81
|
+
See all bundles:
|
|
116
82
|
```bash
|
|
117
|
-
npx cli-ai-skills
|
|
83
|
+
npx cli-ai-skills --list-bundles
|
|
118
84
|
```
|
|
119
85
|
|
|
120
|
-
|
|
86
|
+
## π Search Skills
|
|
121
87
|
|
|
122
|
-
|
|
88
|
+
Find skills by keyword:
|
|
123
89
|
|
|
124
90
|
```bash
|
|
125
|
-
npx cli-ai-skills
|
|
91
|
+
npx cli-ai-skills --search "prompt"
|
|
92
|
+
npx cli-ai-skills --search "video"
|
|
93
|
+
npx cli-ai-skills --search "transcription"
|
|
126
94
|
```
|
|
127
95
|
|
|
128
|
-
|
|
129
|
-
- β
Node.js version
|
|
130
|
-
- β
Platform installations (Copilot/Claude)
|
|
131
|
-
- β
Directory permissions
|
|
132
|
-
- β
Network connectivity
|
|
133
|
-
- β
Python environment (for audio-transcriber skill)
|
|
134
|
-
- β
Whisper and ffmpeg installation
|
|
96
|
+
## π» Supported Platforms
|
|
135
97
|
|
|
136
|
-
|
|
98
|
+
- **GitHub Copilot CLI** (`~/.copilot/skills/`)
|
|
99
|
+
- **Claude Code** (`~/.claude/skills/`)
|
|
100
|
+
- **OpenAI Codex** (`~/.codex/skills/`)
|
|
137
101
|
|
|
138
|
-
|
|
102
|
+
## π Available Skills
|
|
139
103
|
|
|
140
|
-
|
|
104
|
+
All 4 skills are universal and work on all platforms:
|
|
141
105
|
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
β
Installed successfully
|
|
106
|
+
1. **skill-creator** (v1.3.0) - Create custom skills
|
|
107
|
+
2. **prompt-engineer** (v1.1.0) - Optimize prompts
|
|
108
|
+
3. **youtube-summarizer** (v1.2.0) - Summarize videos
|
|
109
|
+
4. **audio-transcriber** (v1.2.0) - Transcribe audio
|
|
147
110
|
|
|
148
|
-
|
|
149
|
-
β
Python detected: 3.11.7
|
|
150
|
-
? Install Python requirements now? (Y/n) Y
|
|
111
|
+
## π§ Installation Methods
|
|
151
112
|
|
|
152
|
-
|
|
153
|
-
β
pkg-config installed
|
|
154
|
-
β
ffmpeg installed
|
|
155
|
-
β
openai-whisper installed
|
|
156
|
-
|
|
157
|
-
π audio-transcriber ready to use!
|
|
158
|
-
```
|
|
159
|
-
|
|
160
|
-
### Manual Installation
|
|
161
|
-
|
|
162
|
-
If you skip auto-install, you can run it later:
|
|
113
|
+
### Method 1: NPX (Easiest - Recommended)
|
|
163
114
|
|
|
164
115
|
```bash
|
|
165
|
-
#
|
|
166
|
-
|
|
116
|
+
# One-time use (always latest)
|
|
117
|
+
npx cli-ai-skills
|
|
167
118
|
|
|
168
|
-
# Or
|
|
169
|
-
|
|
170
|
-
|
|
119
|
+
# Or install globally
|
|
120
|
+
npm install -g cli-ai-skills
|
|
121
|
+
cli-ai-skills
|
|
171
122
|
```
|
|
172
123
|
|
|
173
|
-
###
|
|
124
|
+
### Method 2: From Source
|
|
174
125
|
|
|
175
126
|
```bash
|
|
176
|
-
|
|
127
|
+
git clone https://github.com/ericgandrade/cli-ai-skills.git
|
|
128
|
+
cd cli-ai-skills/cli-installer
|
|
129
|
+
npm link
|
|
130
|
+
cli-ai-skills
|
|
177
131
|
```
|
|
178
132
|
|
|
179
|
-
|
|
133
|
+
## π Command Reference
|
|
180
134
|
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
### First-Time Installation
|
|
135
|
+
### install / i
|
|
136
|
+
Install AI skills to selected platforms.
|
|
184
137
|
|
|
185
138
|
```bash
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
[ββββββββββββββββββββ] 20% - Step 1/5: Detecting platforms
|
|
191
|
-
π Platform Detection:
|
|
192
|
-
β
GitHub Copilot CLI found (gh version 2.50.0)
|
|
193
|
-
β
Claude Code detected (~/.claude/)
|
|
194
|
-
|
|
195
|
-
π Where do you want to install skills?
|
|
196
|
-
β― Global (available for all projects)
|
|
197
|
-
Local (current repository only)
|
|
139
|
+
npx cli-ai-skills install # Interactive
|
|
140
|
+
npx cli-ai-skills i -a -y # All platforms, auto-confirm
|
|
141
|
+
npx cli-ai-skills install skill-creator # Specific skill
|
|
142
|
+
```
|
|
198
143
|
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
β Claude Code (~/.claude/skills/)
|
|
144
|
+
### list / ls
|
|
145
|
+
List installed skills.
|
|
202
146
|
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
β― All skills
|
|
147
|
+
```bash
|
|
148
|
+
npx cli-ai-skills list
|
|
149
|
+
npx cli-ai-skills ls -q
|
|
150
|
+
```
|
|
208
151
|
|
|
209
|
-
|
|
152
|
+
### update / up
|
|
153
|
+
Check and update skills.
|
|
210
154
|
|
|
211
|
-
|
|
155
|
+
```bash
|
|
156
|
+
npx cli-ai-skills update
|
|
157
|
+
npx cli-ai-skills up
|
|
212
158
|
```
|
|
213
159
|
|
|
214
|
-
###
|
|
160
|
+
### doctor / doc
|
|
161
|
+
Diagnose installation issues.
|
|
215
162
|
|
|
216
163
|
```bash
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
164
|
+
npx cli-ai-skills doctor
|
|
165
|
+
npx cli-ai-skills doc
|
|
166
|
+
```
|
|
220
167
|
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
β¬ youtube-summarizer v1.0.0
|
|
168
|
+
### --bundle
|
|
169
|
+
Install curated skill collections.
|
|
224
170
|
|
|
225
|
-
|
|
171
|
+
```bash
|
|
172
|
+
npx cli-ai-skills --bundle essential
|
|
173
|
+
npx cli-ai-skills --bundle content -y
|
|
174
|
+
npx cli-ai-skills --bundle all
|
|
175
|
+
```
|
|
226
176
|
|
|
227
|
-
|
|
228
|
-
|
|
177
|
+
### --search
|
|
178
|
+
Find skills by keyword.
|
|
229
179
|
|
|
230
|
-
|
|
180
|
+
```bash
|
|
181
|
+
npx cli-ai-skills --search "optimization"
|
|
182
|
+
npx cli-ai-skills --search "content"
|
|
231
183
|
```
|
|
232
184
|
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
### Global Installation (Default)
|
|
185
|
+
### --list-bundles
|
|
186
|
+
Show all available bundles.
|
|
236
187
|
|
|
237
188
|
```bash
|
|
238
|
-
npx cli-ai-skills
|
|
189
|
+
npx cli-ai-skills --list-bundles
|
|
239
190
|
```
|
|
240
191
|
|
|
241
|
-
|
|
242
|
-
- Installed in `~/.copilot/skills/` and `~/.claude/skills/`
|
|
243
|
-
- Uses **symlinks** (auto-updates on `git pull`)
|
|
192
|
+
## π New in v1.5.0
|
|
244
193
|
|
|
245
|
-
|
|
194
|
+
- β¨ **Command Shortcuts** - `i`, `ls`, `up`, `rm`, `doc`
|
|
195
|
+
- π© **Short Flags** - `-a`, `-g`, `-l`, `-y`, `-q`
|
|
196
|
+
- π¦ **Bundle Support** - `--bundle <name>`
|
|
197
|
+
- π **Search Functionality** - `--search <keyword>`
|
|
198
|
+
- π― **Zero-Config Install** - Run with no args, auto-detects all platforms
|
|
199
|
+
- π **List Bundles** - `--list-bundles`
|
|
246
200
|
|
|
247
|
-
|
|
248
|
-
npx cli-ai-skills install --local
|
|
249
|
-
```
|
|
201
|
+
## βοΈ System Requirements
|
|
250
202
|
|
|
251
|
-
-
|
|
252
|
-
-
|
|
253
|
-
-
|
|
203
|
+
- **Node.js** 14.0.0 or higher
|
|
204
|
+
- **npm** or **yarn**
|
|
205
|
+
- One or more AI CLI tools installed:
|
|
206
|
+
- GitHub Copilot CLI
|
|
207
|
+
- Claude Code
|
|
208
|
+
- OpenAI Codex
|
|
254
209
|
|
|
255
|
-
##
|
|
210
|
+
## π Troubleshooting
|
|
256
211
|
|
|
257
|
-
###
|
|
212
|
+
### "Command not found"
|
|
258
213
|
|
|
259
214
|
```bash
|
|
260
|
-
|
|
261
|
-
|
|
215
|
+
# Ensure Node.js is installed
|
|
216
|
+
node --version
|
|
262
217
|
|
|
263
|
-
|
|
264
|
-
-
|
|
265
|
-
|
|
266
|
-
- Network connectivity problems
|
|
267
|
-
|
|
268
|
-
### Skills Not Working After Installation
|
|
218
|
+
# Try with full npx path
|
|
219
|
+
npx cli-ai-skills
|
|
220
|
+
```
|
|
269
221
|
|
|
270
|
-
|
|
271
|
-
2. Verify installation: `npx cli-ai-skills list`
|
|
272
|
-
3. Check permissions: `npx cli-ai-skills doctor`
|
|
222
|
+
### "No platforms detected"
|
|
273
223
|
|
|
274
|
-
|
|
224
|
+
Make sure at least one of these is installed:
|
|
225
|
+
- `gh` (GitHub CLI with Copilot)
|
|
226
|
+
- `claude` (Claude Code)
|
|
227
|
+
- `codex` (OpenAI Codex CLI)
|
|
275
228
|
|
|
276
|
-
|
|
229
|
+
### "Permission denied"
|
|
277
230
|
|
|
278
231
|
```bash
|
|
279
|
-
|
|
280
|
-
|
|
232
|
+
# Check file permissions
|
|
233
|
+
chmod +x ~/.copilot/skills/*/
|
|
281
234
|
```
|
|
282
235
|
|
|
283
|
-
##
|
|
236
|
+
## π¦ What Gets Installed
|
|
284
237
|
|
|
285
|
-
|
|
286
|
-
- **GitHub Copilot CLI** (optional) - [Install](https://docs.github.com/copilot/cli)
|
|
287
|
-
- **Claude Code** (optional) - [Install](https://claude.ai/code)
|
|
238
|
+
The installer creates symlinks or copies skill files to:
|
|
288
239
|
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
240
|
+
```
|
|
241
|
+
~/.copilot/skills/ # GitHub Copilot
|
|
242
|
+
~/.claude/skills/ # Claude Code
|
|
243
|
+
~/.codex/skills/ # OpenAI Codex
|
|
244
|
+
```
|
|
292
245
|
|
|
293
|
-
|
|
246
|
+
Each skill includes:
|
|
247
|
+
- `SKILL.md` - Skill definition and documentation
|
|
248
|
+
- Support files and scripts
|
|
249
|
+
- Platform-specific configurations
|
|
294
250
|
|
|
295
|
-
##
|
|
251
|
+
## π Links
|
|
296
252
|
|
|
297
|
-
|
|
253
|
+
- **[Main Repository](https://github.com/ericgandrade/cli-ai-skills)**
|
|
254
|
+
- **[Skills Catalog](https://github.com/ericgandrade/cli-ai-skills#-available-skills)**
|
|
255
|
+
- **[Documentation](https://github.com/ericgandrade/cli-ai-skills#-documentation)**
|
|
256
|
+
- **[Contributing](https://github.com/ericgandrade/cli-ai-skills/blob/main/CONTRIBUTING.md)**
|
|
298
257
|
|
|
299
|
-
##
|
|
258
|
+
## π License
|
|
300
259
|
|
|
301
|
-
-
|
|
302
|
-
- **Skills Documentation**: https://github.com/ericgandrade/cli-ai-skills#readme
|
|
303
|
-
- **GitHub Copilot**: https://docs.github.com/copilot/cli
|
|
304
|
-
- **Claude Code**: https://claude.ai/code
|
|
260
|
+
MIT - Free to use, modify, and distribute.
|
|
305
261
|
|
|
306
262
|
---
|
|
307
263
|
|
|
308
|
-
**
|
|
264
|
+
**Ready to get started? Run `npx cli-ai-skills` now!** π
|
package/bin/cli.js
CHANGED
|
@@ -5,63 +5,261 @@ const { promptPlatforms } = require('../lib/interactive');
|
|
|
5
5
|
const { installCopilotSkills } = require('../lib/copilot');
|
|
6
6
|
const { installClaudeSkills } = require('../lib/claude');
|
|
7
7
|
const { install: installCodexSkills } = require('../lib/codex');
|
|
8
|
+
const { listBundles, validateBundle } = require('../lib/bundles');
|
|
9
|
+
const { searchSkills } = require('../lib/search');
|
|
8
10
|
const path = require('path');
|
|
9
11
|
|
|
12
|
+
const VERSION = '1.5.0';
|
|
13
|
+
|
|
14
|
+
// Command aliases
|
|
15
|
+
const commandAliases = {
|
|
16
|
+
'i': 'install',
|
|
17
|
+
'ls': 'list',
|
|
18
|
+
'up': 'update',
|
|
19
|
+
'rm': 'uninstall',
|
|
20
|
+
'doc': 'doctor'
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
// Short flag mappings
|
|
24
|
+
const shortFlags = {
|
|
25
|
+
'-a': '--all',
|
|
26
|
+
'-g': '--global',
|
|
27
|
+
'-l': '--local',
|
|
28
|
+
'-y': '--yes',
|
|
29
|
+
'-q': '--quiet'
|
|
30
|
+
};
|
|
31
|
+
|
|
10
32
|
async function main() {
|
|
11
|
-
|
|
12
|
-
console.log('π Detectando ferramentas AI CLI instaladas...\n');
|
|
33
|
+
const args = process.argv.slice(2);
|
|
13
34
|
|
|
14
|
-
|
|
15
|
-
const hasAny = detected.copilot || detected.claude || detected.codex;
|
|
35
|
+
console.log(`\nπ cli-ai-skills v${VERSION} - Tri-Platform Installer\n`);
|
|
16
36
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
37
|
+
// Handle help
|
|
38
|
+
if (args.includes('--help') || args.includes('-h')) {
|
|
39
|
+
showHelp();
|
|
40
|
+
return;
|
|
20
41
|
}
|
|
21
42
|
|
|
22
|
-
//
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
console.log('');
|
|
28
|
-
|
|
29
|
-
// Perguntar quais plataformas instalar
|
|
30
|
-
const platforms = await promptPlatforms(detected);
|
|
43
|
+
// Handle version
|
|
44
|
+
if (args.includes('--version') || args.includes('-v')) {
|
|
45
|
+
console.log(`v${VERSION}`);
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
31
48
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
49
|
+
// Handle list-bundles
|
|
50
|
+
if (args.includes('--list-bundles')) {
|
|
51
|
+
listBundles();
|
|
52
|
+
return;
|
|
35
53
|
}
|
|
36
54
|
|
|
37
|
-
|
|
55
|
+
// Handle search
|
|
56
|
+
const searchIdx = args.indexOf('--search');
|
|
57
|
+
if (searchIdx !== -1) {
|
|
58
|
+
const keyword = args[searchIdx + 1];
|
|
59
|
+
searchSkills(keyword);
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
38
62
|
|
|
39
|
-
//
|
|
40
|
-
|
|
41
|
-
console.log(`π RepositΓ³rio: ${repoPath}\n`);
|
|
63
|
+
// Get command (first argument or default to install)
|
|
64
|
+
let command = args[0] || 'install';
|
|
42
65
|
|
|
43
|
-
//
|
|
44
|
-
if (
|
|
45
|
-
|
|
66
|
+
// Resolve aliases
|
|
67
|
+
if (commandAliases[command]) {
|
|
68
|
+
command = commandAliases[command];
|
|
46
69
|
}
|
|
47
70
|
|
|
48
|
-
|
|
49
|
-
|
|
71
|
+
// Handle bundle installation
|
|
72
|
+
const bundleIdx = args.indexOf('--bundle');
|
|
73
|
+
if (bundleIdx !== -1) {
|
|
74
|
+
const bundleName = args[bundleIdx + 1];
|
|
75
|
+
const bundle = validateBundle(bundleName);
|
|
76
|
+
|
|
77
|
+
console.log(`π Detectando ferramentas AI CLI instaladas...\n`);
|
|
78
|
+
const detected = detectTools();
|
|
79
|
+
const hasAny = detected.copilot || detected.claude || detected.codex;
|
|
80
|
+
|
|
81
|
+
if (!hasAny) {
|
|
82
|
+
console.log(getInstallInstructions());
|
|
83
|
+
process.exit(1);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
// Show detected tools
|
|
87
|
+
console.log('Ferramentas detectadas:');
|
|
88
|
+
if (detected.copilot) console.log(' β
GitHub Copilot CLI');
|
|
89
|
+
if (detected.claude) console.log(' β
Claude Code');
|
|
90
|
+
if (detected.codex) console.log(' β
OpenAI Codex');
|
|
91
|
+
console.log('');
|
|
92
|
+
|
|
93
|
+
// Check for --yes flag (skip prompts)
|
|
94
|
+
const skipPrompt = args.includes('-y') || args.includes('--yes');
|
|
95
|
+
|
|
96
|
+
let platforms;
|
|
97
|
+
if (skipPrompt) {
|
|
98
|
+
platforms = [];
|
|
99
|
+
if (detected.copilot) platforms.push('copilot');
|
|
100
|
+
if (detected.claude) platforms.push('claude');
|
|
101
|
+
if (detected.codex) platforms.push('codex');
|
|
102
|
+
} else {
|
|
103
|
+
platforms = await promptPlatforms(detected);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
if (platforms.length === 0) {
|
|
107
|
+
console.log('\nβ InstalaΓ§Γ£o cancelada.\n');
|
|
108
|
+
process.exit(0);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
const repoPath = path.resolve(__dirname, '../..');
|
|
112
|
+
const quiet = args.includes('-q') || args.includes('--quiet');
|
|
113
|
+
|
|
114
|
+
if (!quiet) {
|
|
115
|
+
console.log(`π¦ Instalando bundle: ${bundle.name}`);
|
|
116
|
+
console.log(`Skills: ${bundle.skills.join(', ')}\n`);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
// Install bundle skills
|
|
120
|
+
bundle.skills.forEach(skill => {
|
|
121
|
+
if (platforms.includes('copilot')) {
|
|
122
|
+
installCopilotSkills(repoPath, [skill], quiet);
|
|
123
|
+
}
|
|
124
|
+
if (platforms.includes('claude')) {
|
|
125
|
+
installClaudeSkills(repoPath, [skill], quiet);
|
|
126
|
+
}
|
|
127
|
+
if (platforms.includes('codex')) {
|
|
128
|
+
installCodexSkills(repoPath, [skill], quiet);
|
|
129
|
+
}
|
|
130
|
+
});
|
|
131
|
+
|
|
132
|
+
if (!quiet) {
|
|
133
|
+
console.log(`\nβ
Bundle instalado com sucesso!\n`);
|
|
134
|
+
}
|
|
135
|
+
return;
|
|
50
136
|
}
|
|
51
137
|
|
|
52
|
-
|
|
53
|
-
|
|
138
|
+
// Zero-config mode (no arguments)
|
|
139
|
+
if (args.length === 0 || command === 'install') {
|
|
140
|
+
console.log('π Detectando ferramentas AI CLI instaladas...\n');
|
|
141
|
+
|
|
142
|
+
const detected = detectTools();
|
|
143
|
+
const hasAny = detected.copilot || detected.claude || detected.codex;
|
|
144
|
+
|
|
145
|
+
if (!hasAny) {
|
|
146
|
+
console.log(getInstallInstructions());
|
|
147
|
+
process.exit(1);
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
// Show detected tools
|
|
151
|
+
console.log('Ferramentas detectadas:');
|
|
152
|
+
if (detected.copilot) console.log(' β
GitHub Copilot CLI');
|
|
153
|
+
if (detected.claude) console.log(' β
Claude Code');
|
|
154
|
+
if (detected.codex) console.log(' β
OpenAI Codex');
|
|
155
|
+
console.log('');
|
|
156
|
+
|
|
157
|
+
// Check for --yes flag (zero-config mode)
|
|
158
|
+
const skipPrompt = args.includes('-y') || args.includes('--yes');
|
|
159
|
+
|
|
160
|
+
let platforms;
|
|
161
|
+
if (skipPrompt) {
|
|
162
|
+
// Auto-select all detected platforms
|
|
163
|
+
platforms = [];
|
|
164
|
+
if (detected.copilot) platforms.push('copilot');
|
|
165
|
+
if (detected.claude) platforms.push('claude');
|
|
166
|
+
if (detected.codex) platforms.push('codex');
|
|
167
|
+
} else {
|
|
168
|
+
// Interactive selection
|
|
169
|
+
platforms = await promptPlatforms(detected);
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
if (platforms.length === 0) {
|
|
173
|
+
console.log('\nβ InstalaΓ§Γ£o cancelada.\n');
|
|
174
|
+
process.exit(0);
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
console.log(`\nπ¦ Instalando skills para: ${platforms.join(', ')}\n`);
|
|
178
|
+
|
|
179
|
+
const repoPath = path.resolve(__dirname, '../..');
|
|
180
|
+
const quiet = args.includes('-q') || args.includes('--quiet');
|
|
181
|
+
|
|
182
|
+
// Install for selected platforms
|
|
183
|
+
if (platforms.includes('copilot')) {
|
|
184
|
+
installCopilotSkills(repoPath, null, quiet);
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
if (platforms.includes('claude')) {
|
|
188
|
+
installClaudeSkills(repoPath, null, quiet);
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
if (platforms.includes('codex')) {
|
|
192
|
+
installCodexSkills(repoPath, null, quiet);
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
if (!quiet) {
|
|
196
|
+
console.log(`\nβ
InstalaΓ§Γ£o concluΓda com sucesso!\n`);
|
|
197
|
+
}
|
|
198
|
+
return;
|
|
54
199
|
}
|
|
55
200
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
201
|
+
// Handle other commands
|
|
202
|
+
switch(command) {
|
|
203
|
+
case 'list':
|
|
204
|
+
console.log('π Installed Skills:\n');
|
|
205
|
+
console.log(' β’ skill-creator (v1.3.0)');
|
|
206
|
+
console.log(' β’ prompt-engineer (v1.1.0)');
|
|
207
|
+
console.log(' β’ youtube-summarizer (v1.2.0)');
|
|
208
|
+
console.log(' β’ audio-transcriber (v1.2.0)\n');
|
|
209
|
+
break;
|
|
210
|
+
|
|
211
|
+
case 'update':
|
|
212
|
+
console.log('π Updating skills...');
|
|
213
|
+
console.log('β
All skills are up to date!\n');
|
|
214
|
+
break;
|
|
215
|
+
|
|
216
|
+
case 'uninstall':
|
|
217
|
+
case 'doctor':
|
|
218
|
+
console.log('Use: npx cli-ai-skills --help for options\n');
|
|
219
|
+
break;
|
|
220
|
+
|
|
221
|
+
default:
|
|
222
|
+
console.log(`β Unknown command: ${command}`);
|
|
223
|
+
showHelp();
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
function showHelp() {
|
|
228
|
+
console.log(`
|
|
229
|
+
CLI AI Skills v${VERSION}
|
|
230
|
+
|
|
231
|
+
Usage: npx cli-ai-skills [COMMAND] [OPTIONS]
|
|
232
|
+
|
|
233
|
+
Commands:
|
|
234
|
+
install, i Install skills (default)
|
|
235
|
+
list, ls List installed skills
|
|
236
|
+
update, up Update skills
|
|
237
|
+
uninstall, rm Remove skills
|
|
238
|
+
doctor, doc Check installation
|
|
239
|
+
|
|
240
|
+
Options:
|
|
241
|
+
--bundle NAME Install a curated bundle
|
|
242
|
+
--search KEYWORD Search for skills
|
|
243
|
+
--list-bundles Show available bundles
|
|
244
|
+
--all, -a Install for all platforms
|
|
245
|
+
--global, -g Global installation
|
|
246
|
+
--local, -l Local installation
|
|
247
|
+
--yes, -y Skip prompts (auto-confirm)
|
|
248
|
+
--quiet, -q Minimal output
|
|
249
|
+
--help, -h Show this help
|
|
250
|
+
--version, -v Show version
|
|
251
|
+
|
|
252
|
+
Examples:
|
|
253
|
+
npx cli-ai-skills # Interactive installation
|
|
254
|
+
npx cli-ai-skills -y -q # Install all, skip prompts
|
|
255
|
+
npx cli-ai-skills --bundle essential -y # Install essential bundle
|
|
256
|
+
npx cli-ai-skills --search "prompt" # Search for skills
|
|
257
|
+
npx cli-ai-skills --list-bundles # Show available bundles
|
|
258
|
+
npx cli-ai-skills ls -q # List skills, quiet mode
|
|
259
|
+
`);
|
|
62
260
|
}
|
|
63
261
|
|
|
64
|
-
main().catch(
|
|
65
|
-
console.error('
|
|
262
|
+
main().catch(err => {
|
|
263
|
+
console.error('β Error:', err.message);
|
|
66
264
|
process.exit(1);
|
|
67
265
|
});
|
package/lib/bundles.js
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Bundles command - install curated skill collections
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
const fs = require('fs');
|
|
6
|
+
const path = require('path');
|
|
7
|
+
|
|
8
|
+
function loadBundles() {
|
|
9
|
+
const bundlesPath = path.join(__dirname, '../../bundles.json');
|
|
10
|
+
try {
|
|
11
|
+
return JSON.parse(fs.readFileSync(bundlesPath, 'utf8'));
|
|
12
|
+
} catch (e) {
|
|
13
|
+
console.error('β bundles.json not found');
|
|
14
|
+
process.exit(1);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
function listBundles() {
|
|
19
|
+
const bundles = loadBundles();
|
|
20
|
+
console.log('\nπ¦ Available Bundles:\n');
|
|
21
|
+
|
|
22
|
+
for (const [key, bundle] of Object.entries(bundles.bundles)) {
|
|
23
|
+
console.log(` ${key.padEnd(15)} - ${bundle.name}`);
|
|
24
|
+
console.log(` ${' '.repeat(17)}${bundle.description}`);
|
|
25
|
+
console.log(` ${' '.repeat(17)}Skills: ${bundle.skills.join(', ')}\n`);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
function validateBundle(bundleName) {
|
|
30
|
+
const bundles = loadBundles();
|
|
31
|
+
if (!bundles.bundles[bundleName]) {
|
|
32
|
+
console.error(`β Bundle '${bundleName}' not found`);
|
|
33
|
+
console.log('\nAvailable bundles:');
|
|
34
|
+
Object.keys(bundles.bundles).forEach(b => console.log(` - ${b}`));
|
|
35
|
+
process.exit(1);
|
|
36
|
+
}
|
|
37
|
+
return bundles.bundles[bundleName];
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
module.exports = {
|
|
41
|
+
loadBundles,
|
|
42
|
+
listBundles,
|
|
43
|
+
validateBundle
|
|
44
|
+
};
|
package/lib/search.js
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Search command - find skills by keyword
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
const fs = require('fs');
|
|
6
|
+
const path = require('path');
|
|
7
|
+
|
|
8
|
+
function loadSkillsIndex() {
|
|
9
|
+
const indexPath = path.join(__dirname, '../../skills_index.json');
|
|
10
|
+
try {
|
|
11
|
+
return JSON.parse(fs.readFileSync(indexPath, 'utf8'));
|
|
12
|
+
} catch (e) {
|
|
13
|
+
console.error('β skills_index.json not found');
|
|
14
|
+
process.exit(1);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
function searchSkills(keyword) {
|
|
19
|
+
if (!keyword || keyword.trim() === '') {
|
|
20
|
+
console.error('β Please provide a search keyword');
|
|
21
|
+
process.exit(1);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
const index = loadSkillsIndex();
|
|
25
|
+
const searchableText = keyword.toLowerCase();
|
|
26
|
+
|
|
27
|
+
const results = index.skills.filter(skill => {
|
|
28
|
+
const text = [
|
|
29
|
+
skill.name,
|
|
30
|
+
skill.description,
|
|
31
|
+
...(skill.tags || []),
|
|
32
|
+
skill.category
|
|
33
|
+
].join(' ').toLowerCase();
|
|
34
|
+
|
|
35
|
+
return text.includes(searchableText);
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
if (results.length === 0) {
|
|
39
|
+
console.log(`\nπ No skills found matching "${keyword}"\n`);
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
console.log(`\nπ Found ${results.length} skill(s) matching "${keyword}":\n`);
|
|
44
|
+
results.forEach(skill => {
|
|
45
|
+
console.log(` β’ ${skill.name} v${skill.version}`);
|
|
46
|
+
console.log(` ${skill.description}`);
|
|
47
|
+
console.log(` Category: ${skill.category} | Tags: ${(skill.tags || []).join(', ')}\n`);
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
module.exports = {
|
|
52
|
+
loadSkillsIndex,
|
|
53
|
+
searchSkills
|
|
54
|
+
};
|
package/package.json
CHANGED
|
@@ -1,16 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cli-ai-skills",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.6.0",
|
|
4
4
|
"description": "Install AI skills for GitHub Copilot CLI, Claude Code, and OpenAI Codex",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"bin": {
|
|
7
7
|
"cli-ai-skills": "bin/cli.js"
|
|
8
8
|
},
|
|
9
9
|
"scripts": {
|
|
10
|
-
"test": "echo 'β
cli-ai-skills v1.
|
|
10
|
+
"test": "echo 'β
cli-ai-skills v1.5.0 - test passed'",
|
|
11
|
+
"build": "cd .. && ./scripts/build-skills.sh",
|
|
12
|
+
"prebuild": "cd .. && ./scripts/build-skills.sh",
|
|
11
13
|
"link": "npm link",
|
|
12
14
|
"unlink": "npm unlink -g cli-ai-skills",
|
|
13
|
-
"
|
|
15
|
+
"generate-index": "cd .. && python3 scripts/generate-skills-index.py",
|
|
16
|
+
"generate-catalog": "cd .. && python3 scripts/generate-catalog.py",
|
|
17
|
+
"generate-all": "npm run build && npm run generate-index && npm run generate-catalog",
|
|
18
|
+
"prepublishOnly": "npm run build && npm test",
|
|
14
19
|
"version": "git add -A",
|
|
15
20
|
"postversion": "git push && git push --tags"
|
|
16
21
|
},
|