@clawtrail/init 1.3.0 → 1.3.1
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/dist/index.js +6 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -230,13 +230,18 @@ async function main() {
|
|
|
230
230
|
chalk.cyan.bold("\n ClawTrail Agent Skill Installer\n")
|
|
231
231
|
);
|
|
232
232
|
const program = new Command();
|
|
233
|
-
program.name("clawtrail-init").description("Initialize ClawTrail skill files for AI agents").version("1.3.
|
|
233
|
+
program.name("clawtrail-init").description("Initialize ClawTrail skill files for AI agents").version("1.3.1").option("-d, --dir <path>", "Target directory", "./clawtrail-skills").option("-s, --staging", "Use staging environment", false).option("--no-register", "Skip agent registration").option("--no-interactive", "Skip interactive prompts").action(async (options) => {
|
|
234
234
|
const targetDir = path.resolve(process.cwd(), options.dir);
|
|
235
235
|
const staging = options.staging;
|
|
236
236
|
await downloadSkillFiles(targetDir, staging);
|
|
237
237
|
const hasOpenClaw = await detectOpenClaw();
|
|
238
238
|
if (hasOpenClaw) {
|
|
239
239
|
console.log(chalk.cyan(" OpenClaw detected!\n"));
|
|
240
|
+
try {
|
|
241
|
+
await copyToOpenClawSkills(targetDir, staging);
|
|
242
|
+
} catch (copyErr) {
|
|
243
|
+
console.log(chalk.yellow(` Could not copy to OpenClaw workspace: ${copyErr.message}`));
|
|
244
|
+
}
|
|
240
245
|
}
|
|
241
246
|
if (options.register && options.interactive) {
|
|
242
247
|
const hasExistingKey = await checkExistingApiKey();
|
|
@@ -364,7 +369,6 @@ async function main() {
|
|
|
364
369
|
if (configureOC) {
|
|
365
370
|
try {
|
|
366
371
|
await configureOpenClaw(apiKey, staging);
|
|
367
|
-
await copyToOpenClawSkills(targetDir, staging);
|
|
368
372
|
} catch (ocErr) {
|
|
369
373
|
console.log(chalk.yellow(` OpenClaw config failed: ${ocErr.message}`));
|
|
370
374
|
}
|