@trieungoctam/vibekit 1.0.2 → 1.0.4
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/package.json +1 -1
- package/src/commands/init.js +72 -9
package/package.json
CHANGED
package/src/commands/init.js
CHANGED
|
@@ -145,6 +145,22 @@ async function setupClaudeCode(targetDir, force) {
|
|
|
145
145
|
const claudeDir = path.join(targetDir, '.claude');
|
|
146
146
|
fs.ensureDirSync(claudeDir);
|
|
147
147
|
|
|
148
|
+
// Copy skills directly to .claude/skills (for slash commands)
|
|
149
|
+
const skillsDir = path.join(claudeDir, 'skills');
|
|
150
|
+
const srcSkills = path.join(VIBEKIT_ROOT, 'skills');
|
|
151
|
+
if (fs.existsSync(srcSkills)) {
|
|
152
|
+
fs.copySync(srcSkills, skillsDir, { overwrite: force });
|
|
153
|
+
console.log(chalk.gray(' ✓ .claude/skills/'));
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
// Copy agents to .claude/agents
|
|
157
|
+
const agentsDir = path.join(claudeDir, 'agents');
|
|
158
|
+
const srcAgents = path.join(VIBEKIT_ROOT, 'agents');
|
|
159
|
+
if (fs.existsSync(srcAgents)) {
|
|
160
|
+
fs.copySync(srcAgents, agentsDir, { overwrite: force });
|
|
161
|
+
console.log(chalk.gray(' ✓ .claude/agents/'));
|
|
162
|
+
}
|
|
163
|
+
|
|
148
164
|
// CLAUDE.md
|
|
149
165
|
const claudeMd = path.join(targetDir, 'CLAUDE.md');
|
|
150
166
|
if (!fs.existsSync(claudeMd) || force) {
|
|
@@ -156,7 +172,7 @@ This project uses VibeKit for AI assistance.
|
|
|
156
172
|
See \`.vibekit/rules/\` for development rules.
|
|
157
173
|
|
|
158
174
|
## Skills
|
|
159
|
-
See \`.
|
|
175
|
+
See \`.claude/skills/\` for available skills (all with \`vk:\` prefix).
|
|
160
176
|
|
|
161
177
|
## Workflows
|
|
162
178
|
- \`/vk:brainstorm\` - Design & brainstorm
|
|
@@ -214,13 +230,20 @@ async function setupCursor(targetDir, force) {
|
|
|
214
230
|
const cursorDir = path.join(targetDir, '.cursor');
|
|
215
231
|
fs.ensureDirSync(cursorDir);
|
|
216
232
|
|
|
217
|
-
// rules
|
|
233
|
+
// Copy rules directly into .cursor/rules
|
|
218
234
|
const rulesDir = path.join(cursorDir, 'rules');
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
235
|
+
const srcRules = path.join(VIBEKIT_ROOT, 'rules');
|
|
236
|
+
if (fs.existsSync(srcRules)) {
|
|
237
|
+
fs.copySync(srcRules, rulesDir, { overwrite: force });
|
|
238
|
+
console.log(chalk.gray(' ✓ .cursor/rules/'));
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
// Copy skills directly into .cursor/skills
|
|
242
|
+
const skillsDir = path.join(cursorDir, 'skills');
|
|
243
|
+
const srcSkills = path.join(VIBEKIT_ROOT, 'skills');
|
|
244
|
+
if (fs.existsSync(srcSkills)) {
|
|
245
|
+
fs.copySync(srcSkills, skillsDir, { overwrite: force });
|
|
246
|
+
console.log(chalk.gray(' ✓ .cursor/skills/'));
|
|
224
247
|
}
|
|
225
248
|
|
|
226
249
|
await addToGitignore(targetDir, ['.cursor/']);
|
|
@@ -232,6 +255,22 @@ async function setupCodex(targetDir, force) {
|
|
|
232
255
|
const codexDir = path.join(targetDir, '.codex');
|
|
233
256
|
fs.ensureDirSync(codexDir);
|
|
234
257
|
|
|
258
|
+
// Copy agents directly into .codex/agents
|
|
259
|
+
const agentsDir = path.join(codexDir, 'agents');
|
|
260
|
+
const srcAgents = path.join(VIBEKIT_ROOT, 'agents');
|
|
261
|
+
if (fs.existsSync(srcAgents)) {
|
|
262
|
+
fs.copySync(srcAgents, agentsDir, { overwrite: force });
|
|
263
|
+
console.log(chalk.gray(' ✓ .codex/agents/'));
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
// Copy skills directly into .codex/skills
|
|
267
|
+
const skillsDir = path.join(codexDir, 'skills');
|
|
268
|
+
const srcSkills = path.join(VIBEKIT_ROOT, 'skills');
|
|
269
|
+
if (fs.existsSync(srcSkills)) {
|
|
270
|
+
fs.copySync(srcSkills, skillsDir, { overwrite: force });
|
|
271
|
+
console.log(chalk.gray(' ✓ .codex/skills/'));
|
|
272
|
+
}
|
|
273
|
+
|
|
235
274
|
// AGENTS.md
|
|
236
275
|
const agentsMd = path.join(targetDir, 'AGENTS.md');
|
|
237
276
|
if (!fs.existsSync(agentsMd) || force) {
|
|
@@ -240,7 +279,10 @@ async function setupCodex(targetDir, force) {
|
|
|
240
279
|
This project uses VibeKit for AI assistance.
|
|
241
280
|
|
|
242
281
|
## Available Agents
|
|
243
|
-
See \`.
|
|
282
|
+
See \`.codex/agents/\` for agent definitions.
|
|
283
|
+
|
|
284
|
+
## Skills
|
|
285
|
+
See \`.codex/skills/\` for available skills (all with \`vk:\` prefix).
|
|
244
286
|
|
|
245
287
|
`);
|
|
246
288
|
console.log(chalk.gray(' ✓ AGENTS.md'));
|
|
@@ -252,14 +294,35 @@ See \`.vibekit/agents/\` for agent definitions.
|
|
|
252
294
|
async function setupOpenCode(targetDir, force) {
|
|
253
295
|
console.log(chalk.blue('\n🔶 Setting up OpenCode'));
|
|
254
296
|
|
|
297
|
+
const opencodeDir = path.join(targetDir, '.opencode');
|
|
298
|
+
fs.ensureDirSync(opencodeDir);
|
|
299
|
+
|
|
300
|
+
// Copy rules directly into .opencode/rules
|
|
301
|
+
const rulesDir = path.join(opencodeDir, 'rules');
|
|
302
|
+
const srcRules = path.join(VIBEKIT_ROOT, 'rules');
|
|
303
|
+
if (fs.existsSync(srcRules)) {
|
|
304
|
+
fs.copySync(srcRules, rulesDir, { overwrite: force });
|
|
305
|
+
console.log(chalk.gray(' ✓ .opencode/rules/'));
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
// Copy skills directly into .opencode/skills
|
|
309
|
+
const skillsDir = path.join(opencodeDir, 'skills');
|
|
310
|
+
const srcSkills = path.join(VIBEKIT_ROOT, 'skills');
|
|
311
|
+
if (fs.existsSync(srcSkills)) {
|
|
312
|
+
fs.copySync(srcSkills, skillsDir, { overwrite: force });
|
|
313
|
+
console.log(chalk.gray(' ✓ .opencode/skills/'));
|
|
314
|
+
}
|
|
315
|
+
|
|
255
316
|
// opencode.json
|
|
256
317
|
const opencodeJson = path.join(targetDir, 'opencode.json');
|
|
257
318
|
if (!fs.existsSync(opencodeJson) || force) {
|
|
258
319
|
fs.writeJsonSync(opencodeJson, {
|
|
259
|
-
instructions: ['.
|
|
320
|
+
instructions: ['.opencode/rules/*.md', 'CLAUDE.md']
|
|
260
321
|
}, { spaces: 2 });
|
|
261
322
|
console.log(chalk.gray(' ✓ opencode.json'));
|
|
262
323
|
}
|
|
324
|
+
|
|
325
|
+
await addToGitignore(targetDir, ['.opencode/']);
|
|
263
326
|
}
|
|
264
327
|
|
|
265
328
|
async function addToGitignore(targetDir, entries) {
|