superx-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/CHANGELOG.md +20 -0
- package/LICENSE +21 -0
- package/PLAYBOOK.md +89 -0
- package/README.md +511 -0
- package/SKILL.md +468 -0
- package/dist/index.js +1280 -0
- package/package.json +57 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## Unreleased (joins 0.1.0)
|
|
4
|
+
|
|
5
|
+
- Media: `media:upload <file>` uploads a local image (JPG/PNG/WEBP 5MB, GIF 15MB) and prints its `object_key`; `scheduled:create`/`scheduled:update` gain `--media` (comma list of keys), `--alt-text` (single key), and `--parts-json` for threads with per-part media. Text replacement on update is a full replace, media included
|
|
6
|
+
- Signal agent writes: `signals:create-agent` (--name, --icp, repeatable --keyword, --precision, --list-id, --idempotency-key with replay detection), `signals:pause-agent <id>`, `signals:resume-agent <id>`, `signals:delete-agent <id>`
|
|
7
|
+
|
|
8
|
+
## 0.1.0 (2026-07-06)
|
|
9
|
+
|
|
10
|
+
Initial release.
|
|
11
|
+
|
|
12
|
+
- `superx login` / `logout` / `status` with guided API key setup and credentials stored in `~/.superx/credentials.json`
|
|
13
|
+
- Read commands: `me`, `accounts`, `posts:list`, `posts:analytics`, `replies:list`, `contacts:list`, `contacts:replies`
|
|
14
|
+
- Scheduling: `scheduled:list`, `scheduled:create` (drafts, scheduled posts, and threads with `--part`), `scheduled:delete`
|
|
15
|
+
- `docs` prints the API quickstart as markdown
|
|
16
|
+
- Clean JSON on stdout for every data command; human messages go to stderr
|
|
17
|
+
- Idempotency-Key support on `scheduled:create` with replay detection
|
|
18
|
+
- Agent skill (`SKILL.md`) and growth strategy guide (`PLAYBOOK.md`)
|
|
19
|
+
|
|
20
|
+
Maintainer note: `SKILL.md` and `skills/superx/SKILL.md` must stay byte-identical. Edit the root file, then copy it over the nested one.
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 SuperX
|
|
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/PLAYBOOK.md
ADDED
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
# SuperX Growth Playbook
|
|
2
|
+
|
|
3
|
+
Strategy reference for agents creating Twitter/X content with the `superx` CLI. Read this before drafting or scheduling anything. Each section notes which commands supply the data.
|
|
4
|
+
|
|
5
|
+
## 1. The mental model: discovery beats followers
|
|
6
|
+
|
|
7
|
+
Most growth on X now comes from the For You feed showing posts to people who do not follow the account. The feed is ML-ranked: each post is scored independently on the actions it is predicted to trigger (reply, repost, profile visit, dwell) minus predicted negatives (mute, block, "not interested"). Consequences:
|
|
8
|
+
|
|
9
|
+
- Every post is judged on its own; follower count matters less than the actions a post triggers.
|
|
10
|
+
- Niche consistency matters: the system needs to learn who a post is for. Keep the account inside 1 or 2 clear topic clusters.
|
|
11
|
+
- Posting many times in a short window quietly reduces reach (the ranker attenuates repeated authors). Prefer one strong post per day at a peak time over volume.
|
|
12
|
+
|
|
13
|
+
Data: `superx posts:analytics` shows whether reach is trending; `superx posts:list --sort impressions` shows which topics escape the follower base.
|
|
14
|
+
|
|
15
|
+
## 2. The action hierarchy: what to optimize for
|
|
16
|
+
|
|
17
|
+
Not all engagement is equal. Rough value order, highest first:
|
|
18
|
+
|
|
19
|
+
1. **Replies and reply chains**: the strongest signal by far. A post that starts conversations beats a post that collects likes.
|
|
20
|
+
2. **Reposts and quotes**: distribution signals that push a post outside the follower graph.
|
|
21
|
+
3. **Profile visits and follows**: posts that make a stranger curious about the author.
|
|
22
|
+
4. **Likes**: baseline. A like-only strategy underperforms.
|
|
23
|
+
5. **Negatives** (mute, block, "not interested"): actively suppress reach. Avoid bait, rage, and off-topic posts.
|
|
24
|
+
|
|
25
|
+
Before scheduling, self-check every draft: would a stranger reply, share, or click the profile after reading? If the honest answer is "they would like it and move on", rework it. Invite replies with a question or a bold, specific claim. Explicit "repost if you agree" phrasing reads as spam now; earn the share with usefulness instead.
|
|
26
|
+
|
|
27
|
+
Data: `superx posts:list --sort likes` plus reading `metrics.replies` vs `metrics.likes` per post shows which of the account's posts trigger the valuable actions.
|
|
28
|
+
|
|
29
|
+
## 3. Out-of-network discovery
|
|
30
|
+
|
|
31
|
+
A good post can go from a handful of follower likes to thousands of stranger views, but only if it is built for it:
|
|
32
|
+
|
|
33
|
+
- Write for the share: useful, funny, or insightful enough that a follower sends it onward.
|
|
34
|
+
- Reply early under larger accounts in the niche with something additive (a fact, a sharp take, a smart follow-up). Never "great post" filler.
|
|
35
|
+
- Time the first window: schedule the best post of the day for when the audience is active, then protect the first 30 to 60 minutes by replying to every response fast. Early engagement compounds.
|
|
36
|
+
|
|
37
|
+
Actions: `superx scheduled:create --at` for peak-time scheduling; `superx replies:list` to confirm the account is actually participating in conversations, not just broadcasting.
|
|
38
|
+
|
|
39
|
+
## 4. The engagement loop (3-3-3)
|
|
40
|
+
|
|
41
|
+
Consistent, targeted interaction grows accounts faster than posting alone:
|
|
42
|
+
|
|
43
|
+
- Maintain a small circle of roughly 3 accounts at ~1k followers (peers), 3 at ~10k (communities), and 3 at ~100k+ (top of funnel). Reply early and add value.
|
|
44
|
+
- Reply back to everyone who replies to you. Reply chains are among the strongest ranking signals, and people who feel seen come back.
|
|
45
|
+
- After a genuine back-and-forth, a soft pointer to related content on the profile is fine. Self-promo inside someone else's thread is not.
|
|
46
|
+
- Budget: about 20 minutes outbound and 20 minutes inbound daily.
|
|
47
|
+
|
|
48
|
+
Data: `superx contacts:list --sort engagement` identifies who already engages most (reply to them first); `superx contacts:replies <id>` shows the history with one person so replies can be specific. For the inbound block, `superx replies:received --sort recent` lists every reply the audience has sent across all posts, so nothing goes unanswered. Keep the 3-3-3 circle in a contact list (`superx lists:list`, `lists:add-member`) so the daily targets survive between sessions. If the account runs signal agents, `superx signals:leads` surfaces fresh people matching the ideal customer profile, with the post that revealed them; engage while the discovery is recent. No agent yet? `superx signals:create-agent --name ... --icp ...` sets one up from a plain-language customer description (keywords auto-suggested when omitted); leads accumulate over the following days, so create it early in the week and harvest with `signals:leads` later.
|
|
49
|
+
|
|
50
|
+
## 5. The research system
|
|
51
|
+
|
|
52
|
+
Reverse-engineer what wins instead of guessing:
|
|
53
|
+
|
|
54
|
+
- Judge accounts by engagement-to-follower ratio, not size.
|
|
55
|
+
- For the account itself: pull the top posts of the last 30 to 60 days and write down the pattern behind each winner (topic, hook type, format, what action it triggered).
|
|
56
|
+
- Extract structures, hooks, and angles. Never copy content.
|
|
57
|
+
|
|
58
|
+
Data: `superx posts:list --sort likes --since <60d ago>` and `--sort impressions` are the core research queries. Compare winners against `superx posts:analytics` for the follower effect. For patterns beyond the account's own history, `superx inspiration:search "<topic>" --sort outlier` pulls proven high-performers on the topic from a 50M+ post library; study their structures and hooks before drafting.
|
|
59
|
+
|
|
60
|
+
## 6. Weekly operating system
|
|
61
|
+
|
|
62
|
+
A sustainable weekly loop an agent can run:
|
|
63
|
+
|
|
64
|
+
1. Confirm the 1-2 topic clusters for the week; every post should fit one.
|
|
65
|
+
2. Pull last week's winners (`posts:list --sort likes --since ...`) and note why each worked.
|
|
66
|
+
3. Plan roughly 7 posts for the week; draft them (`scheduled:create` without `--at`, with a `--title` naming the angle and a `--tag` for the week's cluster so the human can scan the batch), review, then promote the best 3 to peak times (`scheduled:update <id> --at ... --status scheduled`).
|
|
67
|
+
4. Include one format experiment per week (a thread via `--part`, a longer post, or a long-form X Article via `articles:create` when a topic deserves depth: draft it, add a cover with `articles:cover`, and let the human review before `articles:publish`) so format reach is never left untested.
|
|
68
|
+
5. Refresh the 3-3-3 circle (`contacts:list`) and do the daily reply blocks.
|
|
69
|
+
6. End of week: `posts:analytics` for the trend, top 3 posts by meaningful actions, one failure mode to fix with a rule (for example "no link-drop posts", "never ghost early replies").
|
|
70
|
+
7. Repurpose one winner into two new assets for next week (tighter version, thread expansion, follow-up take).
|
|
71
|
+
|
|
72
|
+
Verify state with `superx scheduled:list --status draft,scheduled` after every planning pass.
|
|
73
|
+
|
|
74
|
+
## 7. Failure modes that kill reach
|
|
75
|
+
|
|
76
|
+
- **Inconsistency**: long gaps make the system re-learn the account. Sustainable cadence beats bursts.
|
|
77
|
+
- **Engagement bait**: obvious bait, bought engagement, and spam replies backfire.
|
|
78
|
+
- **Broadcast-only behavior**: never replying caps growth. The ranker rewards participants.
|
|
79
|
+
- **Link-heavy posting and constant self-promo**: keep roughly 80% pure value, 20% gentle promotion. Make the link an optional next step, not the point.
|
|
80
|
+
- **Rage and pile-ons**: strong positions that invite discussion are good; content that harvests blocks and mutes is throttled.
|
|
81
|
+
- **Off-cluster posting**: random topics confuse the system about who to show the account to.
|
|
82
|
+
- **Quitting early**: growth tends to be slow and then compounding. Hold the routine.
|
|
83
|
+
|
|
84
|
+
## 8. Hard boundaries for agents
|
|
85
|
+
|
|
86
|
+
- Drafts first when confidence is low; a human (or a later `scheduled:update --status scheduled`) can promote a draft after review. Use `--scratchpad` to leave the reasoning behind a draft where the human will see it.
|
|
87
|
+
- Never fabricate metrics, quotes, or claims in content. Use real data from the CLI or say nothing.
|
|
88
|
+
- Respect the write constraints: main account only, images only via `media:upload` (no video), UTC timestamps with explicit offset (see SKILL.md Rule 3).
|
|
89
|
+
- Quality over volume, always. One post a stranger would reply to beats five posts nobody finishes reading.
|
package/README.md
ADDED
|
@@ -0,0 +1,511 @@
|
|
|
1
|
+
## Install as a skill
|
|
2
|
+
|
|
3
|
+
```bash
|
|
4
|
+
npx skills add superx-so/superx-agent
|
|
5
|
+
```
|
|
6
|
+
|
|
7
|
+
# SuperX CLI
|
|
8
|
+
|
|
9
|
+
**Twitter/X growth CLI for developers and AI agents.** Read your posts and their metrics, pull account analytics, find the people who engage with you most, create draft or scheduled posts and threads (with image attachments), and write, schedule, and publish long-form X Articles (with AI cover generation) through the [SuperX API](https://docs.superx.so).
|
|
10
|
+
|
|
11
|
+
Two things ship in this repo:
|
|
12
|
+
|
|
13
|
+
- `superx-cli`, an npm package installing the `superx` binary (a thin client for `api.superx.so/v1`)
|
|
14
|
+
- An agent skill (`SKILL.md`) plus a growth strategy guide (`PLAYBOOK.md`) so agents do not just schedule posts, they follow a strategy that works
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
## Installation
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
npm install -g superx-cli
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
Requires Node.js 18 or newer.
|
|
25
|
+
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
## Authentication
|
|
29
|
+
|
|
30
|
+
Create an API key in the SuperX app: [app.superx.so/account?tab=developers](https://app.superx.so/account?tab=developers)
|
|
31
|
+
|
|
32
|
+
### Option 1: Guided login (local use)
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
superx login
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
Prints the key page URL, prompts you to paste the key, validates it against the API, and saves it to `~/.superx/credentials.json` (directory mode 0700, file mode 0600).
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
superx login --key "sxk_..." # non-interactive variant
|
|
42
|
+
superx status # verify credentials, plan, and rate-limit state
|
|
43
|
+
superx logout # delete the credentials file
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
### Option 2: Environment variable (CI, agents)
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
export SUPERX_API_KEY=sxk_...
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
The credentials file takes priority over the environment variable when both exist.
|
|
53
|
+
|
|
54
|
+
### Custom API endpoint
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
export SUPERX_API_URL=https://api.superx.so/v1 # full base URL including path
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
---
|
|
61
|
+
|
|
62
|
+
## Output contract
|
|
63
|
+
|
|
64
|
+
- **stdout is clean JSON** for every command except `superx docs` (markdown). Everything pipes straight into `jq`.
|
|
65
|
+
- Human/status messages go to **stderr**.
|
|
66
|
+
- Exit code `0` on success, `1` on error. Errors print to stderr as `Error [code] (HTTP status): message` using the API's error codes.
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
superx posts:list --sort likes --limit 5 | jq '.data[].text'
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
---
|
|
73
|
+
|
|
74
|
+
## Commands
|
|
75
|
+
|
|
76
|
+
### Identity
|
|
77
|
+
|
|
78
|
+
```bash
|
|
79
|
+
superx me # Key owner, plan tier, key name and scopes
|
|
80
|
+
superx accounts # X accounts this key can read (main account first)
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
Read commands accept `--account <id>` (an id from `superx accounts`) to select a linked account. Omitting it means the main account.
|
|
84
|
+
|
|
85
|
+
### Posts
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
superx posts:list
|
|
89
|
+
superx posts:list --type posts --sort likes --limit 10
|
|
90
|
+
superx posts:list --since "2026-06-01T00:00:00Z" --until "2026-07-01T00:00:00Z"
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
Options: `--type posts|replies|all`, `--sort posted_at|likes|impressions`, `--since/--until` (UTC ISO-8601), `--limit` (max 100), `--page`. Each post includes `metrics` (likes, replies, reposts, quotes, bookmarks, impressions).
|
|
94
|
+
|
|
95
|
+
### Analytics
|
|
96
|
+
|
|
97
|
+
```bash
|
|
98
|
+
superx posts:analytics
|
|
99
|
+
superx posts:analytics --since "2026-06-01T00:00:00Z" --until "2026-07-01T00:00:00Z"
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
Totals, a daily series, and follower start/end/change. Defaults to the last 30 days; the range is capped at 366 days.
|
|
103
|
+
|
|
104
|
+
### Replies you have sent
|
|
105
|
+
|
|
106
|
+
```bash
|
|
107
|
+
superx replies:list --limit 20
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
### Replies you have received (audience replies)
|
|
111
|
+
|
|
112
|
+
```bash
|
|
113
|
+
superx replies:received --limit 20
|
|
114
|
+
superx replies:received --sort most_liked --since "2026-06-01T00:00:00Z"
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
Every stored reply your audience has sent you across all your posts: the reply text and likes, the replier's profile, and the post they replied to. Options: `--sort recent|most_liked`, `--since/--until` (UTC ISO-8601), `--limit` (max 100), `--page`.
|
|
118
|
+
|
|
119
|
+
### Inspiration (viral post library)
|
|
120
|
+
|
|
121
|
+
```bash
|
|
122
|
+
superx inspiration:search "build in public" --limit 10
|
|
123
|
+
superx inspiration:search "indie hackers" --sort outlier --min-likes 500
|
|
124
|
+
superx inspiration:search "AI tools" --min-followers 1000 --max-followers 50000
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
Searches a library of 50M+ real high-performing posts by topic. Options: `--sort relevant|recent|likes|reposts|impressions|outlier`, `--min-likes/--min-reposts/--min-replies/--min-bookmarks/--min-impressions`, `--min-followers/--max-followers` (author size), `--since/--until` (UTC ISO-8601), `--lang` (default en), `--exclude-topics "crypto,politics"`, `--limit` (max 50), `--page` (1-7). Each result carries an `outlier_score`: how far the post outperformed the norm for its author's follower tier. Results are intentionally varied between runs; use them for structures and hooks to remix, never to copy.
|
|
128
|
+
|
|
129
|
+
### Contacts (who engages with you)
|
|
130
|
+
|
|
131
|
+
```bash
|
|
132
|
+
superx contacts:list --sort engagement --limit 20 # engagement | replies | reposts
|
|
133
|
+
superx contacts:replies <contact-id> --sort recent # recent | most_liked
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
### Contact lists
|
|
137
|
+
|
|
138
|
+
```bash
|
|
139
|
+
superx lists:list # all lists; system lists flagged is_system
|
|
140
|
+
superx lists:members <list-id> --q "founder" # members of a list you created
|
|
141
|
+
superx lists:add-member <list-id> --handle levelsio # or --x-user-id 44196397
|
|
142
|
+
superx lists:remove-member <list-id> <member-id>
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
Lists are the saved people-collections from the SuperX app. System lists (Followers, Following, Repliers, Reposters) appear in `lists:list` but are read-only and their members are not available through the API (400 `system_list_not_supported`). Adding someone already in a list is harmless: the API returns the existing member with `"duplicate": true` and writes nothing. Member writes are main account only.
|
|
146
|
+
|
|
147
|
+
### Signals (automated lead finding)
|
|
148
|
+
|
|
149
|
+
```bash
|
|
150
|
+
superx signals:agents # your signal agents and what they watch
|
|
151
|
+
superx signals:leads --limit 20 # newest leads across all agents
|
|
152
|
+
superx signals:leads --agent 3 --deposited false # new leads from one agent
|
|
153
|
+
superx signals:leads --since "2026-07-01T00:00:00Z" # leads discovered since July
|
|
154
|
+
|
|
155
|
+
# Create an agent (main account only, write scope)
|
|
156
|
+
superx signals:create-agent \
|
|
157
|
+
--name "Build in public founders" \
|
|
158
|
+
--icp "Indie founders building SaaS in public, sharing MRR and launches" \
|
|
159
|
+
--keyword "building in public" --keyword "just shipped my MVP"
|
|
160
|
+
|
|
161
|
+
# Lifecycle (agent id from signals:agents)
|
|
162
|
+
superx signals:pause-agent 3
|
|
163
|
+
superx signals:resume-agent 3
|
|
164
|
+
superx signals:delete-agent 3
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
Signal agents are automated lead finders: they watch profiles, followers, keywords, or lists and score the people they find against an ideal customer profile. Each lead carries the person's profile, the match score and rationale, a `deposited` flag (whether it has been saved to the agent's contact list yet), and provenance describing how it was discovered. `--agent` takes an id from `signals:agents`; an unknown id returns 404 `agent_not_found`. An agent's `destination_list_id` joins to `lists:list` for the list name.
|
|
168
|
+
|
|
169
|
+
`signals:create-agent` requires `--name` (max 80) and `--icp` (max 500). Repeat `--keyword` for 1-5 plain-language watches; omit it and 1-3 are auto-suggested from the ICP. Omit `--list-id` and a contact list named `Leads: <agent name>` is created for the leads (`destination_list_created: true` in the response). `--precision high|discovery` defaults to `high`; `--idempotency-key` makes retries safe. Creation returns immediately, but leads arrive over the following minutes and days; there is no synchronous search. Pause, resume, and delete work on any agent; other edits happen in the app. Deleting an agent keeps its saved leads and its contact list. Plan limits surface as 403 `cap_reached`.
|
|
170
|
+
|
|
171
|
+
|
|
172
|
+
|
|
173
|
+
```bash
|
|
174
|
+
# Draft: no --at, nothing publishes
|
|
175
|
+
superx scheduled:create --text "Post text"
|
|
176
|
+
|
|
177
|
+
# Scheduled post: UTC ISO-8601 with explicit Z or offset, at least 60s ahead
|
|
178
|
+
superx scheduled:create --text "Post text" --at "2026-08-01T15:00:00Z"
|
|
179
|
+
|
|
180
|
+
# Thread: repeat --part in order (1-25 parts, 25,000 chars total)
|
|
181
|
+
superx scheduled:create --part "1/ Hook" --part "2/ Detail" --part "3/ Close" --at "2026-08-01T15:00:00Z"
|
|
182
|
+
|
|
183
|
+
# Safe retries: same key + same body returns the original result
|
|
184
|
+
superx scheduled:create --text "Post" --at "2026-08-01T15:00:00Z" --idempotency-key "run-42"
|
|
185
|
+
|
|
186
|
+
superx scheduled:list --status draft,scheduled # draft | scheduled | sent | error
|
|
187
|
+
superx scheduled:list --from "2026-08-01T00:00:00Z" --to "2026-08-08T00:00:00Z"
|
|
188
|
+
superx scheduled:delete <post-id>
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
Images attach in two steps: upload, then reference the `object_key`.
|
|
192
|
+
|
|
193
|
+
```bash
|
|
194
|
+
KEY=$(superx media:upload ./chart.png | jq -r '.object_key')
|
|
195
|
+
superx scheduled:create --text "Chart of the week" --media "$KEY" --alt-text "Weekly revenue line chart"
|
|
196
|
+
superx scheduled:create --parts-json '[{"text":"1/ Hook","media":[{"object_key":"'"$KEY"'"}]},{"text":"2/ Detail"}]'
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
`media:upload` accepts JPG, PNG, and WEBP up to 5MB and GIF up to 15MB; a post part carries up to 4 images or exactly 1 GIF. `--media` takes a comma list of keys; `--alt-text` (max 1,000 chars) works with a single key, and `--parts-json` covers threads and per-image alt text. Uploads are capped at 100 per day and expire after 24 hours if never attached. Video is not supported yet.
|
|
200
|
+
|
|
201
|
+
Drafts can carry organizer fields: `--title` (max 300 chars) and `--scratchpad` (max 30,000 chars) are shown in the SuperX app and never posted; `--tag <id>` (repeatable, max 20) attaches tags from `tags:list`.
|
|
202
|
+
|
|
203
|
+
```bash
|
|
204
|
+
superx scheduled:create --text "Post" --title "Launch teaser" --tag <tag-id>
|
|
205
|
+
superx scheduled:list --tags <tag-id>,<tag-id> # posts carrying ANY of these tags
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
Edit an existing draft or scheduled post with `scheduled:update`. Only the flags you pass change; everything else stays as it is.
|
|
209
|
+
|
|
210
|
+
```bash
|
|
211
|
+
superx scheduled:update <post-id> --title "Better hook"
|
|
212
|
+
superx scheduled:update <post-id> --text "New text"
|
|
213
|
+
superx scheduled:update <post-id> --at "2026-08-01T15:00:00Z" --status scheduled # promote a draft
|
|
214
|
+
superx scheduled:update <post-id> --status draft # back to drafts (quota refunds)
|
|
215
|
+
superx scheduled:update <post-id> --tag <id-a> --tag <id-b> # replace ALL tags
|
|
216
|
+
superx scheduled:update <post-id> --clear-tags --clear-title --clear-scratchpad
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
A new `--at` time alone never schedules a draft; pass `--status scheduled` explicitly. CAUTION: replacement text is a full replace, media included. `--text` without `--media` removes any images the post carried; re-list the current `object_key`s (visible in `scheduled:list`) to keep them. Title, scratchpad, tag, and time edits never touch media.
|
|
220
|
+
|
|
221
|
+
Write constraints in the current API version: main account only; images via `media:upload` (no video); one of `--text`, `--part`, or `--parts-json`. Idempotent replays add `"replayed": true` to the output. Note that drafts have no scheduled time, so `--from/--to` filters exclude them.
|
|
222
|
+
|
|
223
|
+
### Tags
|
|
224
|
+
|
|
225
|
+
```bash
|
|
226
|
+
superx tags:list # id, name, color
|
|
227
|
+
superx tags:create "Launch week" --color amber # colors: rose, amber, lime, emerald, teal, cyan, blue, indigo, violet, fuchsia, slate, stone
|
|
228
|
+
superx tags:update <tag-id> --name "Launch" --color violet
|
|
229
|
+
superx tags:delete <tag-id> # also removes it from every post
|
|
230
|
+
```
|
|
231
|
+
|
|
232
|
+
Tag names are unique (409 `duplicate_name` on collision) and capped at 40 characters.
|
|
233
|
+
|
|
234
|
+
### Articles (long-form X posts)
|
|
235
|
+
|
|
236
|
+
Article bodies are **markdown in both directions**: headings (h1-h3), bullet and numbered lists (one nesting level), blockquotes, bold/italic/strikethrough, links, images by URL, and bare X post URLs as embeds. Code blocks and horizontal rules are not supported by the X Articles format and degrade to plain text (the response lists any degradations in `warnings`).
|
|
237
|
+
|
|
238
|
+
```bash
|
|
239
|
+
superx articles:create --title "My article" --file draft.md # body from a markdown file
|
|
240
|
+
cat draft.md | superx articles:create --title "My article" # body from stdin
|
|
241
|
+
superx articles:create --title "Outline first" # empty draft
|
|
242
|
+
|
|
243
|
+
superx articles:list --status draft,scheduled
|
|
244
|
+
superx articles:get <article-id> # body comes back as markdown
|
|
245
|
+
|
|
246
|
+
superx articles:update <article-id> --title "Sharper title"
|
|
247
|
+
superx articles:update <article-id> --file v2.md # replace the whole body
|
|
248
|
+
superx articles:update <article-id> --cover-url "https://..." # attach a cover image
|
|
249
|
+
superx articles:update <article-id> --clear-cover
|
|
250
|
+
|
|
251
|
+
superx articles:schedule <article-id> --at "2026-08-01T15:00:00Z"
|
|
252
|
+
superx articles:unschedule <article-id> # back to draft, quota refunds
|
|
253
|
+
superx articles:publish <article-id> # live NOW; irreversible
|
|
254
|
+
superx articles:delete <article-id>
|
|
255
|
+
|
|
256
|
+
superx articles:cover <article-id> # AI cover, 60-100s, spends AI credits
|
|
257
|
+
superx articles:cover <article-id> --style "dark, minimal, geometric" --no-attach
|
|
258
|
+
```
|
|
259
|
+
|
|
260
|
+
Publishing requires X Premium on the connected account and spends post quota; X also enforces its own article limits (10 drafts and 5 publishes per day). Scheduling deducts quota up front and refunds it on `articles:unschedule` or `articles:delete`. `articles:cover` generates from the article's title (a title is required) and attaches the result unless `--no-attach` is passed.
|
|
261
|
+
|
|
262
|
+
### Docs
|
|
263
|
+
|
|
264
|
+
```bash
|
|
265
|
+
superx docs # Prints the API quickstart as markdown; works without auth
|
|
266
|
+
```
|
|
267
|
+
|
|
268
|
+
---
|
|
269
|
+
|
|
270
|
+
## Features for AI agents
|
|
271
|
+
|
|
272
|
+
- **Skill included**: `npx skills add superx-so/superx-agent` installs [SKILL.md](./SKILL.md), a complete agent reference with hard rules, workflows, and gotchas.
|
|
273
|
+
- **Strategy included**: [PLAYBOOK.md](./PLAYBOOK.md) distills the SuperX growth methodology (action hierarchy, out-of-network discovery, the 3-3-3 engagement loop, weekly operating system) into directives an agent can execute with this CLI. The skill instructs agents to read it before creating content.
|
|
274
|
+
- **Clean JSON stdout**: no decoration to strip; every data command is `jq`-safe.
|
|
275
|
+
- **Idempotent writes**: agents can retry `scheduled:create` safely with `--idempotency-key`.
|
|
276
|
+
- **Self-describing**: `superx docs` fetches the current API quickstart at runtime.
|
|
277
|
+
|
|
278
|
+
### Example agent workflow
|
|
279
|
+
|
|
280
|
+
```bash
|
|
281
|
+
superx status
|
|
282
|
+
superx accounts
|
|
283
|
+
superx posts:list --sort likes --limit 10 # study what works
|
|
284
|
+
superx posts:analytics # check the trend
|
|
285
|
+
superx contacts:list --sort engagement --limit 10 # who to engage today
|
|
286
|
+
# ... read PLAYBOOK.md, draft content ...
|
|
287
|
+
superx scheduled:create --text "Draft for review" # draft first
|
|
288
|
+
superx scheduled:list --status draft
|
|
289
|
+
```
|
|
290
|
+
|
|
291
|
+
### MCP
|
|
292
|
+
|
|
293
|
+
Prefer MCP over a CLI? SuperX also hosts a remote MCP server with the same tools (reads plus post scheduling/editing/deletion and article create/update/schedule/publish/cover tools):
|
|
294
|
+
|
|
295
|
+
```bash
|
|
296
|
+
claude mcp add --transport http superx https://api.superx.so/v1/mcp --header "Authorization: Bearer YOUR_API_KEY"
|
|
297
|
+
```
|
|
298
|
+
|
|
299
|
+
ChatGPT and claude.ai connect with a keyed URL instead. Guide: [docs.superx.so/mcp-server](https://docs.superx.so/mcp-server)
|
|
300
|
+
|
|
301
|
+
---
|
|
302
|
+
|
|
303
|
+
## API endpoints
|
|
304
|
+
|
|
305
|
+
The CLI talks to these SuperX API endpoints (base `https://api.superx.so/v1`):
|
|
306
|
+
|
|
307
|
+
| Endpoint | Method | CLI command |
|
|
308
|
+
|----------|--------|-------------|
|
|
309
|
+
| `/me` | GET | `me`, `status`, `login` |
|
|
310
|
+
| `/accounts` | GET | `accounts` |
|
|
311
|
+
| `/posts` | GET | `posts:list` |
|
|
312
|
+
| `/posts/analytics` | GET | `posts:analytics` |
|
|
313
|
+
| `/replies` | GET | `replies:list` |
|
|
314
|
+
| `/replies/received` | GET | `replies:received` |
|
|
315
|
+
| `/inspiration` | GET | `inspiration:search <query>` |
|
|
316
|
+
| `/contacts` | GET | `contacts:list` |
|
|
317
|
+
| `/contacts/:id/replies` | GET | `contacts:replies <id>` |
|
|
318
|
+
| `/contact-lists` | GET | `lists:list` |
|
|
319
|
+
| `/contact-lists/:id/members` | GET | `lists:members <id>` |
|
|
320
|
+
| `/contact-lists/:id/members` | POST | `lists:add-member <id>` |
|
|
321
|
+
| `/contact-lists/:id/members/:memberId` | DELETE | `lists:remove-member <id> <memberId>` |
|
|
322
|
+
| `/signals/agents` | GET | `signals:agents` |
|
|
323
|
+
| `/signals/agents` | POST | `signals:create-agent` |
|
|
324
|
+
| `/signals/agents/:id` | PATCH | `signals:pause-agent <id>` / `signals:resume-agent <id>` |
|
|
325
|
+
| `/signals/agents/:id` | DELETE | `signals:delete-agent <id>` |
|
|
326
|
+
| `/signals/leads` | GET | `signals:leads` |
|
|
327
|
+
| `/media` | POST | `media:upload <file>` |
|
|
328
|
+
| `/scheduled-posts` | GET | `scheduled:list` |
|
|
329
|
+
| `/scheduled-posts` | POST | `scheduled:create` |
|
|
330
|
+
| `/scheduled-posts/:id` | PATCH | `scheduled:update <id>` |
|
|
331
|
+
| `/scheduled-posts/:id` | DELETE | `scheduled:delete <id>` |
|
|
332
|
+
| `/tags` | GET | `tags:list` |
|
|
333
|
+
| `/tags` | POST | `tags:create <name>` |
|
|
334
|
+
| `/tags/:id` | PATCH | `tags:update <id>` |
|
|
335
|
+
| `/tags/:id` | DELETE | `tags:delete <id>` |
|
|
336
|
+
| `/articles` | GET | `articles:list` |
|
|
337
|
+
| `/articles` | POST | `articles:create` |
|
|
338
|
+
| `/articles/:id` | GET | `articles:get <id>` |
|
|
339
|
+
| `/articles/:id` | PATCH | `articles:update <id>` |
|
|
340
|
+
| `/articles/:id` | DELETE | `articles:delete <id>` |
|
|
341
|
+
| `/articles/:id/publish` | POST | `articles:publish <id>` |
|
|
342
|
+
| `/articles/:id/schedule` | POST | `articles:schedule <id>` |
|
|
343
|
+
| `/articles/:id/unschedule` | POST | `articles:unschedule <id>` |
|
|
344
|
+
| `/articles/:id/cover` | POST | `articles:cover <id>` |
|
|
345
|
+
| `/docs` | GET | `docs` (no auth) |
|
|
346
|
+
|
|
347
|
+
Full API reference: [docs.superx.so](https://docs.superx.so)
|
|
348
|
+
|
|
349
|
+
---
|
|
350
|
+
|
|
351
|
+
## Environment variables
|
|
352
|
+
|
|
353
|
+
| Variable | Required | Default | Description |
|
|
354
|
+
|----------|----------|---------|-------------|
|
|
355
|
+
| `SUPERX_API_KEY` | No* | - | API key; used when no credentials file exists |
|
|
356
|
+
| `SUPERX_API_URL` | No | `https://api.superx.so/v1` | Full API base URL including path |
|
|
357
|
+
|
|
358
|
+
*Either `superx login` or `SUPERX_API_KEY` is required for everything except `superx docs`.
|
|
359
|
+
|
|
360
|
+
---
|
|
361
|
+
|
|
362
|
+
## Error handling
|
|
363
|
+
|
|
364
|
+
Exit code `0` = success, `1` = error. Error codes come straight from the API:
|
|
365
|
+
|
|
366
|
+
| Code | Meaning |
|
|
367
|
+
|------|---------|
|
|
368
|
+
| `invalid_api_key` (401) | Bad or revoked key; run `superx login` again |
|
|
369
|
+
| `insufficient_scope` (403) | Read-only key used for a write |
|
|
370
|
+
| `writes_main_account_only` (403) | `scheduled:create` with a linked account |
|
|
371
|
+
| `subscription_required` (403) | SuperX subscription lapsed |
|
|
372
|
+
| `account_not_found` (404) | `--account` id is not one of your accounts |
|
|
373
|
+
| `list_not_found` (404) | List id is not one of your contact lists |
|
|
374
|
+
| `member_not_found` (404) | Member id is not in that list |
|
|
375
|
+
| `agent_not_found` (404) | `--agent` id is not one of your signal agents |
|
|
376
|
+
| `user_not_found` (404) | `--handle` did not match an X account |
|
|
377
|
+
| `system_list_read_only` (400) | Member add/remove on a system list |
|
|
378
|
+
| `system_list_not_supported` (400) | `lists:members` on a system list |
|
|
379
|
+
| `invalid_parameter` (400) | Bad flag value; naive timestamps land here |
|
|
380
|
+
| `invalid_media` (400) | Unknown `object_key`; upload first with `media:upload` |
|
|
381
|
+
| `media_not_uploaded` (400) | Presigned but the bytes were never uploaded |
|
|
382
|
+
| `unsupported_media_type` (400) | Not a JPG/PNG/WEBP/GIF (videos land here) |
|
|
383
|
+
| `media_too_large` (400) | Over 5MB (images) or 15MB (GIF) |
|
|
384
|
+
| `media_quota_exceeded` (429) | Daily media upload limit (100/day) reached |
|
|
385
|
+
| `cap_reached` (403) | The plan's signal agent (or per-agent signal) limit is reached |
|
|
386
|
+
| `idempotency_key_reuse` (409) | Same `--idempotency-key` with a different body |
|
|
387
|
+
| `rate_limited` (429) | Back off; stderr includes the retry delay |
|
|
388
|
+
|
|
389
|
+
Rate limits per key: 60 reads/min, 10,000 reads/day, 10 writes/min, 300 writes/day. Every authenticated response carries `X-RateLimit-*` headers (visible via `superx status`).
|
|
390
|
+
|
|
391
|
+
---
|
|
392
|
+
|
|
393
|
+
## Development
|
|
394
|
+
|
|
395
|
+
```bash
|
|
396
|
+
git clone https://github.com/superx-so/superx-agent
|
|
397
|
+
cd superx-agent
|
|
398
|
+
npm install
|
|
399
|
+
npm run build # tsup bundles src/ into dist/index.js (CJS, shebang)
|
|
400
|
+
node dist/index.js --help
|
|
401
|
+
```
|
|
402
|
+
|
|
403
|
+
```
|
|
404
|
+
src/
|
|
405
|
+
├── index.ts # CLI entry point (yargs wiring)
|
|
406
|
+
├── api.ts # SuperXAPI client (global fetch, Bearer auth)
|
|
407
|
+
├── config.ts # Credentials file + env precedence
|
|
408
|
+
└── commands/
|
|
409
|
+
├── auth.ts # login / logout / status
|
|
410
|
+
├── accounts.ts # me / accounts
|
|
411
|
+
├── posts.ts # posts:list / posts:analytics / replies:list / replies:received
|
|
412
|
+
├── inspiration.ts # inspiration:search
|
|
413
|
+
├── contacts.ts # contacts:list / contacts:replies
|
|
414
|
+
├── lists.ts # lists:list / lists:members / lists:add-member / lists:remove-member
|
|
415
|
+
├── signals.ts # signals:agents / signals:leads / signals:create-agent / signals:pause-agent / signals:resume-agent / signals:delete-agent
|
|
416
|
+
├── media.ts # media:upload
|
|
417
|
+
├── scheduled.ts # scheduled:list / scheduled:create / scheduled:update / scheduled:delete
|
|
418
|
+
├── tags.ts # tags:list / tags:create / tags:update / tags:delete
|
|
419
|
+
├── articles.ts # articles:list/get/create/update/delete/publish/schedule/unschedule/cover
|
|
420
|
+
└── docs.ts # docs
|
|
421
|
+
```
|
|
422
|
+
|
|
423
|
+
Maintainer note: `SKILL.md` (repo root) and `skills/superx/SKILL.md` must stay byte-identical. Edit the root file and copy it over the nested one.
|
|
424
|
+
|
|
425
|
+
---
|
|
426
|
+
|
|
427
|
+
## Quick reference
|
|
428
|
+
|
|
429
|
+
```bash
|
|
430
|
+
# Auth
|
|
431
|
+
superx login # Guided key paste
|
|
432
|
+
superx login --key "sxk_..." # Non-interactive
|
|
433
|
+
superx status # Check auth + rate limits
|
|
434
|
+
superx logout # Remove credentials
|
|
435
|
+
export SUPERX_API_KEY=sxk_... # Env alternative
|
|
436
|
+
|
|
437
|
+
# Reads
|
|
438
|
+
superx me
|
|
439
|
+
superx accounts
|
|
440
|
+
superx posts:list --type posts --sort likes --limit 10
|
|
441
|
+
superx posts:analytics --since "2026-06-01T00:00:00Z"
|
|
442
|
+
superx replies:list --limit 20
|
|
443
|
+
superx inspiration:search "build in public" --sort outlier --limit 10
|
|
444
|
+
superx contacts:list --sort engagement --limit 20
|
|
445
|
+
superx contacts:replies <id> --sort most_liked
|
|
446
|
+
superx replies:received --sort most_liked --limit 20
|
|
447
|
+
superx lists:list
|
|
448
|
+
superx lists:members <list-id> --q "founder"
|
|
449
|
+
superx signals:agents
|
|
450
|
+
superx signals:leads --agent 3 --deposited false
|
|
451
|
+
|
|
452
|
+
# Contact list writes (main account)
|
|
453
|
+
superx lists:add-member <list-id> --handle levelsio
|
|
454
|
+
superx lists:remove-member <list-id> <member-id>
|
|
455
|
+
|
|
456
|
+
# Signal agent writes (main account)
|
|
457
|
+
superx signals:create-agent --name "..." --icp "..." --keyword "..."
|
|
458
|
+
superx signals:pause-agent <id>
|
|
459
|
+
superx signals:resume-agent <id>
|
|
460
|
+
superx signals:delete-agent <id>
|
|
461
|
+
|
|
462
|
+
# Writes (main account)
|
|
463
|
+
superx scheduled:create --text "Post" # Draft
|
|
464
|
+
superx scheduled:create --text "Post" --at "2026-08-01T15:00:00Z" # Scheduled
|
|
465
|
+
superx scheduled:create --part "1/" --part "2/" --at "..." # Thread
|
|
466
|
+
superx scheduled:create --text "Post" --title "Hook v2" --tag <id> # Draft with organizer fields
|
|
467
|
+
superx media:upload ./chart.png # Image -> object_key
|
|
468
|
+
superx scheduled:create --text "Post" --media <object_key> # Post with an image
|
|
469
|
+
superx scheduled:update <id> --title "Better hook" # Edit; only passed flags change
|
|
470
|
+
superx scheduled:update <id> --at "..." --status scheduled # Promote a draft
|
|
471
|
+
superx scheduled:list --status draft,scheduled
|
|
472
|
+
superx scheduled:list --tags <tag-id>
|
|
473
|
+
superx scheduled:delete <id>
|
|
474
|
+
|
|
475
|
+
# Tags
|
|
476
|
+
superx tags:list
|
|
477
|
+
superx tags:create "Launch week" --color amber
|
|
478
|
+
superx tags:update <id> --name "Launch"
|
|
479
|
+
superx tags:delete <id>
|
|
480
|
+
|
|
481
|
+
# Articles (markdown bodies; publish needs X Premium)
|
|
482
|
+
superx articles:create --title "My article" --file draft.md
|
|
483
|
+
superx articles:list --status draft
|
|
484
|
+
superx articles:get <id>
|
|
485
|
+
superx articles:update <id> --file v2.md
|
|
486
|
+
superx articles:schedule <id> --at "2026-08-01T15:00:00Z"
|
|
487
|
+
superx articles:unschedule <id>
|
|
488
|
+
superx articles:publish <id> # live NOW; irreversible
|
|
489
|
+
superx articles:cover <id> --style "minimal" # AI cover, 60-100s
|
|
490
|
+
superx articles:delete <id>
|
|
491
|
+
|
|
492
|
+
# Docs and help
|
|
493
|
+
superx docs
|
|
494
|
+
superx --help
|
|
495
|
+
superx scheduled:create --help
|
|
496
|
+
```
|
|
497
|
+
|
|
498
|
+
---
|
|
499
|
+
|
|
500
|
+
## License
|
|
501
|
+
|
|
502
|
+
MIT
|
|
503
|
+
|
|
504
|
+
---
|
|
505
|
+
|
|
506
|
+
## Links
|
|
507
|
+
|
|
508
|
+
- **Website:** [superx.so](https://superx.so)
|
|
509
|
+
- **App:** [app.superx.so](https://app.superx.so)
|
|
510
|
+
- **API docs:** [docs.superx.so](https://docs.superx.so)
|
|
511
|
+
- **Issues:** [github.com/superx-so/superx-agent/issues](https://github.com/superx-so/superx-agent/issues)
|