@0dai-dev/cli 3.1.7 → 3.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.
Files changed (2) hide show
  1. package/bin/0dai.js +10 -3
  2. package/package.json +1 -1
package/bin/0dai.js CHANGED
@@ -344,9 +344,16 @@ function writeFiles(target, files) {
344
344
  if (rel.endsWith("settings.json")) {
345
345
  finalContent = mergeSettingsJson(existing, content);
346
346
  merged++;
347
- } else if (rel === "AGENTS.md" && existing.includes("managed: false")) {
348
- unchanged++; // User owns this file, skip
349
- continue;
347
+ } else if (rel === "AGENTS.md") {
348
+ if (existing.includes("managed: false")) {
349
+ unchanged++; // User owns this file, skip
350
+ continue;
351
+ }
352
+ // Backup existing AGENTS.md before overwrite
353
+ const backupDir = path.join(target, "ai", ".backups");
354
+ fs.mkdirSync(backupDir, { recursive: true });
355
+ fs.writeFileSync(path.join(backupDir, "AGENTS.md.bak"), existing, "utf8");
356
+ updated++;
350
357
  } else {
351
358
  updated++;
352
359
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@0dai-dev/cli",
3
- "version": "3.1.7",
3
+ "version": "3.1.8",
4
4
  "description": "One config layer for 5 AI agent CLIs — Claude Code, Codex, OpenCode, Gemini, Aider",
5
5
  "bin": {
6
6
  "0dai": "./bin/0dai.js"