social-agent-cli 1.6.1 → 1.7.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/bin/claude-social.sh +21 -0
- package/bin/social-agent.js +19 -33
- package/install.ts +37 -1
- package/package.json +1 -1
package/bin/claude-social.sh
CHANGED
|
@@ -7,6 +7,27 @@ MARKER="<!-- SOCIAL-AGENT-START -->"
|
|
|
7
7
|
MARKER_END="<!-- SOCIAL-AGENT-END -->"
|
|
8
8
|
CLAUDE_MD="CLAUDE.md"
|
|
9
9
|
|
|
10
|
+
# Help
|
|
11
|
+
if [[ "$1" == "--help" || "$1" == "-h" || "$1" == "help" ]]; then
|
|
12
|
+
echo ""
|
|
13
|
+
echo " claude-social - Claude Code with social media awareness"
|
|
14
|
+
echo ""
|
|
15
|
+
echo " Usage:"
|
|
16
|
+
echo " claude-social Start with social suggestions enabled"
|
|
17
|
+
echo " claude-social -permission Start with all permissions auto-approved"
|
|
18
|
+
echo ""
|
|
19
|
+
echo " Inside Claude Code:"
|
|
20
|
+
echo " /social Create post from current work"
|
|
21
|
+
echo " /social-suggest on|off Toggle suggestions"
|
|
22
|
+
echo " /social-suggest level 1-5 Set sensitivity"
|
|
23
|
+
echo ""
|
|
24
|
+
echo " Config:"
|
|
25
|
+
echo " social-agent config Show config paths"
|
|
26
|
+
echo " social-agent setup First-time setup"
|
|
27
|
+
echo ""
|
|
28
|
+
exit 0
|
|
29
|
+
fi
|
|
30
|
+
|
|
10
31
|
if [[ ! -f "$PROMPT_FILE" ]]; then
|
|
11
32
|
echo "Social Agent kurulu değil. Önce: social-agent setup"
|
|
12
33
|
exit 1
|
package/bin/social-agent.js
CHANGED
|
@@ -80,7 +80,7 @@ switch (command) {
|
|
|
80
80
|
}
|
|
81
81
|
|
|
82
82
|
case "login":
|
|
83
|
-
case "learn":
|
|
83
|
+
case "learn": // gizli - kullanıcıya gösterilmez, sistem kullanır
|
|
84
84
|
case "run":
|
|
85
85
|
case "post":
|
|
86
86
|
case "test":
|
|
@@ -101,46 +101,32 @@ switch (command) {
|
|
|
101
101
|
case "-h":
|
|
102
102
|
case "help":
|
|
103
103
|
console.log(`
|
|
104
|
-
social-agent
|
|
104
|
+
social-agent - AI-powered social media automation
|
|
105
105
|
|
|
106
106
|
Setup:
|
|
107
|
-
social-agent setup First-time setup
|
|
108
|
-
social-agent
|
|
109
|
-
social-agent config
|
|
107
|
+
social-agent setup First-time setup
|
|
108
|
+
social-agent login <platform> Chrome profile select (x, linkedin)
|
|
109
|
+
social-agent config Show config file paths
|
|
110
110
|
|
|
111
|
-
|
|
112
|
-
social-agent
|
|
113
|
-
social-agent
|
|
114
|
-
social-agent run
|
|
111
|
+
Post:
|
|
112
|
+
social-agent run x "post this: Hello world"
|
|
113
|
+
social-agent run x "post with image: msg, image: /path/to/img.jpg"
|
|
114
|
+
social-agent run linkedin "share this post: Hello"
|
|
115
|
+
social-agent post "text" --platforms mastodon
|
|
115
116
|
|
|
116
|
-
|
|
117
|
-
social-agent
|
|
117
|
+
Actions:
|
|
118
|
+
social-agent run x "like this: https://x.com/..."
|
|
119
|
+
social-agent run x "like and retweet: https://x.com/..."
|
|
118
120
|
|
|
119
121
|
Info:
|
|
120
|
-
social-agent status
|
|
121
|
-
social-agent history
|
|
122
|
-
social-agent help This help message
|
|
123
|
-
|
|
124
|
-
Examples:
|
|
125
|
-
social-agent login x
|
|
126
|
-
social-agent learn x → learn to post (default)
|
|
127
|
-
social-agent learn "learn to like tweets" x → learn liking
|
|
128
|
-
social-agent run x "like this tweet: https://..."
|
|
129
|
-
social-agent run x "like and retweet: https://..."
|
|
130
|
-
social-agent run linkedin "send 3 connection requests"
|
|
131
|
-
social-agent post "New feature!" --platforms mastodon
|
|
132
|
-
|
|
133
|
-
Data:
|
|
134
|
-
~/.social-agent/ All data lives here
|
|
135
|
-
~/.social-agent/social-mode-prompt.md AI personality (edit with: social-agent config)
|
|
136
|
-
~/.social-agent/config.json API keys (edit with: social-agent config api)
|
|
137
|
-
~/.social-agent/knowledge/ Platform knowledge files
|
|
138
|
-
~/.social-agent/maps/ Learned action maps
|
|
139
|
-
~/.social-agent/history.json Action log
|
|
122
|
+
social-agent status Connected platforms
|
|
123
|
+
social-agent history Action log
|
|
140
124
|
|
|
141
125
|
Claude Code:
|
|
142
|
-
claude-social Social-aware mode
|
|
143
|
-
/social Create post from
|
|
126
|
+
claude-social Social-aware mode
|
|
127
|
+
/social Create post from work context
|
|
128
|
+
/social-suggest on|off Toggle suggestions
|
|
129
|
+
/social-suggest level 1-5 Set suggestion sensitivity
|
|
144
130
|
`);
|
|
145
131
|
break;
|
|
146
132
|
|
package/install.ts
CHANGED
|
@@ -268,7 +268,43 @@ Kullanıcıya "Arka planda gönderiliyor" de ve diğer işlere devam et.
|
|
|
268
268
|
`;
|
|
269
269
|
|
|
270
270
|
writeFileSync(socialCommandDest, socialCommandContent);
|
|
271
|
-
|
|
271
|
+
|
|
272
|
+
// /social-suggest komutu
|
|
273
|
+
const suggestCommandDest = join(commandsDir, "social-suggest.md");
|
|
274
|
+
const suggestContent = `Sosyal medya öneri ayarlarını değiştir.
|
|
275
|
+
|
|
276
|
+
Argümanı parse et: $ARGUMENTS
|
|
277
|
+
|
|
278
|
+
### "on" ise:
|
|
279
|
+
\`\`\`bash
|
|
280
|
+
rm -f ~/.social-agent/.social-disabled
|
|
281
|
+
\`\`\`
|
|
282
|
+
"Sosyal medya önerileri açıldı." de.
|
|
283
|
+
|
|
284
|
+
### "off" ise:
|
|
285
|
+
\`\`\`bash
|
|
286
|
+
touch ~/.social-agent/.social-disabled
|
|
287
|
+
\`\`\`
|
|
288
|
+
"Sosyal medya önerileri kapatıldı. /social-suggest on ile açabilirsin." de.
|
|
289
|
+
|
|
290
|
+
### "level N" ise (N = 1-5):
|
|
291
|
+
~/.social-agent/social-mode-prompt.md dosyasındaki "Öneri hassasiyeti: X/5" satırını "Öneri hassasiyeti: N/5" olarak değiştir.
|
|
292
|
+
Altındaki kural satırını da güncelle:
|
|
293
|
+
- 1: "Çok seçici ol. Oturumda en fazla 1 kez öner. Sadece release veya büyük özellik."
|
|
294
|
+
- 2: "Seçici ol. Oturumda en fazla 1 kez öner. Büyük özellikler ve önemli fix'ler."
|
|
295
|
+
- 3: "Dengeli ol. Oturumda en fazla 2 kez öner. Kayda değer çalışmalarda."
|
|
296
|
+
- 4: "Aktif ol. Oturumda en fazla 3 kez öner. Küçük özellikler dahil."
|
|
297
|
+
- 5: "Çok aktif ol. Oturumda en fazla 5 kez öner. Her kayda değer iş sonrası."
|
|
298
|
+
"Hassasiyet N/5 olarak ayarlandı." de.
|
|
299
|
+
|
|
300
|
+
### Argüman yoksa:
|
|
301
|
+
\`\`\`bash
|
|
302
|
+
test -f ~/.social-agent/.social-disabled && echo "KAPALI" || echo "AÇIK"
|
|
303
|
+
grep "Öneri hassasiyeti" ~/.social-agent/social-mode-prompt.md 2>/dev/null
|
|
304
|
+
\`\`\`
|
|
305
|
+
`;
|
|
306
|
+
writeFileSync(suggestCommandDest, suggestContent);
|
|
307
|
+
console.log(" ✓ /social ve /social-suggest komutları oluşturuldu");
|
|
272
308
|
|
|
273
309
|
// 9. Platform Login & Learn
|
|
274
310
|
console.log(`
|