@arvorco/relentless 0.1.7 → 0.1.8

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/bin/relentless.ts CHANGED
@@ -30,8 +30,9 @@ program
30
30
  .command("init")
31
31
  .description("Initialize Relentless in the current project")
32
32
  .option("-d, --dir <path>", "Project directory", process.cwd())
33
+ .option("-f, --force", "Force reinstall - overwrite existing files", false)
33
34
  .action(async (options) => {
34
- await initProject(options.dir);
35
+ await initProject(options.dir, options.force);
35
36
  });
36
37
 
37
38
  // Run command
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arvorco/relentless",
3
- "version": "0.1.7",
3
+ "version": "0.1.8",
4
4
  "description": "Universal AI agent orchestrator - works with Claude Code, Amp, OpenCode, Codex, Droid, and Gemini",
5
5
  "type": "module",
6
6
  "publishConfig": {
@@ -127,8 +127,8 @@ patterns: []
127
127
  /**
128
128
  * Initialize Relentless in a project
129
129
  */
130
- export async function initProject(projectDir: string = process.cwd()): Promise<void> {
131
- console.log(chalk.bold.blue("\nšŸš€ Initializing Relentless\n"));
130
+ export async function initProject(projectDir: string = process.cwd(), force: boolean = false): Promise<void> {
131
+ console.log(chalk.bold.blue(`\nšŸš€ ${force ? "Reinstalling" : "Initializing"} Relentless\n`));
132
132
 
133
133
  // Check installed agents
134
134
  console.log(chalk.dim("Detecting installed agents..."));
@@ -161,13 +161,14 @@ export async function initProject(projectDir: string = process.cwd()): Promise<v
161
161
  for (const [filename, contentFn] of Object.entries(RELENTLESS_FILES)) {
162
162
  const path = join(relentlessDir, filename);
163
163
 
164
- if (existsSync(path)) {
164
+ if (existsSync(path) && !force) {
165
165
  console.log(` ${chalk.yellow("⚠")} relentless/${filename} already exists, skipping`);
166
166
  continue;
167
167
  }
168
168
 
169
169
  await Bun.write(path, contentFn());
170
- console.log(` ${chalk.green("āœ“")} relentless/${filename}`);
170
+ const action = existsSync(path) && force ? "updated" : "created";
171
+ console.log(` ${chalk.green("āœ“")} relentless/${filename} ${force ? `(${action})` : ""}`);
171
172
  }
172
173
 
173
174
  // Note: constitution.md is NOT copied - it should be created by /relentless.constitution command
@@ -208,11 +209,17 @@ export async function initProject(projectDir: string = process.cwd()): Promise<v
208
209
  const sourcePath = join(sourceSkillsDir, skill);
209
210
  const destPath = join(skillsDir, skill);
210
211
 
211
- if (existsSync(sourcePath) && !existsSync(destPath)) {
212
- await Bun.spawn(["cp", "-r", sourcePath, destPath]).exited;
213
- console.log(` ${chalk.green("āœ“")} .claude/skills/${skill}`);
214
- } else if (existsSync(destPath)) {
215
- console.log(` ${chalk.yellow("⚠")} .claude/skills/${skill} already exists, skipping`);
212
+ if (existsSync(sourcePath)) {
213
+ if (existsSync(destPath) && !force) {
214
+ console.log(` ${chalk.yellow("⚠")} .claude/skills/${skill} already exists, skipping`);
215
+ } else {
216
+ if (existsSync(destPath) && force) {
217
+ await Bun.spawn(["rm", "-rf", destPath]).exited;
218
+ }
219
+ await Bun.spawn(["cp", "-r", sourcePath, destPath]).exited;
220
+ const action = force ? "updated" : "created";
221
+ console.log(` ${chalk.green("āœ“")} .claude/skills/${skill} (${action})`);
222
+ }
216
223
  }
217
224
  }
218
225
  }
@@ -243,12 +250,15 @@ export async function initProject(projectDir: string = process.cwd()): Promise<v
243
250
  const sourcePath = join(sourceCommandsDir, command);
244
251
  const destPath = join(commandsDir, command);
245
252
 
246
- if (existsSync(sourcePath) && !existsSync(destPath)) {
247
- const content = await Bun.file(sourcePath).text();
248
- await Bun.write(destPath, content);
249
- console.log(` ${chalk.green("āœ“")} .claude/commands/${command}`);
250
- } else if (existsSync(destPath)) {
251
- console.log(` ${chalk.yellow("⚠")} .claude/commands/${command} already exists, skipping`);
253
+ if (existsSync(sourcePath)) {
254
+ if (existsSync(destPath) && !force) {
255
+ console.log(` ${chalk.yellow("⚠")} .claude/commands/${command} already exists, skipping`);
256
+ } else {
257
+ const content = await Bun.file(sourcePath).text();
258
+ await Bun.write(destPath, content);
259
+ const action = existsSync(destPath) && force ? "updated" : "created";
260
+ console.log(` ${chalk.green("āœ“")} .claude/commands/${command} (${action})`);
261
+ }
252
262
  }
253
263
  }
254
264
  }