jackwener / jackwener/OpenCLI

twitter: `post` says "tweet/thread" but only posts a single tweet — add thread support

Open
#2,063 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
29.5k
Forks
2.9k
Avg merge
15h 36m
Merged PRs (30d)
70

Description

## The gap

`twitter post` advertises itself as posting a **thread**:

```
post [ui] — Post a new tweet/thread
```

…but the implementation only fills `tweetTextarea_0` and submits once, so it always posts a **single** tweet. There's no first-class way to post a multi-tweet thread. (The name `twitter thread` is already taken by the *read* command that fetches an existing conversation.)

## Real-world pain (how we hit this)

We needed to post an 8-tweet launch thread. With the current CLI the only way was to script it by hand:

```bash
url=$(opencli twitter post "$(cat t1.txt)" --window foreground -f json | jq -r '.[0].url')
for i in 2 3 4 5 6 7 8; do
url=$(opencli twitter reply "$url" "$(cat t$i.txt)" --window foreground -f json | jq -r '.[0].url')
done
```

This works (it's exactly how an X thread is structured — each tweet replies to the previous), but every caller has to re-implement URL parsing, chaining, pacing, and failure handling. Worth making a first-class command.

## Proposed solution

A `twitter post-thread` command that takes N tweets (via `--file`, split on `---` lines or blank lines) and chains them: first tweet, then each as a reply to the previous, returning every id/url.

**Design question for maintainers** — which integration do you prefer?

1. **New `post-thread` command that reuses `twitter post` + `twitter reply` via the registry** (DRY, zero changes to the fragile Draft.js composer code). ← what our draft PR does
2. **Extend `post` itself** to accept multiple segments (fulfills its existing "tweet/thread" description), possibly refactoring the composer insert/submit into shared helpers first.
3. **Native modal thread** (`/compose/post` "Add post" + "Post all") for a single atomic submit, instead of reply-chaining.

We've opened a draft PR implementing option 1 (new command, reuses tested `post`/`reply`, unit-tested orchestration incl. abort-on-failure). Happy to reshape it toward 2 or 3 if you'd rather. 🙏

Contributor guide

Open the contributing guide

Research direction

Start by reading the existing `twitter post` and `twitter reply` command implementations and the draft PR's orchestration tests. Done means a `post-thread` command accepts multiple tweet segments, chains replies, returns every id and URL, and aborts on failure as described.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
cli
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.