social-agent-cli 5.0.0 → 5.0.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.
@@ -73,6 +73,51 @@ switch (command) {
73
73
  break;
74
74
  }
75
75
 
76
+ case "reset": {
77
+ console.log("\n Sıfırlama başlatılıyor...\n");
78
+ const { execSync: ex, spawnSync: sp } = await import("node:child_process");
79
+ const { rmSync: rm } = await import("node:fs");
80
+
81
+ // 1. Eski data sil
82
+ try { rm(DATA_DIR, { recursive: true, force: true }); console.log(" ✓ ~/.social-agent/ silindi"); } catch {}
83
+
84
+ // 2. Eski commands sil
85
+ const cmdsDir = join(homedir(), ".claude", "commands");
86
+ for (const f of ["social.md", "social-suggest.md", "social-suggest-level.md"]) {
87
+ try { rm(join(cmdsDir, f), { force: true }); } catch {}
88
+ }
89
+ console.log(" ✓ Eski /social komutları silindi");
90
+
91
+ // 3. zshrc/bashrc'den claude-social alias sil
92
+ const shell = process.env.SHELL?.includes("zsh") ? ".zshrc" : ".bashrc";
93
+ const rcPath = join(homedir(), shell);
94
+ try {
95
+ const rc = readFileSync(rcPath, "utf-8");
96
+ const cleaned = rc.split("\n").filter(l => !l.includes("claude-social") && !l.includes("# Social Agent")).join("\n");
97
+ const { writeFileSync: wf } = await import("node:fs");
98
+ wf(rcPath, cleaned);
99
+ console.log(` ✓ ${shell}'den claude-social kaldırıldı`);
100
+ } catch {}
101
+
102
+ // 4. CLAUDE.md'lerden social block sil
103
+ try {
104
+ const { readdirSync: rd } = await import("node:fs");
105
+ // Mevcut dizindeki CLAUDE.md
106
+ try {
107
+ const cmd = readFileSync("CLAUDE.md", "utf-8");
108
+ if (cmd.includes("SOCIAL-AGENT-START")) {
109
+ const cleaned = cmd.replace(/<!-- SOCIAL-AGENT-START -->[\s\S]*?<!-- SOCIAL-AGENT-END -->/g, "").trim();
110
+ const { writeFileSync: wf } = await import("node:fs");
111
+ if (cleaned) wf("CLAUDE.md", cleaned + "\n"); else rm("CLAUDE.md", { force: true });
112
+ console.log(" ✓ CLAUDE.md temizlendi");
113
+ }
114
+ } catch {}
115
+ } catch {}
116
+
117
+ console.log("\n ✓ Sıfırlama tamamlandı. Şimdi: social-agent setup\n");
118
+ break;
119
+ }
120
+
76
121
  case "screenshot": {
77
122
  // social-agent screenshot /tmp/input.html /tmp/output.jpeg 1200 675
78
123
  run("core/screenshot.ts", args);
@@ -105,6 +150,7 @@ switch (command) {
105
150
 
106
151
  Setup:
107
152
  social-agent setup First-time setup
153
+ social-agent reset Remove all data and start fresh
108
154
  social-agent login <platform> Chrome profile select (x, linkedin)
109
155
  social-agent config Show config paths
110
156
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "social-agent-cli",
3
- "version": "5.0.0",
3
+ "version": "5.0.1",
4
4
  "description": "AI-powered social media agent - free APIs + browser automation with self-healing selectors",
5
5
  "type": "module",
6
6
  "bin": {