@autoposting.ai/cli 0.2.1 → 0.2.2
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/README.md +285 -0
- package/package.json +1 -1
package/README.md
ADDED
|
@@ -0,0 +1,285 @@
|
|
|
1
|
+
<div align="center">
|
|
2
|
+
|
|
3
|
+
# @autoposting.ai/cli
|
|
4
|
+
|
|
5
|
+
**The command-line tool for AI-powered social media automation.**
|
|
6
|
+
|
|
7
|
+
Schedule posts, manage brands, run AI agents, generate content, clip videos, and build carousels — all from your terminal. Includes a built-in MCP server with 51 tools for Claude Desktop, Cursor, and any AI agent.
|
|
8
|
+
|
|
9
|
+
[](https://www.npmjs.com/package/@autoposting.ai/cli)
|
|
10
|
+
[](https://github.com/Autoposting-ai/autoposting-cli/actions/workflows/ci.yml)
|
|
11
|
+
[](https://nodejs.org)
|
|
12
|
+
[](https://github.com/Autoposting-ai/autoposting-cli/blob/main/LICENSE)
|
|
13
|
+
|
|
14
|
+
</div>
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
## Why @autoposting.ai/cli?
|
|
19
|
+
|
|
20
|
+
- **61 commands** across 13 domains — posts, brands, agents, KB, ideas, clips, carousels, webhooks, billing, usage, workspaces, auth, utility
|
|
21
|
+
- **MCP server** with 51 tools — let Claude, Cursor, or any AI agent manage your social media
|
|
22
|
+
- **Multi-platform** — X (Twitter), LinkedIn, Instagram, Threads, YouTube
|
|
23
|
+
- **AI-native** — rewrite posts, score content, generate ideas, create carousels with AI
|
|
24
|
+
- **CI/CD ready** — JSON output, API key auth, quiet mode, exit codes
|
|
25
|
+
- **Shell completions** — bash, zsh, fish, PowerShell
|
|
26
|
+
- **Lightweight** — 123KB single-file bundle, zero runtime dependencies beyond Node.js
|
|
27
|
+
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
## Install
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
npm install -g @autoposting.ai/cli
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
Both `autoposting` and `ap` (short alias) are available after install.
|
|
37
|
+
|
|
38
|
+
---
|
|
39
|
+
|
|
40
|
+
## Quick Start
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
# Authenticate
|
|
44
|
+
export AUTOPOSTING_API_KEY=sk-social-your-key
|
|
45
|
+
# Or use browser login:
|
|
46
|
+
ap auth login
|
|
47
|
+
|
|
48
|
+
# Create and publish a post
|
|
49
|
+
ap posts create --brand my-brand --text "Hello world!" --platforms x,linkedin
|
|
50
|
+
ap posts publish <post-id>
|
|
51
|
+
|
|
52
|
+
# Run an AI agent
|
|
53
|
+
ap agents run <agent-id>
|
|
54
|
+
|
|
55
|
+
# Generate content ideas
|
|
56
|
+
ap ideas generate --topic "AI trends" --count 5
|
|
57
|
+
|
|
58
|
+
# Health check
|
|
59
|
+
ap doctor
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
---
|
|
63
|
+
|
|
64
|
+
## Commands
|
|
65
|
+
|
|
66
|
+
### Content Creation & Publishing
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
# Posts — create, schedule, publish, AI-rewrite, AI-score
|
|
70
|
+
ap posts create --brand my-brand --text "Launch day!" --platforms x,linkedin,threads
|
|
71
|
+
ap posts schedule <id> --at "2025-06-01T09:00:00Z"
|
|
72
|
+
ap posts publish <id>
|
|
73
|
+
ap posts rewrite <id> # AI-rewrite for better engagement
|
|
74
|
+
ap posts score <id> # AI scoring with feedback
|
|
75
|
+
|
|
76
|
+
# Carousels — create, AI-generate, convert to post
|
|
77
|
+
ap carousels generate --topic "5 Growth Tips" --brand my-brand --slides 5
|
|
78
|
+
ap carousels draft <id> # convert to post draft
|
|
79
|
+
|
|
80
|
+
# Ideas — AI-generate content ideas
|
|
81
|
+
ap ideas generate --topic "product launch" --count 10
|
|
82
|
+
ap ideas enrich <id> # add AI context
|
|
83
|
+
|
|
84
|
+
# Clips — import and render video
|
|
85
|
+
ap clips import --url "https://youtube.com/watch?v=..."
|
|
86
|
+
ap clips render <id>
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
### Social Media Management
|
|
90
|
+
|
|
91
|
+
```bash
|
|
92
|
+
# Brands — manage social accounts
|
|
93
|
+
ap brands list
|
|
94
|
+
ap brands auth-status my-brand # check platform connections
|
|
95
|
+
ap brands create --name "My Brand" --timezone "America/New_York"
|
|
96
|
+
|
|
97
|
+
# Agents — AI-powered automated posting
|
|
98
|
+
ap agents create --name "Daily News" --type publish --frequency daily --time "09:00"
|
|
99
|
+
ap agents run <id> # trigger immediate run
|
|
100
|
+
ap agents toggle <id> # enable/disable
|
|
101
|
+
|
|
102
|
+
# Knowledge Base — feed AI with your content
|
|
103
|
+
ap kb create --name "Product Docs"
|
|
104
|
+
ap kb ingest <id> --url "https://docs.example.com"
|
|
105
|
+
ap kb search <id> --query "pricing"
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
### Infrastructure
|
|
109
|
+
|
|
110
|
+
```bash
|
|
111
|
+
# Webhooks — real-time event notifications
|
|
112
|
+
ap webhooks create --url "https://api.example.com/hook" --events "post.published,post.failed"
|
|
113
|
+
ap webhooks test <id>
|
|
114
|
+
|
|
115
|
+
# Billing & Usage
|
|
116
|
+
ap billing status # plan and subscription
|
|
117
|
+
ap billing credits # AI credit balance
|
|
118
|
+
ap usage summary # publishing stats
|
|
119
|
+
|
|
120
|
+
# Workspaces
|
|
121
|
+
ap workspaces list
|
|
122
|
+
ap workspaces switch <id> # session auth only
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
### Utility
|
|
126
|
+
|
|
127
|
+
```bash
|
|
128
|
+
ap doctor # health check (CLI, Node, auth, API)
|
|
129
|
+
ap whoami # current auth source
|
|
130
|
+
ap open posts # open in browser
|
|
131
|
+
ap update # check for updates
|
|
132
|
+
ap completion zsh >> ~/.zshrc # shell completions
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
---
|
|
136
|
+
|
|
137
|
+
## MCP Server for AI Agents
|
|
138
|
+
|
|
139
|
+
The CLI includes a built-in MCP (Model Context Protocol) server. AI agents like Claude Desktop and Cursor can use it to manage social media autonomously.
|
|
140
|
+
|
|
141
|
+
```bash
|
|
142
|
+
ap mcp # starts stdio MCP server with 51 tools
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
### Claude Desktop Setup
|
|
146
|
+
|
|
147
|
+
Add to `claude_desktop_config.json`:
|
|
148
|
+
|
|
149
|
+
```json
|
|
150
|
+
{
|
|
151
|
+
"mcpServers": {
|
|
152
|
+
"autoposting": {
|
|
153
|
+
"command": "ap",
|
|
154
|
+
"args": ["mcp"],
|
|
155
|
+
"env": { "AUTOPOSTING_API_KEY": "sk-social-your-key" }
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
### 51 MCP Tools
|
|
162
|
+
|
|
163
|
+
| Domain | Tools | Examples |
|
|
164
|
+
|--------|-------|---------|
|
|
165
|
+
| Posts | 10 | create-post, publish-post, schedule-post, rewrite-post, score-post |
|
|
166
|
+
| Brands | 6 | list-brands, get-brand, create-brand, brand-auth-status |
|
|
167
|
+
| Agents | 8 | create-agent, run-agent, toggle-agent, agent-runs |
|
|
168
|
+
| Knowledge Base | 7 | create-kb, search-kb, ingest-kb, kb-docs |
|
|
169
|
+
| Ideas | 4 | generate-ideas, enrich-idea |
|
|
170
|
+
| Clips | 5 | import-clip, render-clip |
|
|
171
|
+
| Carousels | 6 | generate-carousel, draft-carousel |
|
|
172
|
+
| Webhooks | 6 | create-webhook, test-webhook |
|
|
173
|
+
| Billing | 2 | billing-status, billing-credits |
|
|
174
|
+
| Usage | 1 | usage-summary |
|
|
175
|
+
|
|
176
|
+
All tools use correct domain terminology (`brandSlug`, `text`) — no translation layer needed.
|
|
177
|
+
|
|
178
|
+
---
|
|
179
|
+
|
|
180
|
+
## CI/CD Integration
|
|
181
|
+
|
|
182
|
+
```yaml
|
|
183
|
+
# GitHub Actions — automated social media posting
|
|
184
|
+
- name: Announce release
|
|
185
|
+
run: |
|
|
186
|
+
npm install -g @autoposting.ai/cli
|
|
187
|
+
ap posts create \
|
|
188
|
+
--brand my-brand \
|
|
189
|
+
--text "v${{ github.ref_name }} is live! Check it out." \
|
|
190
|
+
--platforms x,linkedin \
|
|
191
|
+
--json
|
|
192
|
+
env:
|
|
193
|
+
AUTOPOSTING_API_KEY: ${{ secrets.AUTOPOSTING_API_KEY }}
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
### Output Modes
|
|
197
|
+
|
|
198
|
+
| Mode | When | Format |
|
|
199
|
+
|------|------|--------|
|
|
200
|
+
| Interactive | TTY terminal | Tables, spinners, colors |
|
|
201
|
+
| JSON | `--json` or piped | Clean JSON for parsing |
|
|
202
|
+
| Quiet | `--quiet` | Errors only, no spinners |
|
|
203
|
+
|
|
204
|
+
### Exit Codes
|
|
205
|
+
|
|
206
|
+
| Code | Meaning |
|
|
207
|
+
|------|---------|
|
|
208
|
+
| 0 | Success |
|
|
209
|
+
| 1 | General error |
|
|
210
|
+
| 2 | Authentication error |
|
|
211
|
+
| 3 | Validation error |
|
|
212
|
+
| 4 | Not found |
|
|
213
|
+
| 5 | Rate limited |
|
|
214
|
+
| 6 | Server error |
|
|
215
|
+
|
|
216
|
+
---
|
|
217
|
+
|
|
218
|
+
## Global Flags
|
|
219
|
+
|
|
220
|
+
| Flag | Description |
|
|
221
|
+
|------|-------------|
|
|
222
|
+
| `--api-key <key>` | Override API key |
|
|
223
|
+
| `--json` | JSON output |
|
|
224
|
+
| `--quiet` | Suppress non-essential output |
|
|
225
|
+
| `--format <type>` | `table` or `json` |
|
|
226
|
+
| `--no-color` | Disable colors |
|
|
227
|
+
|
|
228
|
+
### Auth Priority
|
|
229
|
+
|
|
230
|
+
```
|
|
231
|
+
--api-key flag > AUTOPOSTING_API_KEY env > ~/.config/autoposting/credentials.json
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
---
|
|
235
|
+
|
|
236
|
+
## Supported Platforms
|
|
237
|
+
|
|
238
|
+
X (Twitter) · LinkedIn · Instagram · Threads · YouTube
|
|
239
|
+
|
|
240
|
+
---
|
|
241
|
+
|
|
242
|
+
## Use Cases
|
|
243
|
+
|
|
244
|
+
- **Social media automation from terminal** — schedule and publish posts without leaving your editor
|
|
245
|
+
- **AI agent social media posting** — let Claude or Cursor manage your social presence via MCP
|
|
246
|
+
- **Automated content pipeline** — generate ideas → AI-rewrite → schedule → publish, all scripted
|
|
247
|
+
- **CI/CD release announcements** — auto-post when you ship
|
|
248
|
+
- **Multi-brand management** — manage multiple brands and platforms from one tool
|
|
249
|
+
- **Knowledge-driven content** — ingest docs, generate posts from your own content
|
|
250
|
+
- **Video clip processing** — import, render, and publish video clips
|
|
251
|
+
- **Carousel generation** — AI-create slide decks for LinkedIn and Instagram
|
|
252
|
+
|
|
253
|
+
---
|
|
254
|
+
|
|
255
|
+
## SDK
|
|
256
|
+
|
|
257
|
+
For programmatic access in your own applications:
|
|
258
|
+
|
|
259
|
+
```bash
|
|
260
|
+
npm install @autoposting.ai/sdk
|
|
261
|
+
```
|
|
262
|
+
|
|
263
|
+
```typescript
|
|
264
|
+
import { Autoposting } from '@autoposting.ai/sdk'
|
|
265
|
+
const client = new Autoposting({ apiKey: 'sk-social-...' })
|
|
266
|
+
const post = await client.posts.create({ brandSlug: 'my-brand', text: 'Hello!', platforms: ['x'] })
|
|
267
|
+
```
|
|
268
|
+
|
|
269
|
+
See [@autoposting.ai/sdk on npm](https://www.npmjs.com/package/@autoposting.ai/sdk) for full SDK docs.
|
|
270
|
+
|
|
271
|
+
---
|
|
272
|
+
|
|
273
|
+
## License
|
|
274
|
+
|
|
275
|
+
MIT — see [LICENSE](https://github.com/Autoposting-ai/autoposting-cli/blob/main/LICENSE).
|
|
276
|
+
|
|
277
|
+
---
|
|
278
|
+
|
|
279
|
+
<div align="center">
|
|
280
|
+
|
|
281
|
+
Built by **[Autoposting.ai](https://autoposting.ai)** — AI-powered social media scheduling for X, LinkedIn, Instagram, Threads, and YouTube.
|
|
282
|
+
|
|
283
|
+
[Website](https://autoposting.ai) · [SDK](https://www.npmjs.com/package/@autoposting.ai/sdk) · [GitHub](https://github.com/Autoposting-ai/autoposting-cli) · [@iuditg](https://x.com/iuditg)
|
|
284
|
+
|
|
285
|
+
</div>
|