social-cli 0.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.
- package/LICENSE +21 -0
- package/README.md +306 -0
- package/SKILL.md +147 -0
- package/dist/bin/socialpilot.cjs +3348 -0
- package/dist/bin/socialpilot.js +3267 -0
- package/dist/src/client.cjs +127 -0
- package/dist/src/client.js +127 -0
- package/package.json +39 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Paras Raut
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,306 @@
|
|
|
1
|
+
# social-cli
|
|
2
|
+
|
|
3
|
+
The unified social media CLI for AI agents and developers. Post, schedule, and manage content across **14 platforms** from a single command — with structured JSON output for every operation.
|
|
4
|
+
|
|
5
|
+
**Platforms:** Twitter/X · Instagram · Facebook · LinkedIn · TikTok · YouTube · Pinterest · Reddit · Telegram · Discord · Bluesky · Snapchat · Google Business · Threads
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Install
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
npm install -g social-cli
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Or run without installing:
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
npx social-cli --help
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
## Quick Setup
|
|
24
|
+
|
|
25
|
+
**1. Get an API key**
|
|
26
|
+
|
|
27
|
+
Sign up at [socialcli.dev](https://socialcli.dev) and go to **Dashboard → API Keys**.
|
|
28
|
+
|
|
29
|
+
**2. Authenticate**
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
social-cli auth:set --key sk_your_api_key_here
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
**3. Verify**
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
social-cli auth:check
|
|
39
|
+
# → { "status": "SUCCESS", "data": { "workspace": "my-brand", ... } }
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
---
|
|
43
|
+
|
|
44
|
+
## Quick Start
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
# List your connected social accounts
|
|
48
|
+
social-cli accounts list
|
|
49
|
+
|
|
50
|
+
# Post immediately to Twitter
|
|
51
|
+
social-cli posts create \
|
|
52
|
+
-c "Hello from Social CLI!" \
|
|
53
|
+
-p twitter \
|
|
54
|
+
-a <accountId> \
|
|
55
|
+
--now
|
|
56
|
+
|
|
57
|
+
# Schedule a post
|
|
58
|
+
social-cli posts create \
|
|
59
|
+
-c "Scheduled content" \
|
|
60
|
+
-p twitter \
|
|
61
|
+
-a <accountId> \
|
|
62
|
+
--schedule "2025-06-01T09:00:00Z"
|
|
63
|
+
|
|
64
|
+
# Upload media then post with it
|
|
65
|
+
social-cli upload ./photo.jpg
|
|
66
|
+
# → { "publicUrl": "https://cdn.socialcli.dev/..." }
|
|
67
|
+
|
|
68
|
+
social-cli posts create \
|
|
69
|
+
-c "Post with image!" \
|
|
70
|
+
-p twitter \
|
|
71
|
+
-a <accountId> \
|
|
72
|
+
--media "https://cdn.socialcli.dev/..." \
|
|
73
|
+
--now
|
|
74
|
+
|
|
75
|
+
# Cross-post to multiple platforms at once
|
|
76
|
+
social-cli posts create \
|
|
77
|
+
-c "Cross-platform launch!" \
|
|
78
|
+
-p twitter -a <twitterId> \
|
|
79
|
+
-p instagram -a <instagramId> \
|
|
80
|
+
-p linkedin -a <linkedinId> \
|
|
81
|
+
--now
|
|
82
|
+
|
|
83
|
+
# Add to your posting queue
|
|
84
|
+
social-cli posts create \
|
|
85
|
+
-c "Queued post" \
|
|
86
|
+
-p twitter \
|
|
87
|
+
-a <accountId> \
|
|
88
|
+
--queue
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
---
|
|
92
|
+
|
|
93
|
+
## Commands
|
|
94
|
+
|
|
95
|
+
### Auth
|
|
96
|
+
|
|
97
|
+
```bash
|
|
98
|
+
social-cli auth:set --key <apiKey> # Save API key locally
|
|
99
|
+
social-cli auth:check # Verify key and show workspace info
|
|
100
|
+
social-cli auth:whoami # Show current saved key
|
|
101
|
+
social-cli auth:logout # Remove saved key
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
### Accounts
|
|
105
|
+
|
|
106
|
+
```bash
|
|
107
|
+
social-cli accounts list # List all connected accounts
|
|
108
|
+
social-cli accounts health # Check OAuth token validity
|
|
109
|
+
social-cli accounts connect <platform> # Get OAuth URL to connect a platform
|
|
110
|
+
social-cli accounts disconnect <accountId> # Disconnect an account
|
|
111
|
+
social-cli accounts bluesky <handle> <appPass> # Connect Bluesky (no OAuth needed)
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
Supported platforms: `twitter` `instagram` `facebook` `linkedin` `tiktok` `youtube` `pinterest` `reddit` `telegram` `discord` `snapchat` `googlebusiness` `threads`
|
|
115
|
+
|
|
116
|
+
### Posts
|
|
117
|
+
|
|
118
|
+
```bash
|
|
119
|
+
social-cli posts list [--status <s>] [--platform <p>] [--limit <n>]
|
|
120
|
+
social-cli posts create -c <text> -p <platform> -a <accountId> [options]
|
|
121
|
+
social-cli posts get <postId>
|
|
122
|
+
social-cli posts delete <postId>
|
|
123
|
+
social-cli posts retry <postId>
|
|
124
|
+
social-cli posts stats
|
|
125
|
+
social-cli posts validate -c <text> -p <platform> -a <accountId>
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
**`posts create` flags:**
|
|
129
|
+
|
|
130
|
+
| Flag | Description |
|
|
131
|
+
|------|-------------|
|
|
132
|
+
| `-c, --content <text>` | Post text content |
|
|
133
|
+
| `-p, --platform <name>` | Target platform (repeatable) |
|
|
134
|
+
| `-a, --account <id>` | Account ID (repeatable) |
|
|
135
|
+
| `-m, --media <url>` | Media URL — use `social-cli upload` first (repeatable) |
|
|
136
|
+
| `--media-type <type>` | `image`, `video`, or `gif` (default: `image`) |
|
|
137
|
+
| `--now` | Publish immediately |
|
|
138
|
+
| `--draft` | Save as draft |
|
|
139
|
+
| `--schedule <datetime>` | ISO 8601 UTC datetime e.g. `"2025-06-01T09:00:00Z"` |
|
|
140
|
+
| `--queue` | Add to next available queue slot |
|
|
141
|
+
| `--timezone <tz>` | Timezone e.g. `"America/New_York"` |
|
|
142
|
+
| `--json <file>` | Load post data from a JSON file |
|
|
143
|
+
|
|
144
|
+
### Media
|
|
145
|
+
|
|
146
|
+
```bash
|
|
147
|
+
social-cli upload <filePath> # Upload local file → returns publicUrl
|
|
148
|
+
social-cli upload:url --filename <n> --type <mime> # Get raw presigned S3 URL
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
Supported: `image/jpeg` `image/png` `image/gif` `image/webp` `video/mp4` `video/quicktime` `application/pdf`
|
|
152
|
+
|
|
153
|
+
### Queue
|
|
154
|
+
|
|
155
|
+
```bash
|
|
156
|
+
social-cli queue list # Show your posting schedule
|
|
157
|
+
social-cli queue set --slots <file.json> --timezone <tz> # Set recurring slots
|
|
158
|
+
social-cli queue next # Show next available slot
|
|
159
|
+
social-cli queue preview [--count <n>] # Preview upcoming N slots
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
**Slots JSON format:**
|
|
163
|
+
```json
|
|
164
|
+
[
|
|
165
|
+
{ "day": "MON", "time": "09:00" },
|
|
166
|
+
{ "day": "WED", "time": "14:00" },
|
|
167
|
+
{ "day": "FRI", "time": "17:00" }
|
|
168
|
+
]
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
### Profile
|
|
172
|
+
|
|
173
|
+
```bash
|
|
174
|
+
social-cli profile get
|
|
175
|
+
social-cli profile update [--name <name>] [--description <desc>] [--color <hex>]
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
### Analytics & Usage
|
|
179
|
+
|
|
180
|
+
```bash
|
|
181
|
+
social-cli analytics [--platform <p>] [--from <date>] [--to <date>]
|
|
182
|
+
social-cli usage
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
### Twitter/X Engagement
|
|
186
|
+
|
|
187
|
+
```bash
|
|
188
|
+
social-cli twitter retweet <accountId> <tweetId>
|
|
189
|
+
social-cli twitter bookmark <accountId> <tweetId>
|
|
190
|
+
social-cli twitter follow <accountId> <targetUserId>
|
|
191
|
+
social-cli twitter unfollow <accountId> <targetUserId>
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
---
|
|
195
|
+
|
|
196
|
+
## Output Format
|
|
197
|
+
|
|
198
|
+
Every command returns JSON to stdout:
|
|
199
|
+
|
|
200
|
+
```json
|
|
201
|
+
{
|
|
202
|
+
"status": "SUCCESS",
|
|
203
|
+
"message": "Post created successfully",
|
|
204
|
+
"data": {
|
|
205
|
+
"postId": "post_abc123",
|
|
206
|
+
"status": "scheduled",
|
|
207
|
+
"scheduledFor": "2025-06-01T09:00:00Z"
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
Errors:
|
|
213
|
+
|
|
214
|
+
```json
|
|
215
|
+
{
|
|
216
|
+
"status": "ERROR",
|
|
217
|
+
"message": "SOCIAL_CLI_API_KEY not set. Run: social-cli auth:set --key sk_...",
|
|
218
|
+
"data": null
|
|
219
|
+
}
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
Exit code `0` on success, `1` on error — works cleanly in shell scripts and CI pipelines.
|
|
223
|
+
|
|
224
|
+
---
|
|
225
|
+
|
|
226
|
+
## Environment Variables
|
|
227
|
+
|
|
228
|
+
```bash
|
|
229
|
+
SOCIAL_CLI_API_KEY=sk_your_key # Required — your API key
|
|
230
|
+
SOCIAL_CLI_API_URL=https://... # Optional — custom backend URL
|
|
231
|
+
```
|
|
232
|
+
|
|
233
|
+
---
|
|
234
|
+
|
|
235
|
+
## AI Agent Integration
|
|
236
|
+
|
|
237
|
+
### MCP (Claude Desktop, Cursor, OpenClaw)
|
|
238
|
+
|
|
239
|
+
Add to your MCP client config:
|
|
240
|
+
|
|
241
|
+
```json
|
|
242
|
+
{
|
|
243
|
+
"mcpServers": {
|
|
244
|
+
"social-cli": {
|
|
245
|
+
"url": "https://api.socialcli.dev/mcp",
|
|
246
|
+
"headers": {
|
|
247
|
+
"x-api-key": "sk_your_key_here"
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
```
|
|
253
|
+
|
|
254
|
+
Then just tell your agent:
|
|
255
|
+
> "Post 'Launching our new feature!' to Twitter with ./assets/launch.png, schedule for tomorrow 9am UTC"
|
|
256
|
+
|
|
257
|
+
### X402 Protocol (Pay-per-use for agents)
|
|
258
|
+
|
|
259
|
+
Social CLI supports the [X402 payment protocol](https://x402.org) — agents can pay per API call without a subscription:
|
|
260
|
+
|
|
261
|
+
```bash
|
|
262
|
+
# Agents authenticate via X402 — no subscription required
|
|
263
|
+
# Payments processed in USDC on Base or Solana
|
|
264
|
+
```
|
|
265
|
+
|
|
266
|
+
### SKILL.md (OpenClaw auto-discovery)
|
|
267
|
+
|
|
268
|
+
The bundled `SKILL.md` is auto-discovered by OpenClaw and other skill-based agents. Install globally and it just works:
|
|
269
|
+
|
|
270
|
+
```bash
|
|
271
|
+
npm install -g social-cli
|
|
272
|
+
export SOCIAL_CLI_API_KEY=sk_your_key
|
|
273
|
+
social-cli accounts list
|
|
274
|
+
```
|
|
275
|
+
|
|
276
|
+
### Batch scheduling example
|
|
277
|
+
|
|
278
|
+
```bash
|
|
279
|
+
for day in 1 2 3 4 5; do
|
|
280
|
+
social-cli posts create \
|
|
281
|
+
-c "Day $day of our launch week!" \
|
|
282
|
+
--schedule "2025-06-0${day}T09:00:00Z" \
|
|
283
|
+
-p twitter -a <accountId>
|
|
284
|
+
done
|
|
285
|
+
```
|
|
286
|
+
|
|
287
|
+
---
|
|
288
|
+
|
|
289
|
+
## Pricing
|
|
290
|
+
|
|
291
|
+
| Plan | Price | Posts/mo |
|
|
292
|
+
|------|-------|----------|
|
|
293
|
+
| Standard | $19/mo | 200 |
|
|
294
|
+
| Team | $29/mo | 500 |
|
|
295
|
+
| Pro | $49/mo | 1,000 |
|
|
296
|
+
| Ultimate | $99/mo | Unlimited |
|
|
297
|
+
|
|
298
|
+
All plans include CLI access, MCP server, API keys, and all 14 platforms.
|
|
299
|
+
|
|
300
|
+
Get started at [socialcli.dev](https://socialcli.dev)
|
|
301
|
+
|
|
302
|
+
---
|
|
303
|
+
|
|
304
|
+
## License
|
|
305
|
+
|
|
306
|
+
MIT
|
package/SKILL.md
ADDED
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: social-cli
|
|
3
|
+
description: Social media automation CLI — schedule, publish, and manage posts across 14 platforms (Twitter/X, Instagram, Facebook, LinkedIn, TikTok, YouTube, Pinterest, Reddit, Telegram, Discord, Bluesky, Snapchat, Google Business, Threads)
|
|
4
|
+
metadata:
|
|
5
|
+
openclaw:
|
|
6
|
+
requirements:
|
|
7
|
+
env:
|
|
8
|
+
- SOCIAL_CLI_API_KEY
|
|
9
|
+
- SOCIAL_CLI_API_URL
|
|
10
|
+
binaries:
|
|
11
|
+
- social-cli
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
# Social CLI — Social Media Automation
|
|
15
|
+
|
|
16
|
+
Automate social media posting across 14 platforms. Every command outputs structured JSON.
|
|
17
|
+
|
|
18
|
+
## Setup
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
# Install
|
|
22
|
+
npm install -g social-cli
|
|
23
|
+
|
|
24
|
+
# Set credentials
|
|
25
|
+
export SOCIAL_CLI_API_KEY=sk_your_api_key_here
|
|
26
|
+
export SOCIAL_CLI_API_URL=https://api.socialcli.dev
|
|
27
|
+
|
|
28
|
+
# Verify
|
|
29
|
+
social-cli auth:check
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Available Commands
|
|
33
|
+
|
|
34
|
+
### Accounts
|
|
35
|
+
- `social-cli accounts list` — List all connected social media accounts
|
|
36
|
+
- `social-cli accounts health` — Check token validity of all accounts
|
|
37
|
+
- `social-cli accounts connect <platform>` — Get OAuth URL to connect a platform
|
|
38
|
+
- `social-cli accounts disconnect <accountId>` — Disconnect an account
|
|
39
|
+
- `social-cli accounts bluesky <handle> <appPassword>` — Connect Bluesky via credentials
|
|
40
|
+
|
|
41
|
+
### Posts
|
|
42
|
+
- `social-cli posts list [--status <status>] [--platform <platform>] [--limit <n>]` — List posts
|
|
43
|
+
- `social-cli posts create -c <content> -p <platform> -a <accountId> [options]` — Create/schedule a post
|
|
44
|
+
- `social-cli posts get <postId>` — Get post details
|
|
45
|
+
- `social-cli posts delete <postId>` — Delete a post
|
|
46
|
+
- `social-cli posts retry <postId>` — Retry a failed post
|
|
47
|
+
- `social-cli posts stats` — Get post counts by status
|
|
48
|
+
- `social-cli posts validate -c <content> -p <platform> -a <accountId>` — Validate before posting
|
|
49
|
+
|
|
50
|
+
### Media
|
|
51
|
+
- `social-cli upload <filePath>` — Upload a local file, returns publicUrl for use in posts
|
|
52
|
+
- `social-cli upload:url` — Get a raw presigned upload URL
|
|
53
|
+
|
|
54
|
+
### Queue
|
|
55
|
+
- `social-cli queue list` — Show posting queue schedule
|
|
56
|
+
- `social-cli queue set --slots <json> --timezone <tz>` — Set queue schedule
|
|
57
|
+
- `social-cli queue next` — Get next queue slot time
|
|
58
|
+
- `social-cli queue preview [--count <n>]` — Preview upcoming queue times
|
|
59
|
+
|
|
60
|
+
### Profile
|
|
61
|
+
- `social-cli profile get` — Get your workspace profile
|
|
62
|
+
- `social-cli profile update [--name <name>] [--description <desc>]` — Update profile
|
|
63
|
+
|
|
64
|
+
### Analytics
|
|
65
|
+
- `social-cli analytics [--platform <platform>]` — Get post analytics
|
|
66
|
+
|
|
67
|
+
### Usage
|
|
68
|
+
- `social-cli usage` — Get plan usage stats
|
|
69
|
+
|
|
70
|
+
## Post Creation Examples
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
# Publish immediately to Twitter
|
|
74
|
+
social-cli posts create \
|
|
75
|
+
-c "Hello from Social CLI!" \
|
|
76
|
+
-p twitter \
|
|
77
|
+
-a <accountId> \
|
|
78
|
+
--now
|
|
79
|
+
|
|
80
|
+
# Schedule for a specific time
|
|
81
|
+
social-cli posts create \
|
|
82
|
+
-c "Scheduled post content" \
|
|
83
|
+
-p twitter \
|
|
84
|
+
-a <accountId> \
|
|
85
|
+
--schedule "2025-06-01T09:00:00Z"
|
|
86
|
+
|
|
87
|
+
# Save as draft
|
|
88
|
+
social-cli posts create \
|
|
89
|
+
-c "Draft content" \
|
|
90
|
+
-p twitter \
|
|
91
|
+
-a <accountId> \
|
|
92
|
+
--draft
|
|
93
|
+
|
|
94
|
+
# Post with image (upload first)
|
|
95
|
+
social-cli upload ./photo.jpg
|
|
96
|
+
# → returns: { "publicUrl": "https://media.zernio.com/..." }
|
|
97
|
+
social-cli posts create \
|
|
98
|
+
-c "Post with image!" \
|
|
99
|
+
-p twitter \
|
|
100
|
+
-a <accountId> \
|
|
101
|
+
--media "https://media.zernio.com/..." \
|
|
102
|
+
--media-type image \
|
|
103
|
+
--now
|
|
104
|
+
|
|
105
|
+
# Post to multiple platforms
|
|
106
|
+
social-cli posts create \
|
|
107
|
+
-c "Cross-platform post!" \
|
|
108
|
+
-p twitter -a <twitterAccountId> \
|
|
109
|
+
-p instagram -a <instagramAccountId> \
|
|
110
|
+
--now
|
|
111
|
+
|
|
112
|
+
# Add to queue
|
|
113
|
+
social-cli posts create \
|
|
114
|
+
-c "Queued post" \
|
|
115
|
+
-p twitter \
|
|
116
|
+
-a <accountId> \
|
|
117
|
+
--queue
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
## AI Agent Workflow
|
|
121
|
+
|
|
122
|
+
```
|
|
123
|
+
1. social-cli accounts list → discover accountIds
|
|
124
|
+
2. social-cli upload ./image.png → get publicUrl for media
|
|
125
|
+
3. social-cli posts create ... → create/schedule post
|
|
126
|
+
4. social-cli posts list → verify post was created
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
## Output Format
|
|
130
|
+
|
|
131
|
+
All commands output JSON:
|
|
132
|
+
```json
|
|
133
|
+
{
|
|
134
|
+
"status": "SUCCESS",
|
|
135
|
+
"message": "...",
|
|
136
|
+
"data": { ... }
|
|
137
|
+
}
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
Errors:
|
|
141
|
+
```json
|
|
142
|
+
{
|
|
143
|
+
"status": "ERROR",
|
|
144
|
+
"message": "...",
|
|
145
|
+
"data": null
|
|
146
|
+
}
|
|
147
|
+
```
|