@clawtrail/init 1.1.0 → 1.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.
Files changed (2) hide show
  1. package/dist/index.js +17 -32
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -152,13 +152,18 @@ async function configureOpenClaw(apiKey, staging) {
152
152
  console.log(chalk.green(`\u2713 Configured ClawTrail in ${chalk.cyan("~/.openclaw/openclaw.json")}`));
153
153
  }
154
154
  async function copyToOpenClawSkills(targetDir) {
155
- const skillsDir = path.join(os.homedir(), ".openclaw", "skills", "clawtrail");
155
+ const workspaceDir = path.join(os.homedir(), ".openclaw", "workspace");
156
+ const skillsDir = path.join(workspaceDir, "skills", "clawtrail");
157
+ await ensureDirectory(workspaceDir);
156
158
  await ensureDirectory(skillsDir);
157
- const filesToCopy = ["SKILL.md", "HEARTBEAT.md", "MESSAGING.md"];
159
+ const copies = [
160
+ { file: "HEARTBEAT.md", dest: path.join(workspaceDir, "HEARTBEAT.md") },
161
+ { file: "SKILL.md", dest: path.join(skillsDir, "SKILL.md") },
162
+ { file: "MESSAGING.md", dest: path.join(skillsDir, "MESSAGING.md") }
163
+ ];
158
164
  let copied = 0;
159
- for (const file of filesToCopy) {
165
+ for (const { file, dest } of copies) {
160
166
  const src = path.join(targetDir, file);
161
- const dest = path.join(skillsDir, file);
162
167
  try {
163
168
  await fs.copyFile(src, dest);
164
169
  copied++;
@@ -166,8 +171,10 @@ async function copyToOpenClawSkills(targetDir) {
166
171
  }
167
172
  }
168
173
  console.log(
169
- chalk.green(`\u2713 Copied ${copied} skill file${copied !== 1 ? "s" : ""} to ${chalk.cyan("~/.openclaw/skills/clawtrail/")}`)
174
+ chalk.green(`\u2713 Copied ${copied} file${copied !== 1 ? "s" : ""} to OpenClaw workspace`)
170
175
  );
176
+ console.log(chalk.gray(` HEARTBEAT.md \u2192 ${chalk.cyan("~/.openclaw/workspace/HEARTBEAT.md")}`));
177
+ console.log(chalk.gray(` Skills \u2192 ${chalk.cyan("~/.openclaw/workspace/skills/clawtrail/")}`));
171
178
  }
172
179
  async function main() {
173
180
  console.log(
@@ -192,7 +199,6 @@ async function main() {
192
199
  default: false
193
200
  }
194
201
  ]);
195
- let openClawSkillsCopied = false;
196
202
  if (shouldRegister) {
197
203
  const answers = await inquirer.prompt([
198
204
  {
@@ -272,7 +278,6 @@ async function main() {
272
278
  try {
273
279
  await configureOpenClaw(apiKey, staging);
274
280
  await copyToOpenClawSkills(targetDir);
275
- openClawSkillsCopied = true;
276
281
  } catch (ocErr) {
277
282
  console.log(chalk.yellow(`\u26A0 OpenClaw config failed: ${ocErr.message}`));
278
283
  }
@@ -291,29 +296,6 @@ async function main() {
291
296
  );
292
297
  }
293
298
  }
294
- if (hasOpenClaw && !openClawSkillsCopied) {
295
- const { copySkills } = await inquirer.prompt([
296
- {
297
- type: "confirm",
298
- name: "copySkills",
299
- message: "Copy skill files to ~/.openclaw/skills/clawtrail/?",
300
- default: true
301
- }
302
- ]);
303
- if (copySkills) {
304
- try {
305
- await copyToOpenClawSkills(targetDir);
306
- } catch (ocErr) {
307
- console.log(chalk.yellow(`\u26A0 Could not copy skill files: ${ocErr.message}`));
308
- }
309
- }
310
- }
311
- } else if (hasOpenClaw) {
312
- try {
313
- await copyToOpenClawSkills(targetDir);
314
- } catch {
315
- }
316
- console.log(chalk.gray("\u2139 OpenClaw detected \u2014 run with --interactive to configure your API key\n"));
317
299
  }
318
300
  console.log(chalk.cyan.bold("\n\u{1F4DA} Next Steps:\n"));
319
301
  console.log(
@@ -337,10 +319,13 @@ async function main() {
337
319
  );
338
320
  if (hasOpenClaw) {
339
321
  console.log(
340
- chalk.white("5. ") + chalk.gray("(OpenClaw) API key configured at ") + chalk.cyan("~/.openclaw/openclaw.json")
322
+ chalk.white("5. ") + chalk.gray("(OpenClaw) Plugin config at ") + chalk.cyan("~/.openclaw/openclaw.json")
323
+ );
324
+ console.log(
325
+ chalk.white("6. ") + chalk.gray("(OpenClaw) HEARTBEAT.md at ") + chalk.cyan("~/.openclaw/workspace/HEARTBEAT.md")
341
326
  );
342
327
  console.log(
343
- chalk.white("6. ") + chalk.gray("(OpenClaw) Skill files at ") + chalk.cyan("~/.openclaw/skills/clawtrail/")
328
+ chalk.white("7. ") + chalk.gray("(OpenClaw) Skill files at ") + chalk.cyan("~/.openclaw/workspace/skills/clawtrail/")
344
329
  );
345
330
  }
346
331
  const env = staging ? "staging" : "production";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clawtrail/init",
3
- "version": "1.1.0",
3
+ "version": "1.1.2",
4
4
  "description": "CLI installer for ClawTrail AI agent skill files",
5
5
  "main": "dist/index.js",
6
6
  "bin": {