@so-me/cli 0.1.0
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 +170 -0
- package/dist/bin/so-me.js +2727 -0
- package/dist/bin/so-me.js.map +1 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +2718 -0
- package/dist/index.js.map +1 -0
- package/package.json +51 -0
package/README.md
ADDED
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
# @so-me/cli
|
|
2
|
+
|
|
3
|
+
Command-line tool for the so-me social media scheduler. Manage posts, accounts, media, analytics, inbox, AI content, approvals, and teams from your terminal.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install -g @so-me/cli
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Authentication
|
|
12
|
+
|
|
13
|
+
### API Key (recommended for scripts)
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
so-me auth:login --api-key sk_live_your_key_here
|
|
17
|
+
# Or use environment variable
|
|
18
|
+
export SOME_API_KEY=sk_live_your_key_here
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
### Browser Login (interactive)
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
so-me auth:login
|
|
25
|
+
# Opens browser for authorization, no API key needed
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
### Check Status
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
so-me auth:status
|
|
32
|
+
so-me auth:logout
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## Commands
|
|
36
|
+
|
|
37
|
+
### Posts
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
so-me posts:list # List all posts
|
|
41
|
+
so-me posts:list --table # Table format
|
|
42
|
+
so-me posts:list --start-date 2026-04-01 --end-date 2026-04-30
|
|
43
|
+
so-me posts:get <id> # Get a single post
|
|
44
|
+
so-me posts:create -c "Hello!" --platform TWITTER
|
|
45
|
+
so-me posts:create -c "Scheduled" -s 2026-04-10T14:00:00Z --platform LINKEDIN
|
|
46
|
+
so-me posts:create -c "With media" -m file-id-1,file-id-2 --post-type IMAGE
|
|
47
|
+
so-me posts:create -j ./campaign.json # From JSON file
|
|
48
|
+
so-me posts:update <id> -c "Updated text"
|
|
49
|
+
so-me posts:delete <id> --yes # Skip confirmation
|
|
50
|
+
so-me posts:schedule <id> -s 2026-04-10T14:00:00Z
|
|
51
|
+
so-me posts:unschedule <id>
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
### Accounts
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
so-me accounts:list # List connected accounts
|
|
58
|
+
so-me accounts:get <id> # Account details
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
### Media
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
so-me media:upload ./photo.jpg # Upload file
|
|
65
|
+
so-me media:list # List files
|
|
66
|
+
so-me media:list --folder <folder-id> # Files in folder
|
|
67
|
+
so-me media:delete <id> --yes
|
|
68
|
+
so-me media:folders # List folders
|
|
69
|
+
so-me media:create-folder --name "Campaign Assets"
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
### Analytics
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
so-me analytics:platform <account-id> # Platform metrics (7 days)
|
|
76
|
+
so-me analytics:platform <account-id> --days 30
|
|
77
|
+
so-me analytics:post <post-id> # Post metrics
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
### Inbox
|
|
81
|
+
|
|
82
|
+
```bash
|
|
83
|
+
so-me inbox:list # List conversations
|
|
84
|
+
so-me inbox:list --status unresolved # Filter by status
|
|
85
|
+
so-me inbox:messages <thread-id> # Thread messages
|
|
86
|
+
so-me inbox:reply <thread-id> --message "Thanks!"
|
|
87
|
+
so-me inbox:subscribe <account-id> --platform TWITTER
|
|
88
|
+
so-me inbox:unsubscribe <account-id> --platform TWITTER
|
|
89
|
+
so-me inbox:saved-replies # List saved replies
|
|
90
|
+
so-me inbox:create-reply --title "Hi" --content "Hello!"
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
### AI
|
|
94
|
+
|
|
95
|
+
```bash
|
|
96
|
+
so-me ai:generate --prompt "Write a tweet about product launch"
|
|
97
|
+
so-me ai:generate --prompt "LinkedIn post" --platform LINKEDIN --tone professional
|
|
98
|
+
so-me ai:image --prompt "A sunset over mountains"
|
|
99
|
+
so-me ai:history
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
### Approvals
|
|
103
|
+
|
|
104
|
+
```bash
|
|
105
|
+
so-me approvals:list # Pending posts
|
|
106
|
+
so-me approvals:approve <post-id>
|
|
107
|
+
so-me approvals:approve <post-id> --comment "Looks good"
|
|
108
|
+
so-me approvals:reject <post-id> --comment "Needs revision"
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
### Teams
|
|
112
|
+
|
|
113
|
+
```bash
|
|
114
|
+
so-me teams:members # List members
|
|
115
|
+
so-me teams:invite --email user@example.com
|
|
116
|
+
so-me teams:invite --email user@example.com --role owner
|
|
117
|
+
so-me teams:invitations # Pending invitations
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
## Global Options
|
|
121
|
+
|
|
122
|
+
| Flag | Description |
|
|
123
|
+
|------|-------------|
|
|
124
|
+
| `--api-key <key>` | Override stored API key |
|
|
125
|
+
| `--api-url <url>` | Override API base URL |
|
|
126
|
+
| `--json` | JSON output (default) |
|
|
127
|
+
| `--table` | Table-formatted output |
|
|
128
|
+
| `--verbose` | Show detailed errors |
|
|
129
|
+
| `--yes` / `-y` | Skip confirmation prompts |
|
|
130
|
+
|
|
131
|
+
## Environment Variables
|
|
132
|
+
|
|
133
|
+
| Variable | Description |
|
|
134
|
+
|----------|-------------|
|
|
135
|
+
| `SOME_API_KEY` | API key (alternative to `--api-key`) |
|
|
136
|
+
| `SOME_API_URL` | API base URL (default: `http://localhost:8000`) |
|
|
137
|
+
|
|
138
|
+
## Scripting
|
|
139
|
+
|
|
140
|
+
All commands output JSON by default, making them scriptable with `jq`:
|
|
141
|
+
|
|
142
|
+
```bash
|
|
143
|
+
# Get the first post's ID
|
|
144
|
+
so-me posts:list | jq '.data[0].id'
|
|
145
|
+
|
|
146
|
+
# List account names
|
|
147
|
+
so-me accounts:list | jq '.[].accountName'
|
|
148
|
+
|
|
149
|
+
# Create post and capture ID
|
|
150
|
+
POST_ID=$(so-me posts:create -c "Hello" --platform TWITTER | jq -r '.id')
|
|
151
|
+
so-me posts:schedule $POST_ID -s 2026-04-10T14:00:00Z
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
## Self-Hosted
|
|
155
|
+
|
|
156
|
+
Point the CLI at your own instance:
|
|
157
|
+
|
|
158
|
+
```bash
|
|
159
|
+
export SOME_API_URL=https://api.your-domain.com
|
|
160
|
+
so-me auth:login --api-key sk_live_xxx
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
## Development
|
|
164
|
+
|
|
165
|
+
```bash
|
|
166
|
+
cd apps/cli
|
|
167
|
+
pnpm dev # Watch mode
|
|
168
|
+
pnpm build # Build
|
|
169
|
+
pnpm test # Run tests
|
|
170
|
+
```
|